Browse Source

don't reset data template on attached to visual tree, but on attached to logical tree

pull/1928/head
Andrey Kunchev 7 years ago
parent
commit
f1622f4802
  1. 8
      src/Avalonia.Controls/Presenters/ContentPresenter.cs

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

@ -197,13 +197,6 @@ namespace Avalonia.Controls.Presenters
}
}
/// <inheritdoc/>
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
base.OnAttachedToVisualTree(e);
_dataTemplate = null;
}
/// <summary>
/// Updates the <see cref="Child"/> control based on the control's <see cref="Content"/>.
/// </summary>
@ -268,6 +261,7 @@ namespace Avalonia.Controls.Presenters
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
{
base.OnAttachedToLogicalTree(e);
_dataTemplate = null;
_createdChild = false;
InvalidateMeasure();
}

Loading…
Cancel
Save