Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

How to Set DocMode for Specific C1DockTabItem in C1DockingTab for WPF

Background:

Setting DockMode for specific C1DockTabItems can be achieved by setting the property of the parent.

Steps to Complete:

private void Button_Click(object sender, RoutedEventArgs e)
{
	var parent = tab1.Parent as C1DockTabControl;
	if (parent != null)
	{
		if (parent.Items.Count == 1)
		{
			parent.DockMode = DockMode.Sliding;
		}
		else
		{
			parent.Items.Remove(tab1);
			C1DockTabControl newDockTabCtrl = new C1DockTabControl();
			c1DockTabControl.Items.Add(newDockTabCtrl);
			newDockTabCtrl.Items.Add(tab1);
			newDockTabCtrl.DockMode = DockMode.Sliding:
		}
	}
}

Get the Latest Version of WPF Edition
Download the Free Trial Now