RangeBase.Maximum RangeBase.Maximum RangeBase.Maximum RangeBase.Maximum Property

Definition

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

public : double Maximum { get; set; }
double Maximum();

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

Property Value

double 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.