Browse Source

Set logical parent before visual parent in Panel.

Otherwise the Descendent styling selector won't find the control.
pull/39/head
Steven Kirk 11 years ago
parent
commit
8bfddb64a8
  1. 2
      Perspex.Controls/Panel.cs

2
Perspex.Controls/Panel.cs

@ -98,8 +98,8 @@ namespace Perspex.Controls
switch (e.Action)
{
case NotifyCollectionChangedAction.Add:
this.AddVisualChildren(e.NewItems.OfType<Visual>());
this.SetLogicalParent(e.NewItems.OfType<Control>());
this.AddVisualChildren(e.NewItems.OfType<Visual>());
break;
case NotifyCollectionChangedAction.Remove:

Loading…
Cancel
Save