Bind ListBox ItemsSource to DayNames property of DateTimeFormatInfo

image_pdfimage_print


   
   

<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="lstbox"
             HorizontalAlignment="Center"
             Margin="24"
             ItemsSource="{Binding 
                            Source={x:Static g:DateTimeFormatInfo.CurrentInfo},
                            Path=DayNames,
                            Mode=OneTime}" />
</StackPanel>