RangeBase.Maximum Property

Definition

Gets or sets the highest possible Value of the range element.

public:
 property double Maximum { double get(); void set(double value); };
double Maximum();

void Maximum(double value);
public double Maximum { get; set; }
var double = rangeBase.maximum;
rangeBase.maximum = double;
Public Property Maximum As Double
<rangeBase Maximum="double"/>

Property Value

Double

The highest possible Value of the range element. The default is 1.

Remarks

Slider and ProgressBar override the metadata of this property and set its default to 100. For more information, see Dependency properties overview.

Note

When binding Minimum and Maximum values in Extensible Application Markup Language (XAML), declare the Binding for Maximum first. If the Binding for Maximum is declared after Minimum, the bound value for Maximum is ignored and the following situations can occur: + If the bound Minimum value is negative, the Maximum value is set to 0.

  • If the bound Minimum value is greater than the default Maximum (100 for Slider and ProgressBar ), the Maximum value is set equal to the Minimum value. To avoid this behavior, declare the Binding for Maximum first in your Extensible Application Markup Language (XAML).

These behaviors can also occur if you set the Minimum value without also explicitly setting the Maximum value.

Applies to