Method SetFloatValue
- Namespace
- SharpVectors.Dom.Css
- Assembly
- SharpVectors.Core.dll
SetFloatValue(CssPrimitiveType, double)
A method to set the float value with a specified unit. If the property attached with this value cannot accept the specified unit or the float value, the value will be unchanged and a DomException will be raised.
void SetFloatValue(CssPrimitiveType unitType, double floatValue)
Parameters
unitType
CssPrimitiveTypeA unit code as defined above. The unit code can only be a float unit type (i.e.
NUMBER
,PERCENTAGE
,EMS
,EXS
,PX
,CM
,MM
,IN
,PT
,PC
,DEG
,RAD
,GRAD
,MS
,S
,HZ
,KHZ
,DIMENSION
).floatValue
doubleThe new float value.
Exceptions
- DomException
INVALID_ACCESS_ERR:
Raised if the attached property doesn't support the float value or the unit type.- DomException
NO_MODIFICATION_ALLOWED_ERR:
Raised if this property is readonly.