File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/MaterialDesignThemes.Wpf/Behaviors Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ public class TextBoxLineCountBehavior : Behavior<TextBox>
12
12
13
13
private void UpdateAttachedProperties ( )
14
14
{
15
- if ( AssociatedObject != null )
15
+ if ( AssociatedObject is { } associatedObject )
16
16
{
17
- AssociatedObject . SetCurrentValue ( TextFieldAssist . TextBoxLineCountProperty , AssociatedObject . LineCount ) ;
18
- AssociatedObject . SetCurrentValue ( TextFieldAssist . TextBoxIsMultiLineProperty , AssociatedObject . LineCount > 1 ) ;
17
+ associatedObject . SetCurrentValue ( TextFieldAssist . TextBoxLineCountProperty , associatedObject . LineCount ) ;
18
+ associatedObject . SetCurrentValue ( TextFieldAssist . TextBoxIsMultiLineProperty , associatedObject . LineCount > 1 ) ;
19
19
}
20
20
}
21
21
You can’t perform that action at this time.
0 commit comments