[]
        
(Showing Draft Content)

DDCssLib.StyleSheetRule

StyleSheetRule Class

StyleSheetRule encapsulates the CSSDeclaration class to provide .NET compatible translations to and from the CSS styles.

Inheritance
StyleSheetRule
Namespace:
Assembly: MESCIUS.ActiveReports.dll
Syntax
[TypeConverter(typeof())]
public class StyleSheetRule : IStyleSheetRule, IDisposable

Constructors

Name Description
StyleSheetRule()

The default constructor for StyleSheetRule.
A new empty CSSDeclaration will be used, the parent StyleSheetRule and ParentStyleSheet will be null. The ClassName will be String.Empty.

StyleSheetRule(string, string)

Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.

StyleSheetRule(string, string, StyleSheet)

Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.

StyleSheetRule(string, string, string)

Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.

Properties

Name Description
BackColor

When get, it returns a System.Drawing.Color object based on the curren CSS 'background-color' property. It may return Color.Empty if the background-color CSS property was not specified in the CSS string. When set, it sets the CSS 'background-color' property based on the supplied color object.

CSSText

Sets/gets the CSSText string. When set any current declarations (style properties) will be cleared/reset, and the string will be parsed to form a new set of declarations (style properties).

ClassName

Gets/sets the ClassName of this StyleSheetRule. This value can be used to retrieve the stylesheet rule from it's parent stylesheet.

DdCharset

Implementation of IStyleSheetRule.DdCharset. DdCharset is the charset/script for the font.

DdVerticalFont

Gets or sets the dd vertical font CSS property.

Declaration

Gets/sets the CSSDeclaration object used by this style.

Font

Returns a System.Drawing.Font object from the current font related CSS style information. If a font is specified it's properties will be turned into it's CSS equivelent.

FontFamily

Gets/sets the FontFamily value.
If this StyleSheetRule's declaration does not contain the value, or the value is indicated as null, it will be returned from it's parent. When the property is set the value will only be set to this StyleSheetRule's declaration instance (not the parent's).

FontSize

Returns font size in points.

FontStyle

Returns the font-style declaration value.
If a value cannot be found from neither this declaration, nor the parent style, then ddFontStyleTypes.Inherit will be returned to allow the caller to determine how to handle the condition.

FontUnit

Gets or sets the font unit.

FontWeight

Gets/sets the 'font-weight' property of the style.

ForeColor

When get, it returns a System.Drawing.Color object based on the curren CSS 'color' property. It may return Color.Empty if the CSS color property was not specified in the CSS string. When set, it sets the CSS 'color' property based on the supplied color object.

InheritsBackColor

Gets a value indicating whether current stylesheet rule inherits background color value.

InheritsFontFamily

Gets a value indicating whether current stylesheet rule inherits font family value.

InheritsFontSize

Gets a value indicating whether current stylesheet rule inherits font size value.

InheritsFontStyle

Gets a value indicating whether current stylesheet rule inherits font style value.

InheritsFontVertical

Gets a value indicating whether current stylesheet rule inherits font vertical value.

InheritsFontWeight

Gets a value indicating whether current stylesheet rule inherits font wighth value.

InheritsForeColor

Gets a value indicating whether current stylesheet rule inherits foreground color value.

InheritsTextAlign

Gets a value indicating whether current stylesheet rule inherits text alignment value.

InheritsTextDecoration

Gets a value indicating whether current stylesheet rule inherits text decoration value.

InheritsVerticalAlign

Gets a value indicating whether current stylesheet rule inherits vertical alignment value.

Kinsoku

Gets/sets the 'ddo-enable-kinsoku' CSS property.

ParentStyleSheet

Returns the parent StyleSheet. The StyleSheet should be specified on creation of the instance.

ParentStyleSheetRule

Sets/Returns this instances parent StyleSheetRule.

ShrinkToFit

When get, it returns a System.Boolean object based on the curren CSS property. When set, it sets the CSS property.

TextAlign

Gets/sets the 'text-align' CSS property.

TextDecoration

Gets/sets the 'text-decoration' property of the style.
The Blink, Linethrough, Overline, and Underline values can be masked (the Inherit, nor None value should not be masked).

TextJustify

Gets/sets 'text-justify' CSS property

VerticalAlign

Gets/sets the 'vertical-align' CSS property.

WhiteSpace

Gets/sets the 'white-space' CSS property.

WrapMode

Gets/sets the 'ddo-wrap-mode' CSS property.

Methods

Name Description
Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Extension Methods