-
-
Save anonymous/643d79faaf5b2a42138cd9fa8511e760 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ComboBox Name="cboLetters" ItemsSource="{Binding MainLetterList, Mode=TwoWay}" VerticalAlignment="Top" SelectionChanged="cboLetters_SelectionChanged" > | |
<ComboBox.ItemTemplate> | |
<DataTemplate> | |
<TextBlock Text="{Binding Path}" /> | |
</DataTemplate> | |
</ComboBox.ItemTemplate> | |
</ComboBox> | |
<CollectionViewSource x:Key="SelectedLetterTemplates" IsLiveSortingRequested="True" Source="{Binding Path=SelectedItem.Templates, ElementName=cboLetters, Mode=TwoWay}"> | |
<CollectionViewSource.SortDescriptions> | |
<scm:SortDescription PropertyName="IsDefault" Direction="Descending"/> | |
<scm:SortDescription PropertyName="Description" Direction="Ascending"/> | |
</CollectionViewSource.SortDescriptions> | |
</CollectionViewSource> | |
<ListBox Name="lbTemplates" ItemsSource="{Binding Source={StaticResource SelectedLetterTemplates}}" Height="120" SelectionChanged="lbTemplates_SelectionChanged"> | |
<ListBox.ItemTemplate> | |
<DataTemplate> | |
<StackPanel Orientation="Horizontal"> | |
<Label Visibility="{Binding IsDefault, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=false, Mode=TwoWay}" Margin="0 0 5 0" FontWeight="Bold">(Default)</Label> | |
<Label Content="{Binding Description, Converter={StaticResource SingleLineTextConverter}}"/> | |
</StackPanel> | |
</DataTemplate> | |
</ListBox.ItemTemplate> | |
</ListBox> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment