Browse Source

possible solution of bug #539 -

actually ContentPresenter if not used in ContentControl was not detaching it's child from logical tree
pull/568/head
donandren 10 years ago
parent
commit
9b230ec1a0
  1. 5
      src/Avalonia.Controls/Presenters/ContentPresenter.cs

5
src/Avalonia.Controls/Presenters/ContentPresenter.cs

@ -277,6 +277,11 @@ namespace Avalonia.Controls.Presenters
Child = newChild;
if (oldChild?.LogicalParent == this)
{
((ISetLogicalParent)oldChild).SetParent(null);
}
if (newChild.Parent == null)
{
((ISetLogicalParent)newChild).SetParent((ILogical)this.TemplatedParent ?? this);

Loading…
Cancel
Save