DOM.MeasurementUnits.Percentage
Represents a percentage-style measurement used for relative document values.
Instances either hold a nullable absolute percentage value (in theproperty) or an unspecified (null) state. The class provides implicit conversions from numeric types to make creating percentage values concise. Numeric inputs are clamped by theextension to a safe range before being stored. Note: The concrete range used by the conversion is determined by the call toin the implicit operators and constructors. Consumers should be aware that values will be clamped to that range.
7 members
Constructors
Percentage
3 overloadsPercentage()Initializes a newinstance with no value set.
The resulting instance represents an unspecified percentage (i.e.,is).
Percentage(int value)Initializes a newinstance from an integer value.
Parameters
- value
- Percentage value to assign. The value is clamped to the rangeto.
Percentage(double value)Initializes a newinstance from a double value.
Parameters
- value
- Percentage value to assign. The value is clamped to the rangeto.
Properties
Gets or sets the percentage value.
Methods
op_Implicit
2 overloadsPercentage op_Implicit(System.Double)~DOM.MeasurementUnits.PercentageImplicitly converts ato a.
The input value is clamped to the rangetousing.
Parameters
- value
- Input percentage value to convert.
Percentage op_Implicit(System.Int32)~DOM.MeasurementUnits.PercentageImplicitly converts anto a.
The input value is clamped to the rangetousing.
Parameters
- value
- Input percentage value to convert.
ToString
ToStringReturns a string representation of the stored percentage value.
Returns
Theformatted using the defaultbehavior, or an empty string ifis.