|
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:controls="clr-namespace:NETworkManager.Controls;assembly=NETworkManager.Controls" |
10 | 11 | xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" |
11 | 12 | xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro" |
12 | 13 | xmlns:viewModels="clr-namespace:NETworkManager.ViewModels" |
13 | 14 | xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization" |
14 | 15 | xmlns:settings="clr-namespace:NETworkManager.Settings;assembly=NETworkManager.Settings" |
15 | 16 | xmlns:interactivity="http://schemas.microsoft.com/xaml/behaviors" |
16 | 17 | xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" |
17 | | - xmlns:controls="clr-namespace:NETworkManager.Controls" |
| 18 | + xmlns:internalControls="clr-namespace:NETworkManager.Controls" |
18 | 19 | xmlns:profiles="clr-namespace:NETworkManager.Profiles;assembly=NETworkManager.Profiles" |
| 20 | + xmlns:networkManager="clr-namespace:NETworkManager" |
19 | 21 | dialogs:DialogParticipation.Register="{Binding}" |
20 | 22 | Loaded="UserControl_Loaded" |
21 | 23 | mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:AWSSessionManagerHostViewModel}"> |
|
58 | 60 | <dockablz:Layout Grid.Column="0" Grid.Row="0" |
59 | 61 | Partition="{Binding InterTabPartition}"> |
60 | 62 | <dockablz:Layout.Resources> |
61 | | - <DataTemplate x:Key="TabHeaderTemplate" DataType="{x:Type controls:DragablzTabItem}"> |
| 63 | + <DataTemplate x:Key="TabHeaderTemplate" DataType="{x:Type internalControls:DragablzTabItem}"> |
62 | 64 | <Border BorderBrush="{DynamicResource MahApps.Brushes.Gray8}" BorderThickness="0,0,1,0"> |
63 | 65 | <Grid Height="32"> |
64 | 66 | <Grid.ContextMenu> |
|
605 | 607 | <Setter Property="Template"> |
606 | 608 | <Setter.Value> |
607 | 609 | <ControlTemplate> |
608 | | - <Expander IsExpanded="True" |
609 | | - Style="{StaticResource DefaultExpander}"> |
| 610 | + <controls:GroupExpander |
| 611 | + Style="{StaticResource DefaultExpander}" |
| 612 | + StateStore="{Binding Path=DataContext.GroupExpanderStateStore, RelativeSource={RelativeSource AncestorType=ListBox}}" |
| 613 | + GroupName="{Binding Path=(CollectionViewGroup.Name)}"> |
610 | 614 | <Expander.Header> |
611 | 615 | <Grid> |
612 | 616 | <Grid.ColumnDefinitions> |
613 | 617 | <ColumnDefinition Width="*" /> |
614 | 618 | <ColumnDefinition Width="10" /> |
615 | 619 | <ColumnDefinition Width="Auto" /> |
616 | 620 | </Grid.ColumnDefinitions> |
617 | | - <Rectangle Grid.Column="0" Grid.ColumnSpan="4" |
| 621 | + <Grid.ContextMenu> |
| 622 | + <ContextMenu |
| 623 | + Style="{StaticResource DefaultContextMenu}"> |
| 624 | + <MenuItem |
| 625 | + Header="{x:Static Member=localization:Strings.ExpandAll}" |
| 626 | + Command="{Binding Path=Data.(viewModels:AWSSessionManagerHostViewModel.ExpandAllProfileGroupsCommand), Source={StaticResource BindingProxy}}"> |
| 627 | + <MenuItem.Icon> |
| 628 | + <Rectangle Width="16" Height="16" |
| 629 | + Fill="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}"> |
| 630 | + <Rectangle.OpacityMask> |
| 631 | + <VisualBrush |
| 632 | + Stretch="Uniform" |
| 633 | + Visual="{iconPacks:Material Kind=PlusBoxMultipleOutline}" /> |
| 634 | + </Rectangle.OpacityMask> |
| 635 | + </Rectangle> |
| 636 | + </MenuItem.Icon> |
| 637 | + </MenuItem> |
| 638 | + <MenuItem |
| 639 | + Header="{x:Static Member=localization:Strings.CollapseAll}" |
| 640 | + Command="{Binding Path=Data.(viewModels:AWSSessionManagerHostViewModel.CollapseAllProfileGroupsCommand), Source={StaticResource BindingProxy}}"> |
| 641 | + <MenuItem.Icon> |
| 642 | + <Rectangle Width="16" Height="16" |
| 643 | + Fill="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}"> |
| 644 | + <Rectangle.OpacityMask> |
| 645 | + <VisualBrush |
| 646 | + Stretch="Uniform" |
| 647 | + Visual="{iconPacks:Material Kind=MinusBoxMultipleOutline}" /> |
| 648 | + </Rectangle.OpacityMask> |
| 649 | + </Rectangle> |
| 650 | + </MenuItem.Icon> |
| 651 | + </MenuItem> |
| 652 | + </ContextMenu> |
| 653 | + </Grid.ContextMenu> |
| 654 | + <Rectangle Grid.Column="0" Grid.ColumnSpan="3" |
618 | 655 | Fill="Transparent" /> |
619 | 656 | <TextBlock Grid.Column="0" |
620 | 657 | Text="{Binding (CollectionViewGroup.Name)}" |
|
681 | 718 | </Grid> |
682 | 719 | </Expander.Header> |
683 | 720 | <ItemsPresenter /> |
684 | | - </Expander> |
| 721 | + </controls:GroupExpander> |
685 | 722 | </ControlTemplate> |
686 | 723 | </Setter.Value> |
687 | 724 | </Setter> |
|
859 | 896 | <!-- Unlock profile button --> |
860 | 897 | <Button HorizontalAlignment="Center" VerticalAlignment="Center" |
861 | 898 | Focusable="False" |
862 | | - Command="{Binding UnlockProfileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type mah:MetroWindow}}}" |
| 899 | + Command="{Binding Path=(networkManager:MainWindow.UnlockProfileCommand), RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type TypeName=mah:MetroWindow}}}" |
863 | 900 | Style="{StaticResource CleanButton}" |
864 | 901 | Visibility="{Binding Source={x:Static Member=settings:ConfigurationManager.Current}, Path=ProfileManagerShowUnlock, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"> |
865 | 902 | <Grid> |
|
0 commit comments