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

StripLimit.Enabled Property

Gets or sets a value that specifies whether the current strip limit is enabled.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v18.2.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
[XtraSerializableProperty]
[TypeConverter(typeof(BooleanTypeConverter))]
public bool Enabled { get; set; }

Property Value

Type Description
Boolean

true if the strip limit is enabled; otherwise, false.

Remarks

Use the Enabled property to control whether the maximum or minimum strip limit which is defined by this StripLimit object is enabled.

Depending upon the type of the strip limit (which can be either maximum or minimum), setting the Enabled property to false makes the corresponding strip limit equal to either the AxisRange.MaxValue value (for the maximum strip limit) or the AxisRange.MinValue value (for the minimum strip limit).

For more information, refer to Strips.

Example

This example demonstrates how strips can be created and customized at runtime.

Since strips reside in an appropriate axis collection, you should first cast your diagram object to the required diagram’s type. Then, you can access the collection via the Axis2D.Strips property.

// Cast the chart's diagram to the XYDiagram type, to access its axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;

// Create a strip with its maximum and minimum axis value defined.
diagram.AxisY.Strips.Add(new Strip("Strip 1", 5, 15));

// Customize the strip's behavior.
diagram.AxisY.Strips[0].Visible = true;
diagram.AxisY.Strips[0].ShowAxisLabel = true;
diagram.AxisY.Strips[0].AxisLabelText = "My Range";
diagram.AxisY.Strips[0].ShowInLegend = true;
diagram.AxisY.Strips[0].LegendText = "A Sample Strip";

// Customize the strip's appearance.
diagram.AxisY.Strips[0].Color = Color.CornflowerBlue;
diagram.AxisY.Strips[0].FillStyle.FillMode = FillMode.Empty;
See Also