Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TabFormPage.ContentContainer Property

Gets or sets the control displayed in the current TabFormPage‘s client area.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
[DefaultValue(null)]
public Control ContentContainer { get; set; }

#Property Value

Type Default Description
Control null

A Control object that specifies the control displayed in the current TabFormPage‘s client area.

#Remarks

The ContentContainer property allows you to specify the control displayed in the current TabFormPage‘s client area when it is selected. For instance, you can specify this property handling the TabFormControlBase.PageCreated event. The code snippet below shows how to display a web browser in a new page.

private void tabFormControl1_PageCreated(object sender, DevExpress.XtraBars.PageCreatedEventArgs e) {
    WebBrowser wb = new WebBrowser();
    wb.Dock = DockStyle.Fill;
    TextBox tb = new TextBox();
    tb.Dock = DockStyle.Top;
    tb.KeyDown += (kds, kde) => {
        if (kde.KeyData == Keys.Enter)
            wb.Navigate(tb.Text);
    };
    e.Page.ContentContainer.Controls.Add(wb);
    e.Page.ContentContainer.Controls.Add(tb);
}
See Also