From d58681430883d03a4007ba5a97e43832a3abce35 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Tue, 4 May 2021 13:49:38 +0200 Subject: [PATCH 01/17] [FZ Editor] Replace ItemsControls with GridViews (#11066) * LayoutItemsControl to GridView * ContextMenu * Added contextmenu items * Context menu keyboard support Co-authored-by: Niels Laute --- .../editor/FancyZonesEditor/App.xaml | 14 +- .../editor/FancyZonesEditor/MainWindow.xaml | 322 ++++++++--------- .../FancyZonesEditor/MainWindow.xaml.cs | 43 +-- .../Properties/Resources.Designer.cs | 2 +- .../Properties/Resources.resx | 8 +- .../Styles/GridViewStyles.xaml | 337 ++++++++++++++++++ 6 files changed, 500 insertions(+), 226 deletions(-) create mode 100644 src/modules/fancyzones/editor/FancyZonesEditor/Styles/GridViewStyles.xaml diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/App.xaml b/src/modules/fancyzones/editor/FancyZonesEditor/App.xaml index c372a74c8b..bb3c1abe77 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/App.xaml +++ b/src/modules/fancyzones/editor/FancyZonesEditor/App.xaml @@ -10,21 +10,9 @@ + - - diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml b/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml index 5d1228ae74..19986b3839 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml +++ b/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml @@ -31,48 +31,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + AutomationProperties.HelpText="{Binding Index}"> @@ -94,7 +100,7 @@ FontWeight="SemiBold" HorizontalAlignment="Center" VerticalAlignment="Center" - Foreground="{DynamicResource PrimaryForegroundBrush}" /> + Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}}" /> + Opacity="0.6" + Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}}" /> - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +