Back to Devexpress

Customize Breadcrumbs

windowsforms-120660-controls-and-libraries-chart-control-provide-data-drill-down-customize-breadcrumbs.md

latest3.2 KB
Original Source

Customize Breadcrumbs

  • Dec 06, 2022
  • 2 minutes to read

The Breadcrumbs element allows users to return to previous data detail levels. This element includes the following children, which can be customized.

Note

Breadcrumbs are displayed when at least one ~DrillTemplate property is specified.

The ChartControl.Breadcrumbs property manages the following element appearance settings.

The following code utilizes the Breadcrumb properties demonstrated in the image above.

csharp
var breadcrumbs = chartControl.Breadcrumbs;
breadcrumbs.Border.Color = Color.LightGray;
breadcrumbs.Border.Visibility = DefaultBoolean.True;
breadcrumbs.DXFont = new DXFont("Tahoma", 12.0F, DXFontStyle.Bold);
breadcrumbs.HomeText = "Home";
breadcrumbs.HoverForeColor = Color.OrangeRed;
vb
With chartControl.Breadcrumbs
    .Border.Color = Color.LightGray
    .Border.Visibility = DefaultBoolean.True
    .DXFont = New DXFont("Tahoma", 12.0F, DXFontStyle.Bold)
    .HomeText = "Home"
    .HoverForeColor = Color.OrangeRed
End With

The table below lists the properties used in the code above.

PropertyDescription
Breadcrumbs.BorderGets the chart control’s border settings.
Breadcrumbs.MarginsSpecifies the indent between the Breadcrumbs element’s edge and other chart elements (e.g. diagram, title), in pixels.
Breadcrumbs.PaddingSpecifies the inner space between the Breadcrumb element’s content and its edge, in pixels.
Breadcrumbs.HomeTextGets or sets the text that the Breadcrumb Home Item displays instead of an icon.
Breadcrumbs.DXFontGets or sets the font that Breadcrumb Items and Breadcrumb Home Item use to display their text.
Breadcrumbs.ForeColorGets or sets the foreground color that Breadcrumb Items and Breadcrumb Home Item use in the default state to display their text.
Breadcrumbs.HoverForeColorGets or sets the foreground color that Breadcrumb Items and Breadcrumb Home Item use in the hover state to display their text.
Breadcrumbs.InactiveForeColorGets or sets the foreground color that Breadcrumb Items and Breadcrumb Home Item use in the inactive state to display their text.