첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

■ Line 엘리먼트의 StrokeDashArray 속성을 사용해 다양한 모양의 점선을 만드는 방법을 보여준다.

TestProject.zip
0.00MB

▶ MainWindow.xaml

<Window x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="800"
    Height="600"
    Title="TestProject"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Window.Resources>
        <Style TargetType="Line" >
            <Setter Property="X1"              Value="0"    />
            <Setter Property="X2"              Value="600"  />
            <Setter Property="Stroke"          Value="Blue" />
            <Setter Property="StrokeThickness" Value="3"    />
            <Setter Property="Margin"          Value="10"   />
        </Style>
    </Window.Resources>
    <StackPanel
        HorizontalAlignment="Center"
        VerticalAlignment="Center">
        <Line StrokeDashArray="1"           />
        <Line StrokeDashArray="1 1"         />
        <Line StrokeDashArray="1 6"         />
        <Line StrokeDashArray="6 1"         />
        <Line StrokeDashArray="0.25 1"      />
        <Line StrokeDashArray="4 1 1 1 1 1" />
        <Line StrokeDashArray="1 2 4"       />
        <Line StrokeDashArray="4 2 1"       />
    </StackPanel>
</Window>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요