diff --git a/CHANGELIST.md b/CHANGELIST.md index 6ba2223e..06e933b0 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -33,6 +33,7 @@ - Tweak minimalized layout a bit more - Add tab setting - Further disc info window tweaks +- Changed IsEnabled to IsReadOnly ### 2.2 (2021-12-30) - Fix Saturn header finding diff --git a/MPF/UserControls/UserInput.xaml b/MPF/UserControls/UserInput.xaml index bfbe188a..d31a075d 100644 --- a/MPF/UserControls/UserInput.xaml +++ b/MPF/UserControls/UserInput.xaml @@ -22,7 +22,7 @@ AcceptsTab="{Binding ElementName=userInput, Path=Tab}" AcceptsReturn="{Binding ElementName=userInput, Path=Enter}" TextWrapping="{Binding ElementName=userInput, Path=TextWrapping}" - IsEnabled="{Binding ElementName=userInput, Path=IsEnabled}" + IsReadOnly="{Binding ElementName=userInput, Path=IsEnabled}" VerticalContentAlignment="{Binding ElementName=userInput, Path=VerticalContentAlignmentValue}" HorizontalScrollBarVisibility="{Binding ElementName=userInput, Path=HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{Binding ElementName=userInput, Path=VerticalScrollBarVisibility}"/> diff --git a/MPF/UserControls/UserInput.xaml.cs b/MPF/UserControls/UserInput.xaml.cs index 37abef3c..7ca7328e 100644 --- a/MPF/UserControls/UserInput.xaml.cs +++ b/MPF/UserControls/UserInput.xaml.cs @@ -28,8 +28,8 @@ namespace MPF.UserControls public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register("TextWrapping", typeof(TextWrapping), typeof(UserInput)); - public static readonly DependencyProperty IsEnabledProperty = - DependencyProperty.Register("IsEnabledValue", typeof(bool), typeof(UserInput)); + public static readonly DependencyProperty IsReadOnlyProperty = + DependencyProperty.Register("IsReadOnly", typeof(bool), typeof(UserInput)); public static readonly DependencyProperty VerticalContentAlignmentValueProperty = DependencyProperty.Register("VerticalContentAlignmentValue", typeof(VerticalAlignment), typeof(UserInput)); @@ -80,10 +80,10 @@ namespace MPF.UserControls set => SetValue(TextWrappingProperty, value); } - public bool IsEnabledValue + public bool IsReadOnly { - get => (bool)GetValue(IsEnabledProperty); - set => SetValue(IsEnabledProperty, value); + get => (bool)GetValue(IsReadOnlyProperty); + set => SetValue(IsReadOnlyProperty, value); } public VerticalAlignment VerticalContentAlignmentValue @@ -114,7 +114,7 @@ namespace MPF.UserControls Tab = false; Enter = false; TextWrapping = TextWrapping.NoWrap; - IsEnabledValue = true; + IsReadOnly = false; VerticalContentAlignmentValue = VerticalAlignment.Center; HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; VerticalScrollBarVisibility = ScrollBarVisibility.Auto;