A newer version of this page is available. Switch to the current version.

DockLayoutManager.LayoutItem Attached Property

Gets or sets a BaseLayoutItem object to which a visual element belongs. This is an attached property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v19.1.dll



Type Description

A BaseLayoutItem object to which a visual element belongs.


Consider the following example. Assume that a Button control is positioned within a LayoutPanel. The task is to close the panel when the Button is clicked.

In the example, the Button.Click event is handled. In this event, the value of the LayoutItem attached property is obtained. This value identifies the LayoutPanel where the button is positioned. To close the panel, the DockControllerBase.Close method is called.

private void Button_Click(object sender, RoutedEventArgs e) {
    item = (BaseLayoutItem)DockLayoutManager.GetLayoutItem(sender as Button);
See Also