PercentageClass
Definition
- Namespace
- DOM.MeasurementUnits
- Assembly
- DOM.dll
Represents a percentage-style measurement used for relative document values.
Remarks
Instances either hold a nullable absolute percentage value (in the property) or an unspecified (null) state. The class provides implicit conversions from numeric types to make creating percentage values concise. Numeric inputs are clamped by the extension to a safe range before being stored. Value ToRange(double,double,double) Note: The concrete range used by the conversion is determined by the call to in the implicit operators and constructors. Consumers should be aware that values will be clamped to that range. ToRange(-10000, 10000) Percentages are used throughout the DOM for relative sizing, scaling, tinting, shading, and stop positions in gradients.
Examples
Constructors
Initializes a new instance with no value set. Percentage
Initializes a new instance from an integer value. Percentage
Initializes a new instance from a double value. Percentage
Properties
Gets or sets the percentage value.
Methods
Implicitly converts a to a . Double, Percentage
Returns a string representation of the stored percentage value.