diff --git a/src/Avalonia.Controls/Shapes/Shape.cs b/src/Avalonia.Controls/Shapes/Shape.cs index 499dfb5320..1e5cdc9744 100644 --- a/src/Avalonia.Controls/Shapes/Shape.cs +++ b/src/Avalonia.Controls/Shapes/Shape.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See licence.md file in the project root for full license information. using System; -using System.Reflection; using Avalonia.Collections; using Avalonia.Media; @@ -166,10 +165,7 @@ namespace Avalonia.Controls.Shapes { property.Changed.Subscribe(e => { - var senderType = e.Sender.GetType().GetTypeInfo(); - var affectedType = typeof(TShape).GetTypeInfo(); - - if (affectedType.IsAssignableFrom(senderType)) + if (e.Sender is TShape) { AffectsGeometryInvalidate(e); }