첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
<DataTemplate>
    <StackPanel
        Margin="1"
        Orientation="Horizontal">
        <Image Name="itemImage"
            VerticalAlignment="Center"
            Margin="0 0 5 0"
            Width="16"
            Height="16"
            Stretch="None"
            Source="{Binding Icon}" />
        <TextBlock Name="itemTextBlock"
            VerticalAlignment="Center"
            Margin="0"
            Width="{Binding RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}, Path=ActualWidth}"
            Text="{Binding Text}" />
    </StackPanel>
    <DataTemplate.Triggers>
        <DataTrigger Binding="{Binding Icon}" Value="{x:Null}">
            <Setter TargetName="itemImage" Property="Visibility" Value="Collapsed" />
        </DataTrigger>
    </DataTemplate.Triggers>
</DataTemplate>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요