From 8bfddb64a872bf863e4d65e7b5e65b935a4442f2 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 3 Feb 2015 02:10:18 +0100 Subject: [PATCH] Set logical parent before visual parent in Panel. Otherwise the Descendent styling selector won't find the control. --- Perspex.Controls/Panel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Perspex.Controls/Panel.cs b/Perspex.Controls/Panel.cs index a001cc5797..bd4033e1e9 100644 --- a/Perspex.Controls/Panel.cs +++ b/Perspex.Controls/Panel.cs @@ -98,8 +98,8 @@ namespace Perspex.Controls switch (e.Action) { case NotifyCollectionChangedAction.Add: - this.AddVisualChildren(e.NewItems.OfType()); this.SetLogicalParent(e.NewItems.OfType()); + this.AddVisualChildren(e.NewItems.OfType()); break; case NotifyCollectionChangedAction.Remove: