Skip to main content
A newer version of this page is available. .

LayoutGroup.Accept(IVisitor<BaseLayoutItem>) Method

Invokes the Visit method of the specified visitor for each item that belongs to the current layout group.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Docking, DevExpress.Wpf.Navigation

Declaration

public override void Accept(
    IVisitor<BaseLayoutItem> visitor
)

Parameters

Name Type Description
visitor DevExpress.Xpf.Layout.Core.IVisitor<BaseLayoutItem>

An object implementing the DevExpress.Xpf.Layout.Core.IVisitor interface.

Remarks

The Accept method lets you recursively iterate through the layout items that belong to the current layout item group and perform a specific operation on the items.

To iterate through the items of a specific layout item group, do the following:

  • Create a class implementing the DevExpress.XtraLayout.Utils.BaseVisitor interface;
  • Override its Visit method to implement an operation to be performed on layout items;
  • Call the group’s Accept method with an instance of the created class as a parameter.

The Visit method will be invoked for the current group first, and then recursively for each child item within the group.

See Also