From a959b205ce7f24a7813c14c0c2523a1c1d96b970 Mon Sep 17 00:00:00 2001 From: Bret Johnson Date: Thu, 17 Mar 2022 00:29:16 -0400 Subject: Revert "Use PreviewKeyDown for Ctrl+Space to show menu" This reverts commit a2e92bf834987d6e428c53cf8db31a93c04a3151. --- Xamarin.PropertyEditing.Windows/PropertyPresenter.cs | 18 ------------------ Xamarin.PropertyEditing.Windows/Themes/Resources.xaml | 5 ++++- 2 files changed, 4 insertions(+), 19 deletions(-) mode change 100644 => 100755 Xamarin.PropertyEditing.Windows/PropertyPresenter.cs diff --git a/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs b/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs old mode 100644 new mode 100755 index af7dbbc..4cf1813 --- a/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs +++ b/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs @@ -6,7 +6,6 @@ using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Input; using System.Windows.Media; using Xamarin.PropertyEditing.ViewModels; @@ -113,11 +112,6 @@ namespace Xamarin.PropertyEditing.Windows this.variationRow = (RowDefinition) GetTemplateChild ("variationRow"); this.variationsList = GetTemplateChild ("variationsList") as ItemsControl; - - this.propertyButton = (PropertyButton) GetTemplateChild ("propertyButton"); - - this.propertyContainer = (Border) GetTemplateChild ("propertyContainer"); - this.propertyContainer.AddHandler (Border.PreviewKeyDownEvent, new KeyEventHandler (PropertyContainer_PreviewKeyDown)); } protected override AutomationPeer OnCreateAutomationPeer () @@ -161,22 +155,10 @@ namespace Xamarin.PropertyEditing.Windows } } - private void PropertyContainer_PreviewKeyDown (object sender, KeyEventArgs e) - { - var isModifierControl = Keyboard.Modifiers == ModifierKeys.Control; - - if (e.Key == Key.Space && isModifierControl) { - propertyButton.ShowMenu (); - e.Handled = true; - } - } - private PropertyViewModel pvm; private ButtonBase addButton, removeButton; private RowDefinition variationRow; private ItemsControl variationsList; - private Border propertyContainer; - private PropertyButton propertyButton; private void OnLoaded (object sender, RoutedEventArgs e) { diff --git a/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml b/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml index cafc4c0..2b0938e 100644 --- a/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml +++ b/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml @@ -1708,7 +1708,10 @@ - + + + + -- cgit v1.2.3