C# 클래스 SharpVectors.Dom.Css.CssStyleDeclaration

The CSSStyleDeclaration interface represents a single CSS declaration block. This interface may be used to determine the style properties currently set in a block or to set style properties explicitly within the block. While an implementation may not recognize all CSS properties within a CSS declaration block, it is expected to provide access to all specified properties in the style sheet through the CSSStyleDeclaration interface. Furthermore, implementations that support a specific level of CSS should correctly handle CSS shorthand properties for that level. For a further discussion of shorthand properties, see the CSS2Properties interface. This interface is also used to provide a read-only access to the computed values of an element. See also the ViewCSS interface. Note: The CSS Object Model doesn't provide an access to the specified or actual values of the CSS cascade
상속: ICssStyleDeclaration
파일 보기 프로젝트 열기: codebutler/savagesvg 1 사용 예제들

공개 메소드들

메소드 설명
CssStyleDeclaration ( string &css, CssRule parentRule, bool readOnly, CssStyleSheetType origin ) : System

The constructor for CssStyleDeclaration

GetPropertyCssValue ( string propertyName ) : ICssValue

Used to retrieve the object representation of the value of a CSS property if it has been explicitly set within this declaration block. This method returns null if the property is a shorthand property. Shorthand property values can only be accessed and modified as strings, using the getPropertyValue and setProperty methods.

GetPropertyPriority ( string propertyName ) : string

Used to retrieve the priority of a CSS property (e.g. the "important" qualifier) if the property has been explicitly set in this declaration block.

GetPropertyValue ( string propertyName ) : string

Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block.

RemoveProperty ( string propertyName ) : string

Used to remove a CSS property if it has been explicitly set within this declaration block.

SetProperty ( string propertyName, string value, string priority ) : void

Used to set a property value and priority within this declaration block

this ( ulong index ) : string

Used to retrieve the properties that have been explicitly set in this declaration block. The order of the properties retrieved using this method does not have to be the order in which they were set. This method can be used to iterate over all properties in this declaration block. The name of the property at this ordinal position. The empty string if no property exists at this position.

비공개 메소드들

메소드 설명
CssStyleDeclaration ( ) : System

The constructor used internally when collecting styles for a specified element

GetStylesForElement ( CssCollectedStyleDeclaration csd, int specificity ) : void

Used to find matching style rules in the cascading order

parseString ( string cssText ) : string

메소드 상세

CssStyleDeclaration() 공개 메소드

The constructor for CssStyleDeclaration
public CssStyleDeclaration ( string &css, CssRule parentRule, bool readOnly, CssStyleSheetType origin ) : System
css string The string to parse for CSS
parentRule CssRule The parent rule or parent stylesheet
readOnly bool True if this instance is readonly
origin CssStyleSheetType The type of CssStyleSheet
리턴 System

GetPropertyCssValue() 공개 메소드

Used to retrieve the object representation of the value of a CSS property if it has been explicitly set within this declaration block. This method returns null if the property is a shorthand property. Shorthand property values can only be accessed and modified as strings, using the getPropertyValue and setProperty methods.
public GetPropertyCssValue ( string propertyName ) : ICssValue
propertyName string The name of the CSS property. See the CSS property index.
리턴 ICssValue

GetPropertyPriority() 공개 메소드

Used to retrieve the priority of a CSS property (e.g. the "important" qualifier) if the property has been explicitly set in this declaration block.
public GetPropertyPriority ( string propertyName ) : string
propertyName string The name of the CSS property. See the CSS property index.
리턴 string

GetPropertyValue() 공개 메소드

Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block.
public GetPropertyValue ( string propertyName ) : string
propertyName string The name of the CSS property. See the CSS property index.
리턴 string

RemoveProperty() 공개 메소드

Used to remove a CSS property if it has been explicitly set within this declaration block.
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or the property is readonly.
public RemoveProperty ( string propertyName ) : string
propertyName string The name of the CSS property. See the CSS property index.
리턴 string

SetProperty() 공개 메소드

Used to set a property value and priority within this declaration block
SYNTAX_ERR: Raised if the specified value has a syntax error and is unparsable. NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or the property is readonly.
public SetProperty ( string propertyName, string value, string priority ) : void
propertyName string The name of the CSS property. See the CSS property index.
value string The new value of the property.
priority string The new priority of the property (e.g. "important").
리턴 void

this() 공개 메소드

Used to retrieve the properties that have been explicitly set in this declaration block. The order of the properties retrieved using this method does not have to be the order in which they were set. This method can be used to iterate over all properties in this declaration block. The name of the property at this ordinal position. The empty string if no property exists at this position.
public this ( ulong index ) : string
index ulong
리턴 string