Skip to main content
Bar

TabFormControlBase.OuterFormCreating Event

Fires before displaying a created outer form (as a result of dragging a tab outside the main form).

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public event OuterFormCreatingEventHandler OuterFormCreating

Event Data

The OuterFormCreating event's data class is DevExpress.XtraBars.OuterFormCreatingEventArgs.

Remarks

If the TabFormControlBase.AllowMoveTabsToOuterForm property is set to true, end-users are allowed to drag a tab out of the current TabForm to display it in a separate TabForm.

The OuterFormCreating event fires when a new separate TabForm containing the dragged tab is about to be created. The OuterFormCreatingEventArgs.Form property allows you to provide a custom TabForm. The code snippet below shows how to create a TabForm with the same settings as the parent TabForm using the OuterFormCreating event. If a custom TabForm is not assigned to the Form property in the event handler, the default TabForm is automatically created.

public partial class Form1 : DevExpress.XtraBars.TabForm{
    public Form1(){
        InitializeComponent();
        this.TabFormControl.ShowTabsInTitleBar = DevExpress.XtraBars.ShowTabsInTitleBar.True;
        this.TabFormControl.TitleTabVerticalOffset = 7;
        this.tabFormControl1.OuterFormCreating +=tabFormControl1_OuterFormCreating;
    }

    private void tabFormControl1_OuterFormCreating(object sender, DevExpress.XtraBars.OuterFormCreatingEventArgs e){
        e.Form = new Form1();
    }
}

The TabFormControlBase.OuterFormCreated event fires when the new separate TabForm has been created and is about to be shown.

See Also