■ Binding 태그 확장 : Source 속성에 x:Static 태그 확장 사용하기

----------------------------------------------------------------------------------------------------

<StackPanel
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:g="clr-namespace:System.Globalization;assembly=mscorlib">
   <ListBox
       Name="listBox"
       Margin="24"
       HorizontalAlignment="Center"
       ItemsSource="{Binding Source={x:Static g:DateTimeFormatInfo.CurrentInfo}, Path=DayNames, Mode=OneTime}" />
   <TextBlock
       HorizontalAlignment="Center"
       Text="{Binding ElementName=listBox, Path=SelectedItem, Mode=OneWay}" />
</
StackPanel>

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요