Skip to content

Commit

Permalink
Using "is" pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Mar 22, 2023
1 parent 412e67a commit 1d45c75
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,7 @@ private static object ShowValidationAdornerOperation(object arg)

private static void ShowValidationAdornerWhenAdornerSiteGetsVisible(object sender, DependencyPropertyChangedEventArgs e)
{
var adornerSite = sender as UIElement;

if (adornerSite == null)
if (!(sender is UIElement adornerSite))
{
return;
}
Expand Down

0 comments on commit 1d45c75

Please sign in to comment.