Back to Devexpress

LinearScale.MaxValue Property

corelibraries-devexpress-dot-xtragauges-dot-core-dot-model-dot-linearscale-aefc8084.md

latest4.5 KB
Original Source

LinearScale.MaxValue Property

Gets or sets the maximum value of the linear scale.

Namespace : DevExpress.XtraGauges.Core.Model

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

NuGet Package : DevExpress.Gauges.Core

Declaration

csharp
[DefaultValue(1F)]
public float MaxValue { get; set; }
vb
<DefaultValue(1F)>
Public Property MaxValue As Single

Property Value

TypeDefaultDescription
Single1

A Single value that is the maximum limit of the linear scale.

|

Remarks

The LinearScale.MinValue and MaxValue properties together define the range of values allowed for the LinearScale. The current value indicated by the level bar is specified by the LinearScale.Value property.

Note that the MaxValue property value shouldn’t necessarily be greater than the LinearScale.MinValue. For instance, if you switch their values, this will simply change a linear scale’s direction.

MinValue = 0, MaxValue = 100 (Default)MinValue = 100, MaxValue = 0 (Rotated)

While the MinValue and MaxValue properties define the limit values, the number of tickmarks (and therefore labels) between them is specified by the LinearScale.MinorTickCount and LinearScale.MajorTickCount properties. The following images demonstrate how these properties can be modified together to customize the linear scale.

|

Default

|

MinValue = -10, MaxValue = 10

|

MinValue = -10, MaxValue = 10,

MinorTickCount = 1, MajorTickCount = 3

| | --- | --- | --- | |

|

|

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MaxValue property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-wpf-advanced-gauge-customization/CS/MainWindow.xaml.cs#L62

csharp
linearScale.MinValue = 0;
linearScale.MaxValue = 100;

reporting-wpf-advanced-gauge-customization/VB/MainWindow.xaml.vb#L52

vb
linearScale.MinValue = 0
linearScale.MaxValue = 100
linearScale.Appearance.Brush = New SolidBrushObject(Color.Transparent)

See Also

AutoRescaling

MinMaxValueChanged

LinearScale Class

LinearScale Members

DevExpress.XtraGauges.Core.Model Namespace