Skip to main content
A newer version of this page is available. .
Bar

TabFormPage.ContentContainer Property

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

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v19.1.dll

Declaration

[DefaultValue(null)]
[Browsable(false)]
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