|
275 | 275 | </Style>
|
276 | 276 | </Label.Style>
|
277 | 277 | </Label>
|
278 |
| - <controls:GroupingGrid ItemsSource="{Binding InspectionSettings}" |
279 |
| - AutoGenerateColumns="False" |
280 |
| - CanUserReorderColumns="False" |
281 |
| - IsReadOnly="False" |
282 |
| - SelectionMode="Single" |
283 |
| - CanUserAddRows="False" |
284 |
| - HorizontalGridLinesBrush="Transparent" |
285 |
| - VerticalGridLinesBrush="Transparent" |
286 |
| - HeadersVisibility="None" |
287 |
| - ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
288 |
| - ColumnHeaderHeight="22" |
289 |
| - BorderThickness="0" |
290 |
| - CellEditEnding="GroupingGrid_CellEditEnding" |
291 |
| - MaxHeight="200"> |
292 |
| - <controls:GroupingGrid.Columns> |
293 |
| - <DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=NameLabelText}" |
294 |
| - Width="2.75*" |
295 |
| - IsReadOnly="True" |
296 |
| - SortMemberPath="{Binding LocalizedName}"> |
297 |
| - <DataGridTemplateColumn.CellTemplate> |
298 |
| - <DataTemplate> |
299 |
| - <TextBlock Text="{Binding LocalizedName}"> |
300 |
| - <TextBlock.ToolTip> |
301 |
| - <StackPanel> |
302 |
| - <TextBlock Text="{Binding LocalizedName}" |
303 |
| - FontWeight="SemiBold" |
304 |
| - MaxWidth="300" |
305 |
| - TextWrapping="WrapWithOverflow" /> |
306 |
| - <TextBlock Text="{Binding Meta}" |
307 |
| - MaxWidth="300" |
308 |
| - TextWrapping="WrapWithOverflow" /> |
309 |
| - </StackPanel> |
310 |
| - </TextBlock.ToolTip> |
311 |
| - </TextBlock> |
312 |
| - </DataTemplate> |
313 |
| - </DataGridTemplateColumn.CellTemplate> |
314 |
| - </DataGridTemplateColumn> |
315 |
| - <DataGridComboBoxColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SeverityLabelText}" |
316 |
| - Width="*" |
317 |
| - ItemsSource="{Binding Source={StaticResource Severities}, Converter={StaticResource CodeInspectionSeverityEnumToText}, UpdateSourceTrigger=PropertyChanged}" |
318 |
| - SelectedItemBinding="{Binding Path=SeverityLabel}" /> |
319 |
| - </controls:GroupingGrid.Columns> |
320 |
| - </controls:GroupingGrid> |
| 278 | + <Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="2"> |
| 279 | + <controls:GroupingGrid ItemsSource="{Binding InspectionSettings}" |
| 280 | + AutoGenerateColumns="False" |
| 281 | + CanUserReorderColumns="False" |
| 282 | + IsReadOnly="False" |
| 283 | + SelectionMode="Single" |
| 284 | + CanUserAddRows="False" |
| 285 | + HorizontalGridLinesBrush="Transparent" |
| 286 | + VerticalGridLinesBrush="Transparent" |
| 287 | + HeadersVisibility="None" |
| 288 | + ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 289 | + ColumnHeaderHeight="22" |
| 290 | + BorderThickness="0" |
| 291 | + CellEditEnding="GroupingGrid_CellEditEnding" |
| 292 | + Height="200"> |
| 293 | + <controls:GroupingGrid.Columns> |
| 294 | + <DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=NameLabelText}" |
| 295 | + Width="2.75*" |
| 296 | + IsReadOnly="True" |
| 297 | + SortMemberPath="{Binding LocalizedName}"> |
| 298 | + <DataGridTemplateColumn.CellTemplate> |
| 299 | + <DataTemplate> |
| 300 | + <TextBlock Text="{Binding LocalizedName}"> |
| 301 | + <TextBlock.ToolTip> |
| 302 | + <StackPanel> |
| 303 | + <TextBlock Text="{Binding LocalizedName}" |
| 304 | + FontWeight="SemiBold" |
| 305 | + MaxWidth="300" |
| 306 | + TextWrapping="WrapWithOverflow" /> |
| 307 | + <TextBlock Text="{Binding Meta}" |
| 308 | + MaxWidth="300" |
| 309 | + TextWrapping="WrapWithOverflow" /> |
| 310 | + </StackPanel> |
| 311 | + </TextBlock.ToolTip> |
| 312 | + </TextBlock> |
| 313 | + </DataTemplate> |
| 314 | + </DataGridTemplateColumn.CellTemplate> |
| 315 | + </DataGridTemplateColumn> |
| 316 | + <DataGridComboBoxColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SeverityLabelText}" |
| 317 | + Width="*" |
| 318 | + ItemsSource="{Binding Source={StaticResource Severities}, Converter={StaticResource CodeInspectionSeverityEnumToText}, UpdateSourceTrigger=PropertyChanged}" |
| 319 | + SelectedItemBinding="{Binding Path=SeverityLabel}" /> |
| 320 | + </controls:GroupingGrid.Columns> |
| 321 | + </controls:GroupingGrid> |
| 322 | + </Border> |
| 323 | + <Label Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeInspectionSettings_WhitelistedNamesLabel}" |
| 324 | + FontWeight="SemiBold" |
| 325 | + Margin="0,5,0,0" /> |
321 | 326 | <ToolBarTray IsLocked="True"
|
322 |
| - Background="Transparent" |
323 |
| - Margin="0,5,0,0"> |
| 327 | + Background="Transparent"> |
324 | 328 | <ToolBar Style="{DynamicResource ToolBarWithOverflowOnlyShowingWhenNeededStyle}"
|
325 | 329 | Background="Transparent">
|
326 | 330 | <Button ToolTip="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Add}"
|
|
335 | 339 | </Button>
|
336 | 340 | <Button ToolTip="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Remove}"
|
337 | 341 | Command="{Binding DeleteWhitelistedNameCommand}"
|
338 |
| - CommandParameter="{Binding ElementName=TodoMarkerGrid, Path=CurrentItem}" |
| 342 | + CommandParameter="{Binding ElementName=WhitelistedNamesGrid, Path=CurrentItem}" |
339 | 343 | BorderThickness="0"
|
340 | 344 | Background="Transparent"
|
341 |
| - IsEnabled="{Binding ElementName=TodoMarkerGrid, Path=SelectedItem, Converter={StaticResource HasSelectedItems}}"> |
| 345 | + IsEnabled="{Binding ElementName=WhitelistedNamesGrid, Path=SelectedItem, Converter={StaticResource HasSelectedItems}}"> |
342 | 346 | <StackPanel Orientation="Horizontal">
|
343 | 347 | <Image Source="{StaticResource DeleteImage}" />
|
344 | 348 | <TextBlock Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Remove}"
|
|
347 | 351 | </Button>
|
348 | 352 | </ToolBar>
|
349 | 353 | </ToolBarTray>
|
350 |
| - <DataGrid Name="WhitelistedNamesGrid" |
351 |
| - ItemsSource="{Binding WhitelistedNameSettings}" |
352 |
| - AutoGenerateColumns="False" |
353 |
| - CanUserReorderColumns="False" |
354 |
| - IsReadOnly="False" |
355 |
| - SelectionMode="Single" |
356 |
| - CanUserAddRows="False" |
357 |
| - CanUserSortColumns="False" |
358 |
| - HorizontalGridLinesBrush="Transparent" |
359 |
| - VerticalGridLinesBrush="Transparent" |
360 |
| - HeadersVisibility="Column" |
361 |
| - ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
362 |
| - ItemContainerStyle="{StaticResource PrettifyRow}" |
363 |
| - ColumnHeaderHeight="22" |
364 |
| - BorderThickness="0"> |
365 |
| - <DataGrid.InputBindings> |
366 |
| - <KeyBinding Key="Delete" |
367 |
| - Command="{Binding DeleteWhitelistedNameCommand}" |
368 |
| - CommandParameter="{Binding ElementName=WhitelistedNamesGrid, Path=SelectedItem}" /> |
369 |
| - </DataGrid.InputBindings> |
370 |
| - <DataGrid.CellStyle> |
371 |
| - <Style TargetType="{x:Type DataGridCell}"> |
372 |
| - <Setter Property="BorderThickness" Value="0" /> |
373 |
| - <Setter Property="VerticalAlignment" Value="Center" /> |
374 |
| - <Setter Property="Background" Value="Transparent" /> |
375 |
| - </Style> |
376 |
| - </DataGrid.CellStyle> |
377 |
| - <DataGrid.Columns> |
378 |
| - <DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeInspectionSettings_WhitelistedNamesLabel}" |
379 |
| - Width="*" |
380 |
| - Binding="{Binding Name}" |
381 |
| - SortDirection="Ascending" /> |
382 |
| - </DataGrid.Columns> |
383 |
| - </DataGrid> |
| 354 | + <Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="2"> |
| 355 | + <DataGrid Name="WhitelistedNamesGrid" |
| 356 | + ItemsSource="{Binding WhitelistedNameSettings}" |
| 357 | + AutoGenerateColumns="False" |
| 358 | + CanUserReorderColumns="False" |
| 359 | + IsReadOnly="False" |
| 360 | + SelectionMode="Single" |
| 361 | + CanUserAddRows="False" |
| 362 | + CanUserSortColumns="False" |
| 363 | + HorizontalGridLinesBrush="Transparent" |
| 364 | + VerticalGridLinesBrush="Transparent" |
| 365 | + HeadersVisibility="None" |
| 366 | + ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 367 | + ItemContainerStyle="{StaticResource PrettifyRow}" |
| 368 | + ColumnHeaderHeight="22" |
| 369 | + BorderThickness="0" |
| 370 | + Height="200"> |
| 371 | + <DataGrid.InputBindings> |
| 372 | + <KeyBinding Key="Delete" |
| 373 | + Command="{Binding DeleteWhitelistedNameCommand}" |
| 374 | + CommandParameter="{Binding ElementName=WhitelistedNamesGrid, Path=SelectedItem}" /> |
| 375 | + </DataGrid.InputBindings> |
| 376 | + <DataGrid.CellStyle> |
| 377 | + <Style TargetType="{x:Type DataGridCell}"> |
| 378 | + <Setter Property="BorderThickness" Value="0" /> |
| 379 | + <Setter Property="VerticalAlignment" Value="Center" /> |
| 380 | + <Setter Property="Background" Value="Transparent" /> |
| 381 | + </Style> |
| 382 | + </DataGrid.CellStyle> |
| 383 | + <DataGrid.Columns> |
| 384 | + <DataGridTextColumn Width="*" |
| 385 | + Binding="{Binding Name}" /> |
| 386 | + </DataGrid.Columns> |
| 387 | + </DataGrid> |
| 388 | + </Border> |
384 | 389 | </StackPanel>
|
385 | 390 | </ScrollViewer>
|
386 | 391 | </Grid>
|
|
0 commit comments