Changed IsEnabled to IsReadOnly

This commit is contained in:
Matt Nadareski
2022-01-06 21:30:47 -08:00
parent 0dc7901393
commit 3972ce633d
3 changed files with 8 additions and 7 deletions

View File

@@ -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

View File

@@ -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}"/>

View File

@@ -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;