Browse Source

Changed pattern matching

flabbet 4 years ago
parent
commit
48d8416a2a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      PixiEditor/Helpers/Behaviours/TextBoxFocusBehavior.cs

+ 1 - 1
PixiEditor/Helpers/Behaviours/TextBoxFocusBehavior.cs

@@ -60,7 +60,7 @@ namespace PixiEditor.Helpers.Behaviours
         private void RemoveFocus()
         {
             FrameworkElement parent = (FrameworkElement)AssociatedObject.Parent;
-            while (parent != null && parent is IInputElement && !((IInputElement)parent).Focusable)
+            while (parent != null && parent is IInputElement element && !element.Focusable)
             {
                 parent = (FrameworkElement)parent.Parent;
             }