Browse Source

Remove reflection usage from Shape AffectsGeometry calls.

pull/3233/head
Dariusz Komosinski 7 years ago
parent
commit
57ff7b35f1
  1. 6
      src/Avalonia.Controls/Shapes/Shape.cs

6
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);
}

Loading…
Cancel
Save