-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
Copy pathStaticMemberSelection.xaml
98 lines (98 loc) · 4.44 KB
/
StaticMemberSelection.xaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<UserControl x:Class="Microsoft.VisualStudio.LanguageServices.Implementation.MoveStaticMembers.StaticMemberSelection"
x:ClassModifier="internal"
x:Name="MemberSelectionControl"
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"
xmlns:utilities="clr-namespace:Microsoft.VisualStudio.LanguageServices.Implementation.Utilities"
xmlns:movestaticmembers="clr-namespace:Microsoft.VisualStudio.LanguageServices.Implementation.MoveStaticMembers"
d:DataContext="{d:DesignInstance Type=movestaticmembers:StaticMemberSelectionViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Thickness x:Key="ButtonControlsPadding">2, 4, 4, 2</Thickness>
<utilities:BooleanReverseConverter x:Key="BooleanReverseConverter"/>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ListBox
x:Uid="MemberSelectionList"
x:Name="MemberSelectionList"
Grid.Column="0"
Margin="2, 5, 12, 2"
SelectionMode="Multiple"
AutomationProperties.Name="SelectMembersList"
ItemsSource="{Binding Members}">
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="IsSelected" Value="{Binding IsChecked, Mode=TwoWay}" />
</Style>
</ListBox.Resources>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Left"
MinWidth="186"
Width="Auto"
Margin="5, 2, 0, 2">
<CheckBox
x:Name="MemberSelected"
AutomationProperties.Name="IsSelected"
Margin="0, 0, 5, 0"
IsChecked="{Binding IsChecked, Mode=TwoWay}"/>
<Image
x:Name="GlyphOfMember"
Margin="8, 0, 5, 0"
Source="{Binding Glyph}"
Width="16"
Height="16"/>
<TextBlock
x:Name="MemberName"
Text="{Binding SymbolName}"
Margin="0, 0, 5, 0"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel
Grid.Column="1"
Orientation="Vertical"
VerticalAlignment="Top"
HorizontalAlignment="Center"
Margin="0, 4, 0, 0"
Width="Auto">
<Button
x:Name="SelectAllButton"
x:Uid="SelectAllButton"
Padding="{StaticResource ResourceKey=ButtonControlsPadding}"
Content="{Binding ElementName=MemberSelectionControl, Path=SelectAll}"
Click="SelectAllButton_Click"
Margin="2, 2, 2, 7"
Width="Auto"
Height="Auto" />
<Button
x:Name="DeselectAllButton"
x:Uid="DeselectAllButton"
Padding="{StaticResource ResourceKey=ButtonControlsPadding}"
Content="{Binding ElementName=MemberSelectionControl, Path=DeselectAll}"
Click="DeselectAllButton_Click"
Margin="2, 2, 2, 7"
Width="Auto"
Height="Auto" />
<Button
x:Name="SelectDependentsButton"
x:Uid="SelectDependentsButton"
Padding="{StaticResource ResourceKey=ButtonControlsPadding}"
Content="{Binding ElementName=MemberSelectionControl, Path=SelectDependents}"
Click="SelectDependentsButton_Click"
Margin="2, 2, 2, 7"
Width="Auto"
Height="Auto"/>
</StackPanel>
</Grid>
</UserControl>