Skip to content

Instantly share code, notes, and snippets.

@laynor
Created October 25, 2013 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laynor/7152419 to your computer and use it in GitHub Desktop.
Save laynor/7152419 to your computer and use it in GitHub Desktop.
<Window x:Class="WPFTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ListBox Name="Master" Grid.Row="0" Grid.Column="0"
ItemsSource="{Binding Source={StaticResource Settings}}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Value[DisplayName]}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="0" Grid.Column="1">
<ComboBox ItemsSource="{Binding ElementName=Master, Path=SelectedValue}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Value[DisplayName]}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
</Grid>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment