1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
| <UserControl x:Class="SpectrumComparer.MyTreeViewObjects.ContextMenuListBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="296" d:DesignWidth="200" Background="#FFF0F0F0" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="25" /> <RowDefinition Height="5" /> <RowDefinition Height="268*" /> </Grid.RowDefinitions> <TextBlock FontSize="16" Text="Filter Expressions"></TextBlock> <Separator Foreground="Black" Height="2" Margin="0" Grid.Row="1"></Separator> <ListBox Background="#FFF0F0F0" HorizontalAlignment="Left" Width="200" BorderBrush="Transparent" Name="RadioListBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding Path=RefValues, UpdateSourceTrigger=PropertyChanged}" SelectionMode="Single" Grid.Row="2" > <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate > <StackPanel Orientation="Horizontal" MinWidth="150" MaxWidth="150" Margin="0,5, 0, 5"> <RadioButton Name="radioButton" IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem} }, Path=IsSelected, Mode=TwoWay}" /> <ContentPresenter Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" Margin="5,0,0,0" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </UserControl> |