BarManager.ShowCloseButton Property
Gets or sets whether the close button (‘x’) is displayed at the right edge of the main menu.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v19.1.dll
Declaration
[DXCategory("Appearance")]
[DefaultValue(false)]
public bool ShowCloseButton { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | **false** | true if the close button is displayed; otherwise, false. |
Remarks
Set the ShowCloseButton property to true to enable the close button (‘x’). This button is displayed at the right edge of the main menu, if there is no main menu it’s hidden. In an MDI application, this button will also be hidden when a child MDI form is maximized.
The image below shows the close button being highlighted:
By default, the close button does not implement any specific functionality. To respond to an end-user clicking on this button, you can handle the BarManager.CloseButtonClick event. For instance, you can handle this event to close a currently active window that has no title, etc.