Table of Contents

Method SetFloatValue

Namespace
SharpVectors.Dom.Css
Assembly
SharpVectors.Css.dll

SetFloatValue(CssPrimitiveType, double)

A method to set the float value with a specified unit. If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a DomException will be raised.

public virtual void SetFloatValue(CssPrimitiveType unitType, double floatValue)

Parameters

unitType CssPrimitiveType

A unit code as defined above. The unit code can only be a float unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM, CSS_IN, CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION).

floatValue double

The new float value.

Exceptions

DomException

INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float value.

DomException

NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

SetFloatValue(string)

protected void SetFloatValue(string floatValue)

Parameters

floatValue string

SetFloatValue(double)

protected void SetFloatValue(double floatValue)

Parameters

floatValue double