You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or I think LayoutItem.View should not create ContentPresenter and add an override function OnApplyTemplate() of LayoutItem like below.
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
// Template should have ContentPresenter with a name of PART_Content
_view= Template.FindName("PART_Content", this) as ContentPresenter;
LayoutElement.Root.Manager?.InternalAddLogicalChild(_view);
}
The text was updated successfully, but these errors were encountered:
Mona04
changed the title
DockingManager.LayoutItemTemplateSelector send item with ContentPresenter
Why a layout item of DockingManager is in Content of ContentPresenter of ContentPresenter?
Feb 3, 2023
Mona04
changed the title
Why a layout item of DockingManager is in Content of ContentPresenter of ContentPresenter?
DockingManager.LayoutItemTemplateSelector is applied twice.
Feb 3, 2023
Mona04
changed the title
DockingManager.LayoutItemTemplateSelector is applied twice.
DockingManager.LayoutItemTemplateSelector is applied twice because...
Feb 3, 2023
Mona04
added a commit
to Mona04/AvalonDock
that referenced
this issue
Feb 3, 2023
The
TemplateSelector
which is bind toDockingManager.LayoutItemTemplateSelector
hasSelectTemplate()
like below.When it is first fired,
item
isContentPresenter
andcontainer
has inContent
otherContentPresenter
which has an actual item inContent
.When second, it worked as expected.
I think it is because of line 763 in
generic.xaml
.Or I think
LayoutItem.View
should not createContentPresenter
and add an override functionOnApplyTemplate()
ofLayoutItem
like below.and
generic.xaml
is revised like below.The text was updated successfully, but these errors were encountered: