Interface ICssPrimitiveValue
- Namespace
- SharpVectors.Dom.Css
- Assembly
- SharpVectors.Core.dll
The ICssPrimitiveValue
interface represents a single CSS value.
public interface ICssPrimitiveValue : ICssValue
- Inherited Members
Remarks
This interface may be used to determine the value of a specific style property currently set in a block or to set a specific style property explicitly within the block. An instance of this interface might be obtained from the GetPropertyCssValue(string) method of the ICssStyleDeclaration interface. A ICssPrimitiveValue object only occurs in a context of a CSS property.
Properties
- PrimitiveType
The type of the value as defined by the constants specified above.
Methods
- GetCounterValue()
This method is used to get the ICssCounter value. If this CSS value doesn't contain a counter value, a DomException is raised. Modification to the corresponding style property can be achieved using the ICssCounter interface
- GetFloatValue(CssPrimitiveType)
This method is used to get a float value in a specified unit. If this CSS value doesn't contain a float value or can't be converted into the specified unit, a DomException is raised.
- GetRectValue()
This method is used to get the ICssRect value. If this CSS value doesn't contain a rect value, a DomException is raised. Modification to the corresponding style property can be achieved using the ICssRect interface.
- GetRgbColorValue()
This method is used to get the RGB color. If this CSS value doesn't contain a RGB color value, a DomException is raised. Modification to the corresponding style property can be achieved using the ICssColor interface.
- GetStringValue()
This method is used to get the string value. If the CSS value doesn't contain a string value, a DomException is raised.
Note: Some properties (like 'font-family' or 'voice-family') convert a whitespace separated list of idents to a string.
- 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.
- SetStringValue(CssPrimitiveType, string)
A method to set the string value with the specified unit. If the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a DomException will be raised.