|
7 | 7 | xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz" |
8 | 8 | xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" |
9 | 9 | xmlns:converters="clr-namespace:NETworkManager.Converters;assembly=NETworkManager.Converters" |
10 | | - xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" |
| 10 | + xmlns:controls="clr-namespace:NETworkManager.Controls;assembly=NETworkManager.Controls" |
11 | 11 | xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro" |
12 | 12 | xmlns:viewModels="clr-namespace:NETworkManager.ViewModels" |
13 | 13 | xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization" |
14 | 14 | xmlns:settings="clr-namespace:NETworkManager.Settings;assembly=NETworkManager.Settings" |
15 | 15 | xmlns:interactivity="http://schemas.microsoft.com/xaml/behaviors" |
16 | 16 | xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" |
17 | | - xmlns:controls="clr-namespace:NETworkManager.Controls" |
| 17 | + xmlns:internalControls="clr-namespace:NETworkManager.Controls" |
18 | 18 | xmlns:profiles="clr-namespace:NETworkManager.Profiles;assembly=NETworkManager.Profiles" |
| 19 | + xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" |
19 | 20 | xmlns:networkManager="clr-namespace:NETworkManager" |
20 | 21 | dialogs:DialogParticipation.Register="{Binding}" |
21 | 22 | Loaded="UserControl_Loaded" |
|
52 | 53 | <dockablz:Layout Grid.Column="0" Grid.Row="0" |
53 | 54 | Partition="{Binding InterTabPartition}"> |
54 | 55 | <dockablz:Layout.Resources> |
55 | | - <DataTemplate x:Key="TabHeaderTemplate" DataType="{x:Type controls:DragablzTabItem}"> |
| 56 | + <DataTemplate x:Key="TabHeaderTemplate" DataType="{x:Type internalControls:DragablzTabItem}"> |
56 | 57 | <Border BorderBrush="{DynamicResource MahApps.Brushes.Gray8}" BorderThickness="0,0,1,0"> |
57 | 58 | <Grid Height="32"> |
58 | 59 | <Grid.ContextMenu> |
|
560 | 561 | <Setter Property="Template"> |
561 | 562 | <Setter.Value> |
562 | 563 | <ControlTemplate> |
563 | | - <Expander IsExpanded="True" |
564 | | - Style="{StaticResource DefaultExpander}"> |
| 564 | + <controls:GroupExpander |
| 565 | + Style="{StaticResource DefaultExpander}" |
| 566 | + StateStore="{Binding Path=DataContext.GroupExpanderStateStore, RelativeSource={RelativeSource AncestorType=ListBox}}" |
| 567 | + GroupName="{Binding Path=(CollectionViewGroup.Name)}"> |
565 | 568 | <Expander.Header> |
566 | 569 | <Grid> |
567 | 570 | <Grid.ColumnDefinitions> |
568 | 571 | <ColumnDefinition Width="*" /> |
569 | 572 | <ColumnDefinition Width="10" /> |
570 | 573 | <ColumnDefinition Width="Auto" /> |
571 | 574 | </Grid.ColumnDefinitions> |
572 | | - <Rectangle Grid.Column="0" Grid.ColumnSpan="4" |
| 575 | + <Grid.ContextMenu> |
| 576 | + <ContextMenu |
| 577 | + Style="{StaticResource DefaultContextMenu}"> |
| 578 | + <MenuItem |
| 579 | + Header="{x:Static Member=localization:Strings.ExpandAll}" |
| 580 | + Command="{Binding Path=Data.(viewModels:PowerShellHostViewModel.ExpandAllProfileGroupsCommand), Source={StaticResource BindingProxy}}"> |
| 581 | + <MenuItem.Icon> |
| 582 | + <Rectangle Width="16" Height="16" |
| 583 | + Fill="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}"> |
| 584 | + <Rectangle.OpacityMask> |
| 585 | + <VisualBrush |
| 586 | + Stretch="Uniform" |
| 587 | + Visual="{iconPacks:Material Kind=PlusBoxMultipleOutline}" /> |
| 588 | + </Rectangle.OpacityMask> |
| 589 | + </Rectangle> |
| 590 | + </MenuItem.Icon> |
| 591 | + </MenuItem> |
| 592 | + <MenuItem |
| 593 | + Header="{x:Static Member=localization:Strings.CollapseAll}" |
| 594 | + Command="{Binding Path=Data.(viewModels:PowerShellHostViewModel.CollapseAllProfileGroupsCommand), Source={StaticResource BindingProxy}}"> |
| 595 | + <MenuItem.Icon> |
| 596 | + <Rectangle Width="16" Height="16" |
| 597 | + Fill="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}"> |
| 598 | + <Rectangle.OpacityMask> |
| 599 | + <VisualBrush |
| 600 | + Stretch="Uniform" |
| 601 | + Visual="{iconPacks:Material Kind=MinusBoxMultipleOutline}" /> |
| 602 | + </Rectangle.OpacityMask> |
| 603 | + </Rectangle> |
| 604 | + </MenuItem.Icon> |
| 605 | + </MenuItem> |
| 606 | + </ContextMenu> |
| 607 | + </Grid.ContextMenu> |
| 608 | + <Rectangle Grid.Column="0" Grid.ColumnSpan="3" |
573 | 609 | Fill="Transparent" /> |
574 | 610 | <TextBlock Grid.Column="0" |
575 | 611 | Text="{Binding (CollectionViewGroup.Name)}" |
|
604 | 640 | </Grid> |
605 | 641 | </Expander.Header> |
606 | 642 | <ItemsPresenter /> |
607 | | - </Expander> |
| 643 | + </controls:GroupExpander> |
608 | 644 | </ControlTemplate> |
609 | 645 | </Setter.Value> |
610 | 646 | </Setter> |
|
0 commit comments