Back to Devexpress

LinearScale.MajorTickCount Property

corelibraries-devexpress-dot-xtragauges-dot-core-dot-model-dot-linearscale-5412e8e8.md

latest3.0 KB
Original Source

LinearScale.MajorTickCount Property

Gets or sets the total number of major tickmarks displayed on a linear scale.

Namespace : DevExpress.XtraGauges.Core.Model

Assembly : DevExpress.XtraGauges.v25.2.Core.dll

NuGet Package : DevExpress.Gauges.Core

Declaration

csharp
[DefaultValue(11)]
public int MajorTickCount { get; set; }
vb
<DefaultValue(11)>
Public Property MajorTickCount As Integer

Property Value

TypeDefaultDescription
Int3211

An integer value that defines the total number of major tickmarks.

|

Remarks

Use the MajorTickCount and LinearScale.MinorTickCount properties to specify the number of tickmarks shown on a linear scale. The appearance of major and minor tickmarks is specified by the LinearScale.MajorTickmark and LinearScale.MinorTickmark properties, correspondingly.

On the image below MajorTickCount = 6 , which generated 6 major tickmarks: for 0 , 20 , 40 , 60 , 80 and 100 values.

This means, for example, if the LinearScale.MinValue is set to 0 and LinearScale.MaxValue is set to 10 and you want to show a major tickmark (and a label) for each integer value, you should set the MajorTickCount property to 11.

Note also that if you don’t need to show the first or the last major tickmark, or both - you can hide them by setting the ShowFirst and ShowLast properties of the LinearScale.MajorTickmark object to false.

See Also

MinorTickCount

TickCount

LinearScale Class

LinearScale Members

DevExpress.XtraGauges.Core.Model Namespace