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

PopupContainerControl() Constructor

Creates an instance of the PopupContainerControl class.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

public PopupContainerControl()

Remarks

Use the constructor to create a popup control at runtime. A popup control is displayed in the popup window of a PopupContainerEdit control. To assign a popup control to an editor, see the RepositoryItemPopupContainerEdit.PopupControl property.

Example

The following example creates a PopupContainerEdit class instance and displays a RichTextBox control in the popup window.

First, we create and customize a RichTextBox control. Then, a PopupContainerControl object is created and this will contain the RichTextBox.

To display the PopupContainerControl in the popup window, it should be assigned to the RepositoryItemPopupContainerEdit.PopupControl property.

  RichTextBox rtb = new RichTextBox();
  rtb.Dock = DockStyle.Fill;
  PopupContainerControl popupControl = new PopupContainerControl();
  popupControl.Controls.Add(rtb);

  PopupContainerEdit editor = new PopupContainerEdit();
  editor.Properties.PopupControl = popupControl;
  Controls.Add(editor);
See Also