wpf-devexpress-dot-xpf-dot-docking-dot-baselayoutitem-56394fbb.md
Gets or sets whether the current dock item can be closed. This is a dependency property.
Namespace : DevExpress.Xpf.Docking
Assembly : DevExpress.Xpf.Docking.v25.2.dll
NuGet Package : DevExpress.Wpf.Docking
public bool AllowClose { get; set; }
Public Property AllowClose As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the current dock item can be closed; otherwise, false.
|
To close a specific dock panel in code, use the DockControllerBase.Close method provided by the DockLayoutManager.DockController object.
In XAML, you can create a closed(hidden) panel by adding the panel to the DockLayoutManager.ClosedPanels collection.
The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowClose property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-diagram-mdi/CS/MainWindow.xaml#L28
<Style TargetType="dxdo:DocumentPanel">
<Setter Property="AllowClose" Value="{DXBinding '@e(documentHost).Items.Count > 1 or @e(man).FloatGroups.Count > 2 or (@e(documentHost).Items.Count == 1 and @e(man).FloatGroups.Count == 2)'}" />
</Style>
wpf-scheduler-use-entity-framework-to-bind-to-data/CS/DXSample/MainWindow.xaml#L31
<dxdo:AutoHideGroup DockType="Right">
<dxdo:LayoutPanel AllowClose="False"
AllowFloat="False"
wpf-scheduler-disable-resource-colorization/CS/DXSample/MainWindow.xaml#L43
<dxdo:AutoHideGroup DockType="Right">
<dxdo:LayoutPanel AllowClose="False"
AllowFloat="False"
See Also