Class RangeBase
Represents an element that has a value within a specific range, such as the see cref="ProgressBar"/>, ScrollBar, and Slider controls.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.Primitives
Assembly: OpenSilver.dll
Syntax
public abstract class RangeBase : Control, IControl, IFrameworkElement, IUIElement, IDependencyObject
Constructors
| Improve this Doc View SourceRangeBase()
Initializes a new instance of the RangeBase class.
Declaration
protected RangeBase()
Fields
| Improve this Doc View SourceLargeChangeProperty
Identifies the LargeChange dependency property.
Declaration
public static readonly DependencyProperty LargeChangeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaximumProperty
Identifies the Maximum dependency property.
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MinimumProperty
Identifies the Minimum dependency property.
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SmallChangeProperty
Identifies the SmallChange dependency property.
Declaration
public static readonly DependencyProperty SmallChangeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceLargeChange
Declaration
public double LargeChange { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Value to add to or subtract from the Value of the RangeBase element. The default is 1. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The new value is System.Double.NaN, less than zero, or System.Double.IsInfinity(System.Double) is true. |
Maximum
Gets or sets the highest possible Value of the range element.
Declaration
public double Maximum { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The highest possible Value of the range element. The default is 1. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The new value is either System.Double.NaN or System.Double.IsInfinity(System.Double) is true. |
Minimum
Declaration
public double Minimum { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Minimum possible Value of the range element. The default is 0. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The new value is either System.Double.NaN or System.Double.IsInfinity(System.Double) is true. |
SmallChange
Declaration
public double SmallChange { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Value to add to or subtract from the Value of the RangeBase element. The default is 0.1. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The new value is System.Double.NaN, less than zero, or System.Double.IsInfinity(System.Double) is true. |
Value
Gets or sets the current setting of the range control, which may be coerced.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The current setting of the range control, which may be coerced. The default is 0. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The new value is either System.Double.NaN or System.Double.IsInfinity(System.Double) is true. |
Methods
| Improve this Doc View SourceOnMaximumChanged(Double, Double)
Called when Maximum property changes.
Declaration
protected virtual void OnMaximumChanged(double oldMaximum, double newMaximum)
Parameters
Type | Name | Description |
---|---|---|
System.Double | oldMaximum | Old value of the Maximum property. |
System.Double | newMaximum | New value of the Maximum property. |
OnMinimumChanged(Double, Double)
Called when the Minimum property changes.
Declaration
protected virtual void OnMinimumChanged(double oldMinimum, double newMinimum)
Parameters
Type | Name | Description |
---|---|---|
System.Double | oldMinimum | Old value of the Minimum property. |
System.Double | newMinimum | New value of the Minimum property. |
OnValueChanged(Double, Double)
Raises the ValueChanged routed event.
Declaration
protected virtual void OnValueChanged(double oldValue, double newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | oldValue | Old value of the Value property. |
System.Double | newValue | New value of the Value property. |
ToString()
Provides a string representation of a RangeBase object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Returns the string representation of a RangeBase object. |
Overrides
Events
| Improve this Doc View SourceValueChanged
Occurs when the range value changes.
Declaration
public event RoutedPropertyChangedEventHandler<double> ValueChanged
Event Type
Type | Description |
---|---|
RoutedPropertyChangedEventHandler<System.Double> |