/
InspectionSettings.xaml
448 lines (439 loc) · 31 KB
/
InspectionSettings.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
<UserControl x:Class="Rubberduck.UI.Settings.InspectionSettings"
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:core="clr-namespace:System;assembly=mscorlib"
xmlns:inspections="clr-namespace:Rubberduck.Parsing.Inspections;assembly=Rubberduck.Parsing"
xmlns:settings="clr-namespace:Rubberduck.UI.Settings"
xmlns:converters="clr-namespace:Rubberduck.UI.Settings.Converters"
xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
mc:Ignorable="d"
d:DesignWidth="500"
d:DataContext="{d:DesignInstance {x:Type settings:InspectionSettingsViewModel}, IsDesignTimeCreatable=False}">
<UserControl.Resources>
<converters:CodeInspectionSeverityEnumToTextConverter x:Key="CodeInspectionSeverityEnumToText" />
<BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
<converters:SelectedItemToBooleanConverter x:Key="HasSelectedItems"/>
<BitmapImage x:Key="AddImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/plus-circle.png" />
<BitmapImage x:Key="DeleteImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/cross-script.png" />
<LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFD9F4FF" Offset="0"/>
<GradientStop Color="#FF9BDDFB" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFEEEDED" Offset="0"/>
<GradientStop Color="#FFDDDDDD" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black" />
<ObjectDataProvider x:Key="Severities"
MethodName="GetValues"
ObjectType="{x:Type core:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type Type="inspections:CodeInspectionSeverity" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<Style x:Key="PrettifyRow" TargetType="{x:Type DataGridRow}">
<Style.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Style.Resources>
<Setter Property="BorderThickness" Value="0,.5,0,0" />
<Setter Property="BorderBrush" Value="DarkGray" />
<Setter Property="Height" Value="26" />
<Setter Property="TextBlock.FontWeight" Value="Normal" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderThickness" Value="1.5" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="#adc6e5"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="LightGray"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
</MultiTrigger>
</Style.Triggers>
</Style>
<SolidColorBrush x:Key="ToolBarHorizontalBackground" Color="#FFEEF5FD"/>
<SolidColorBrush x:Key="ToolBarToggleButtonVerticalBackground" Color="#FFEEF5FD"/>
<SolidColorBrush x:Key="ToolBarButtonHover" Color="#210080FF"/>
<SolidColorBrush x:Key="ToolBarGripper" Color="#FF6D6D6D"/>
<Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="{StaticResource ToolBarToggleButtonVerticalBackground}"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,0,3,3" Background="{TemplateBinding Background}">
<Canvas Width="7" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="2,7,2,2" Height="6" HorizontalAlignment="Right">
<Path Data="M 1.5 1 L 1.5 6" Stroke="White"/>
<Path Data="M 0.5 0 L 0.5 5" Stroke="{TemplateBinding Foreground}"/>
<Path Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" Fill="White"/>
<Path Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" Fill="{TemplateBinding Foreground}"/>
</Canvas>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{StaticResource ToolBarGripper}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<SolidColorBrush x:Key="ToolBarVerticalBackground" Color="#FFEEF5FD"/>
<SolidColorBrush x:Key="ToolBarToggleButtonHorizontalBackground" Color="#FFEEF5FD"/>
<Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="{StaticResource ToolBarToggleButtonHorizontalBackground}"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,3,3,0" Background="{TemplateBinding Background}">
<Canvas Width="6" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="7,2,2,2" Height="7" HorizontalAlignment="Right">
<Path Data="M 1 1.5 L 6 1.5" Stroke="White"/>
<Path Data="M 0 0.5 L 5 0.5" Stroke="{TemplateBinding Foreground}"/>
<Path Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" Fill="White"/>
<Path Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" Fill="{TemplateBinding Foreground}"/>
</Canvas>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{StaticResource ToolBarGripper}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FFB6BDC5"/>
<SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FFEEF5FD"/>
<Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}" Background="Transparent">
<Rectangle>
<Rectangle.Fill>
<DrawingBrush ViewboxUnits="Absolute" ViewportUnits="Absolute" Viewport="0,0,4,4" Viewbox="0,0,4,4" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="White" Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z"/>
<GeometryDrawing Brush="{StaticResource ToolBarGripper}" Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z"/>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Cursor" Value="SizeAll"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ToolBarMainPanelBorderStyle" TargetType="{x:Type Border}">
<Setter Property="Margin" Value="0,0,11,0"/>
<Setter Property="CornerRadius" Value="3,3,3,3"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
<Setter Property="CornerRadius" Value="0,0,0,0"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="ToolBarWithOverflowOnlyShowingWhenNeededStyle" TargetType="{x:Type ToolBar}">
<Setter Property="Background" Value="{StaticResource ToolBarHorizontalBackground}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToolBar}">
<Grid x:Name="Grid" Margin="3,1,1,1" SnapsToDevicePixels="true">
<Grid x:Name="OverflowGrid" HorizontalAlignment="Right">
<ToggleButton x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{TemplateBinding HasOverflowItems}" Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}" Visibility="{Binding ElementName=OverflowButton, Path=IsEnabled, Converter={StaticResource BoolToVisibility}}"/>
<Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom" StaysOpen="false">
<themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent">
<Border x:Name="ToolBarSubMenuBorder" BorderBrush="{StaticResource ToolBarMenuBorder}" BorderThickness="1" Background="{StaticResource ToolBarSubMenuBackground}" RenderOptions.ClearTypeHint="Enabled">
<ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" KeyboardNavigation.DirectionalNavigation="Cycle" FocusVisualStyle="{x:Null}" Focusable="true" Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle" WrapWidth="200"/>
</Border>
</themes:SystemDropShadowChrome>
</Popup>
</Grid>
<Border x:Name="MainPanelBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" Style="{StaticResource ToolBarMainPanelBorderStyle}">
<DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
<Thumb x:Name="ToolBarThumb" Margin="-3,-1,0,0" Padding="6,5,1,6" Style="{StaticResource ToolBarThumbStyle}" Width="10"/>
<ContentPresenter x:Name="ToolBarHeader" ContentSource="Header" HorizontalAlignment="Center" Margin="4,0,4,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
<ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" Margin="0,1,2,2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</DockPanel>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsOverflowOpen" Value="true">
<Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false"/>
</Trigger>
<Trigger Property="Header" Value="{x:Null}">
<Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed"/>
</Trigger>
<Trigger Property="ToolBarTray.IsLocked" Value="true">
<Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed"/>
</Trigger>
<Trigger Property="HasDropShadow" SourceName="OverflowPopup" Value="true">
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
<Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true"/>
<Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
</Trigger>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="Margin" TargetName="Grid" Value="1,3,1,1"/>
<Setter Property="Style" TargetName="OverflowButton" Value="{StaticResource ToolBarVerticalOverflowButtonStyle}"/>
<Setter Property="Height" TargetName="ToolBarThumb" Value="10"/>
<Setter Property="Width" TargetName="ToolBarThumb" Value="Auto"/>
<Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0"/>
<Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1"/>
<Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4"/>
<Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2"/>
<Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top"/>
<Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top"/>
<Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch"/>
<Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom"/>
<Setter Property="Placement" TargetName="OverflowPopup" Value="Right"/>
<Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11"/>
<Setter Property="Background" Value="{StaticResource ToolBarVerticalBackground}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="HeaderBackground" TargetType="Label">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Background" Value="DarkGray"/>
</Style>
<Style x:Key="HeaderText" TargetType="Label">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style x:Key="BorderHeader" TargetType="Border">
<Setter Property="Background" Value="DarkGray"/>
<Setter Property="CornerRadius" Value="5"/>
</Style>
<BitmapImage x:Key="FilterIcon" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/Funnel.png" />
<Style TargetType="ScrollViewer">
<Style.Setters>
<Setter Property="settings:ScrollViewerCorrector.FixScrolling" Value="True" />
</Style.Setters>
</Style>
</UserControl.Resources>
<Grid>
<ScrollViewer x:Name="ScrollViewer">
<StackPanel Margin="5,5,5,0" ScrollViewer.VerticalScrollBarVisibility="Auto">
<Border Style="{StaticResource BorderHeader}"
Margin="0,5,0,5">
<DockPanel FlowDirection="LeftToRight">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
<Label Style="{StaticResource HeaderText}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionSettings_InspectionSeveritySettingsLabel}" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Label Content="-"/>
<Image Source="{StaticResource FilterIcon}" />
<Label Style="{StaticResource HeaderText}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=InspectionSettings_FilterByDescription}" />
<TextBox MinWidth="125"
Text="{Binding InspectionSettingsDescriptionFilter, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Stretch" />
<Border Width="10" />
<Label Style="{StaticResource HeaderText}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=InspectionSettings_FilterBySeverity}" />
<ComboBox Width="100"
ItemsSource="{Binding SeverityFilters, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedSeverityFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" HorizontalAlignment="Left"
Margin="10,0,0,0">
<controls:LinkButton
Margin="2"
Command="{Binding ImportButtonCommand}"
Content="{Resx ResxName=Rubberduck.Resources.Settings.SettingsUI, Key=ImportPageSettingsButton}"/>
<controls:LinkButton
Margin="2"
Command="{Binding ExportButtonCommand}"
Content="{Resx ResxName=Rubberduck.Resources.Settings.SettingsUI, Key=ExportPageSettingsButton}"/>
</StackPanel>
</DockPanel>
</Border>
<Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="2">
<controls:GroupingGrid ItemsSource="{Binding InspectionSettings}"
AutoGenerateColumns="False"
CanUserReorderColumns="False"
IsReadOnly="False"
SelectionMode="Single"
CanUserAddRows="False"
HorizontalGridLinesBrush="Transparent"
VerticalGridLinesBrush="Transparent"
HeadersVisibility="None"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ColumnHeaderHeight="22"
BorderThickness="0"
CellEditEnding="GroupingGrid_CellEditEnding"
Height="200">
<controls:GroupingGrid.Columns>
<DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=NameLabelText}"
Width="2.75*"
IsReadOnly="True"
SortMemberPath="{Binding LocalizedName}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding LocalizedName}"
ToolTipService.ShowDuration="30000">
<TextBlock.ToolTip>
<StackPanel>
<TextBlock Text="{Binding LocalizedName}"
FontWeight="SemiBold"
MaxWidth="300"
TextWrapping="WrapWithOverflow" />
<TextBlock Text="{Binding Meta}"
MaxWidth="300"
TextWrapping="WrapWithOverflow" />
</StackPanel>
</TextBlock.ToolTip>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridComboBoxColumn Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=SeverityLabelText}"
Width="*"
ItemsSource="{Binding Source={StaticResource Severities}, Converter={StaticResource CodeInspectionSeverityEnumToText}, UpdateSourceTrigger=PropertyChanged}"
SelectedItemBinding="{Binding Path=SeverityLabel}" />
</controls:GroupingGrid.Columns>
</controls:GroupingGrid>
</Border>
<Border Style="{StaticResource BorderHeader}"
Margin="0,15,0,5">
<Label Style="{StaticResource HeaderText}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionSettings_Misc}">
</Label>
</Border>
<StackPanel>
<CheckBox IsChecked="{Binding RunInspectionsOnSuccessfulParse}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionSettings_Misc_RunInspectionsOnSuccessfulParse}" />
</StackPanel>
<Border Style="{StaticResource BorderHeader}"
Margin="0,15,0,5">
<Label Style="{StaticResource HeaderText}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionSettings_WhitelistedIdentifiersLabel}" />
</Border>
<TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionSettings_WhitelistedIdentifiersDescription}" />
<ToolBarTray IsLocked="True"
Background="Transparent">
<ToolBar Style="{DynamicResource ToolBarWithOverflowOnlyShowingWhenNeededStyle}"
Background="Transparent">
<Button ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Add}"
Click="AddNewItem"
BorderThickness="0"
Background="Transparent">
<StackPanel Orientation="Horizontal">
<Image Source="{StaticResource AddImage}" />
<TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Add}"
Margin="2,0" />
</StackPanel>
</Button>
<Button ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Remove}"
Command="{Binding DeleteWhitelistedNameCommand}"
CommandParameter="{Binding ElementName=WhitelistedIdentifiersGrid, Path=CurrentItem}"
BorderThickness="0"
Background="Transparent"
IsEnabled="{Binding ElementName=WhitelistedIdentifiersGrid, Path=SelectedItem, Converter={StaticResource HasSelectedItems}}">
<StackPanel Orientation="Horizontal">
<Image Source="{StaticResource DeleteImage}" />
<TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Remove}"
Margin="2,0" />
</StackPanel>
</Button>
</ToolBar>
</ToolBarTray>
<Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="2">
<DataGrid Name="WhitelistedIdentifiersGrid"
ItemsSource="{Binding WhitelistedIdentifierSettings}"
AutoGenerateColumns="False"
CanUserReorderColumns="False"
IsReadOnly="False"
SelectionMode="Single"
CanUserAddRows="False"
CanUserSortColumns="False"
HorizontalGridLinesBrush="Transparent"
VerticalGridLinesBrush="Transparent"
HeadersVisibility="None"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemContainerStyle="{StaticResource PrettifyRow}"
ColumnHeaderHeight="22"
BorderThickness="0"
Height="200"
CellEditEnding="WhitelistedIdentifierGrid_CellEditEnding">
<DataGrid.InputBindings>
<KeyBinding Key="Delete"
Command="{Binding DeleteWhitelistedNameCommand}"
CommandParameter="{Binding ElementName=WhitelistedIdentifiersGrid, Path=SelectedItem}" />
</DataGrid.InputBindings>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Width="*"
Binding="{Binding Identifier}" />
</DataGrid.Columns>
</DataGrid>
</Border>
</StackPanel>
</ScrollViewer>
</Grid>
</UserControl>