DockControl for WPF Task-Based Help > How to Disable Certain Dock Positions > Conditional Docking |
To perform conditional docking on a specific C1DockTabControl or C1DockTabItem, you can use the Source and Target properties. For example, to disable the docking of c1DockTabItem1 inside c1DockTabControl2, write the following code.
XAML |
Copy Code
|
---|---|
private void dockControl1_PickerLoading(object sender, PickerLoadingEventArgs e) { if (e.Source == c1DockTabItem1 && e.Target == c1DockTabControl2) { // disable all docking e.ShowBottomInnerPart = false; e.ShowLeftInnerPart = false; e.ShowRightInnerPart = false; e.ShowTopInnerPart = false; e.ShowOverInnerPart = false; } } |