Skip to main content

DockLayoutManager.RequestUniqueName Event

Allows you to provide unique names for layout items, whose names conflict with existing names.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

Declaration

public event RequestUniqueNameEventHandler RequestUniqueName

Event Data

The RequestUniqueName event's data class is DevExpress.Xpf.Docking.RequestUniqueNameEventArgs.

Remarks

To correctly save the layout to a data store (an XML file or stream), layout items must have unique names. You can assign names via the Name property of layout items, or handle the RequestUniqueName event to provide unique names. If you do not provide unique names, unique names will be automatically assigned.

The RequestUniqueName event occurs when saving the layout to a data store, and only if names of specific layout items match. The event fires repeatedly for each layout item whose name is empty or conflicts with other names. The event’s Item parameter, represented by a BaseLayoutItem descendant, identifies the current conflicting item. The ExistingNames parameter represents a collection that contains unique names that have been processed so far.

To specify the name for the item, use the Name property of the Item parameter. Ensure that the name doesn’t conflict with names in the ExistingNames collection.

Conflicting names will be corrected, even if the RequestUniqueName event is not handled.

See Also