Docking Tab for WinForms | ComponentOne
Docking Operations / Restrict Specific Tabs
In This Topic
    Restrict Specific Tabs
    In This Topic

    You can add a handler to the SelectedIndexChanging event to test whether the index of the page is the page that you don't want the user to switch to. If so, e.Cancel would be set to True. For example, the following code shows how to add a handler to the SelectedIndexChanging event:

    C#
    Copy Code
    private void c1DockingTab1_SelectedIndexChanging(object sender, C1.Win.Command.SelectedIndexChangingEventArgs e)
            {
                if (e.NewIndex == 1 && e.CanCancel)
                    e.Cancel = true;
            }