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:
}
}
}
Tags:
Ruchir Agarwal