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
Declaration
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