Skip to main content

DockManager.TopZIndexControls Property

Gets the string collection that stores the full names of the controls which have the top (high) indexes in the z-order and thus are positioned closest to the form’s edges.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.SimpleCollection, false, true, true, 1)]
[DXCategory("Layout")]
public StringUniqueCollection TopZIndexControls { get; }

Property Value

Type Description
DevExpress.XtraBars.Docking.Helpers.StringUniqueCollection

A StringUniqueCollection collection that stores the full names of the controls which have top (high) z-indexes.

Remarks

Sometimes a form contains controls which should always be docked closest to the form’s corresponding edges. For instance, a status bar should always be docked to the form’s bottom edge. Such controls have the highest z-indexes and this ensures that they are always positioned closest to the form’s edges.

When dock panels are docked to the form they should also be placed closer to the form’s edges and thus the panels may displace the controls which are already docked to the form’s edges including those which should not be moved (the status bar and tool bar for instance). In this case these controls will be moved farther away from the edge.

To always keep certain controls close to the form’s edges during any docking operation the TopZIndexControls property can be used. This represents a string collection that stores the full names of such controls. This collection already contains the following items: “System.Windows.Forms.StatusBar” and “DevExpress.XtraBars.BarDockControl”.

Add new items to this collection if specific controls should be always positioned close to the form’s edges. For instance, you may want to add a “System.Windows.Forms.ToolBar” item.

If the TopZIndexControls collection is not empty dock panels will have lower z-indexes than the controls in the TopZIndexControls.

See Also