Represents a double-precision floating-point number.

<object property="nnnn" ... />
<object property="nnnn.nnnn" .... />
See Remarks


Double does not have any callable APIs.

The nnnn placeholder values in the XAML syntax shown do not imply precision. Silverlight 1.0 stores all numeric values internally as single-precision values. This means that if a property value is set to a higher precision value, such as a true double, the property value that is later retrieved may not be the same, due to truncation or rounding.

Silverlight defines Double as a concept in order to provide type conversion behavior for XAML, compatibility with the WPF XAML subset, and to support animating a Double. There is no type/object backing for Double in Silverlight 1.0. For property values or method parameters in scripting, use a floating-point value (you do not need to specify a decimal point followed by a zero if your number is really an integer, integers are evaluated correctly). For attributes, use a quoted value, again either with or without a decimal point. A Double value is inherently signed. However, not all properties that use the Double type will accept negative values. See Remarks or Property Value sections of the specific property for guidance.

For Double values, particularly those that specify pixels or measurements for objects that are rendered onscreen, values that exceed one million (1000000) are not respected.

The constraint behavior for Double values that exceed a property's minimum or maximum value will vary on a per-property basis. Some properties will constrain a value to its possible minimum or maximum, other properties will raise an error.

Some Silverlight property values that take a Double are really only intended to handle values between 0 and 1, with 0 typically representing a minimum value supported by the property and 1 representing the maximum. For example, when using the default RelativeToBoundingBox mode for a LinearGradientBrush, the Double value in the Offset for its GradientStops are values between 0 and 1 that define the relative position within the total bounding box.

See Also

XAML Syntax Overview