Back to Devexpress

BaseLayoutItem.AllowClose Property

wpf-devexpress-dot-xpf-dot-docking-dot-baselayoutitem-56394fbb.md

latest3.9 KB
Original Source

BaseLayoutItem.AllowClose Property

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

Declaration

csharp
public bool AllowClose { get; set; }
vb
Public Property AllowClose As Boolean

Property Value

TypeDescription
Boolean

true if the current dock item can be closed; otherwise, false.

|

Remarks

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

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

xml
<dxdo:AutoHideGroup DockType="Right">
    <dxdo:LayoutPanel AllowClose="False"
                      AllowFloat="False"

wpf-scheduler-disable-resource-colorization/CS/DXSample/MainWindow.xaml#L43

xml
<dxdo:AutoHideGroup DockType="Right">
    <dxdo:LayoutPanel AllowClose="False"
                      AllowFloat="False"

See Also

Close(BaseLayoutItem)

ClosedPanels

ShowCloseButton

DockItemClosing

DockItemClosed

ClosedPanelsBarVisibility

BaseLayoutItem Class

BaseLayoutItem Members

DevExpress.Xpf.Docking Namespace