Browse Source

Don't test tree view item type by comparing GetType().

Fixes #2971.
pull/3050/head
Steven Kirk 7 years ago
parent
commit
a830d5b2d4
  1. 2
      src/Avalonia.Controls/TreeViewItem.cs

2
src/Avalonia.Controls/TreeViewItem.cs

@ -173,7 +173,7 @@ namespace Avalonia.Controls
{
var result = 0;
while (logical != null && logical.GetType() != typeof(T))
while (logical != null && !(logical is T))
{
++result;
logical = logical.LogicalParent;

Loading…
Cancel
Save