Skip to content

Commit 4f3bbd1

Browse files
Update Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar/TextToolbar.Events.cs
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
1 parent 16d8ac0 commit 4f3bbd1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar/TextToolbar.Events.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ private static void OnEditorChanged(DependencyObject obj, DependencyPropertyChan
6767
/// <param name="args">Property Changed Args</param>
6868
private static void OnFormatterChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
6969
{
70-
var bar = obj as TextToolbar;
71-
if (bar != null && bar.Formatter != null)
70+
if (obj is TextToolbar bar && bar.Formatter != null)
7271
{
7372
if (args.OldValue is Formatter formatter)
7473
{
@@ -316,4 +315,4 @@ public bool ShiftKeyDown
316315
/// </summary>
317316
public event EventHandler<EditorChangedArgs> EditorChanged;
318317
}
319-
}
318+
}

0 commit comments

Comments
 (0)