From cfc0236b560a15e07bb1ebaaeaa072da028a809f Mon Sep 17 00:00:00 2001 From: Adam Dernis Date: Fri, 18 Oct 2024 10:16:12 -0400 Subject: [PATCH] Disabled Row Count Setting when Location is Right or Left --- .../Converters/EdgeIsHorizontalConverter.cs | 21 +++++++++++++++++++ RetroBar/PropertiesWindow.xaml | 19 +++++++++-------- 2 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 RetroBar/Converters/EdgeIsHorizontalConverter.cs diff --git a/RetroBar/Converters/EdgeIsHorizontalConverter.cs b/RetroBar/Converters/EdgeIsHorizontalConverter.cs new file mode 100644 index 00000000..6857d921 --- /dev/null +++ b/RetroBar/Converters/EdgeIsHorizontalConverter.cs @@ -0,0 +1,21 @@ +using ManagedShell.AppBar; +using RetroBar.Utilities; +using System.Windows.Data; +using System; + +namespace RetroBar.Converters +{ + [ValueConversion(typeof(AppBarEdge), typeof(bool))] + public class EdgeIsHorizontalConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + return Settings.Instance.Edge is AppBarEdge.Top or AppBarEdge.Bottom; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/RetroBar/PropertiesWindow.xaml b/RetroBar/PropertiesWindow.xaml index 6548c132..c25dbe8f 100644 --- a/RetroBar/PropertiesWindow.xaml +++ b/RetroBar/PropertiesWindow.xaml @@ -23,6 +23,7 @@ +