From 0162dbf3bb88a5fd43ae4439bb2ba51ccb34c940 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Sat, 15 Jul 2023 17:52:59 +0100 Subject: [PATCH] Make channel selection input more responsive --- .../UI/Elements/Menu/Pages/BehaviourPage.xaml | 2 +- .../UI/Elements/Menu/Pages/BehaviourPage.xaml.cs | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml index 9d118b28..50c85ca7 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml @@ -42,7 +42,7 @@ - + diff --git a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs index db864e10..736197b7 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs @@ -17,21 +17,5 @@ public BehaviourPage() DataContext = new BehaviourViewModel(); InitializeComponent(); } - - // https://stackoverflow.com/a/13289118/11852173 - // yes this doesnt fully conform to xaml but whatever - private void ComboBox_KeyEnterUpdate(object sender, KeyEventArgs e) - { - if (e.Key == Key.Enter) - { - ComboBox box = (ComboBox)sender; - DependencyProperty prop = ComboBox.TextProperty; - - BindingExpression binding = BindingOperations.GetBindingExpression(box, prop); - - if (binding is not null) - binding.UpdateSource(); - } - } } }