AccordionControl.ChildLevelIndent Property
Gets or sets the horizontal indent that offsets child/nested elements.
Namespace: DevExpress.XtraBars.Navigation
Assembly: DevExpress.XtraBars.v25.2.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Property Value
| Type | Default | Description |
|---|---|---|
| Int32 | -1 | Horizontal indent that offsets child elements, in pixels. |
Remarks
The AccordionControlElement.Elements collection creates hierarchical navigation structures. The AccordionControl applies horizontal indentation to child elements based on the active skin.
Use the ChildLevelIndent property to specify the indent. This property affects elements on the 3rd hierarchy level and further (by default). Use the AccordionControl.ChildIndentStartLevel property to shift the indentation start point.
// Set a global indent for all elements.
accordionControl1.ChildLevelIndent = 20;
// Start indentation from the first nesting level (instead of the third).
accordionControl1.ChildIndentStartLevel = 1;
Handle the AccordionControl.QueryElementIndent event to specify element-specific indent values.
// Specify indent for specific elements.
accordionControl1.QueryElementIndent += (sender, e) => {
// Assign a custom indent to items with a specific tag
if (e.Element.Tag as string == "Critical") {
e.Indent = 30;
}
};