The DockingManager's DocumentContainer contains an innerPanel named PART_ContentPanelInnerBorder. How would I remove/hide it without replacing the whole control template?
|
var tabcontrol = VisualUtils.FindDescendant(sender as Visual, typeof(DocumentTabControl)) as DocumentTabControl;
if(tabcontrol!=null)
{
var Innerborder = tabcontrol.Template.FindName("PART_ContentPanelInnerBorder", tabcontrol) as Border;
Innerborder.BorderThickness = new Thickness(0);
}
|
Hi Bahtathi!
Thanks for the suggestion.
However, whenever all the tab items are closed (assuming the default DocumentContainer is closed), and opening again a tab item the (where a new DocumentContainer is created)
(PART_DockingManager.DocContainer as DocumentContainer).Loaded += DocumentContainer_Loaded is not firing again.
Hi Mr Avrohom Singer,
We
have updated the sample to address the scenario where the
DocumentContainer.Loaded event does not fire after all tab items are closed and
a new tab item is created.
Instead, we now use the ActiveDocumentChanged event of the DockingManager to dynamically attach the Loaded event to the newly created DocumentTabControl, ensuring the inner border (PART_ContentPanelInnerBorder) is consistently removed by setting its BorderThickness to 0.
Please check the attached modified sample and demo video and let us know if you have any further questions.
Regards,
Karthick Arjunan