Skip to main content

LayoutControl.Remove(BaseLayoutItem, Boolean) Method

Removes the specified item from the control.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public void Remove(
    BaseLayoutItem item,
    bool disposeItemAndControls
)

Parameters

Name Type Description
item BaseLayoutItem

The BaseLayoutItem object that should be removed.

disposeItemAndControls Boolean

true, to release all resources; otherwise false.

Remarks

The Remove method allows a particular item to be removed from the control. This method hides the specified item by deleting it from the LayoutControl.Items collection. To dispose of the item, set the disposeItemAndControls parameter to true.

If the specified item is a layout or tabbed group, all its child items are also removed from the layout.

If the specified item is the root group (see LayoutControl.Root), the LayoutControlException is thrown.

See Also