# DDCssLib.StyleSheetRule

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="DDCssLib_StyleSheetRule" data-uid="DDCssLib.StyleSheetRule" class="text-break">StyleSheetRule Class
</h1>
  <div class="markdown level0 summary"><p>StyleSheetRule encapsulates the CSSDeclaration class to provide .NET compatible translations to and from the CSS styles.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">StyleSheetRule</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="DDCssLib.IStyleSheetRule.html">IStyleSheetRule</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href=""></a></h6>
  <h6><strong>Assembly</strong>: MESCIUS.ActiveReports.dll</h6>
  <h5 id="DDCssLib_StyleSheetRule_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TypeConverter(typeof())]
public class StyleSheetRule : IStyleSheetRule, IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="DDCssLib_StyleSheetRule__ctor" data-uid="DDCssLib.StyleSheetRule.#ctor">
          <a class="xref" href="DDCssLib.StyleSheetRule.-ctor.html#DDCssLib_StyleSheetRule__ctor">StyleSheetRule()</a>
        </td>
        <td class="markdown level1 summary"><p>The default constructor for StyleSheetRule.<br>
A new empty CSSDeclaration will be used, the parent StyleSheetRule and ParentStyleSheet will be null.  The ClassName will be String.Empty.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule__ctor_System_String_System_String_" data-uid="DDCssLib.StyleSheetRule.#ctor(System.String,System.String)">
          <a class="xref" href="DDCssLib.StyleSheetRule.-ctor.html#DDCssLib_StyleSheetRule__ctor_System_String_System_String_">StyleSheetRule(string, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule__ctor_System_String_System_String_DDCssLib_StyleSheet_" data-uid="DDCssLib.StyleSheetRule.#ctor(System.String,System.String,DDCssLib.StyleSheet)">
          <a class="xref" href="DDCssLib.StyleSheetRule.-ctor.html#DDCssLib_StyleSheetRule__ctor_System_String_System_String_DDCssLib_StyleSheet_">StyleSheetRule(string, string, StyleSheet)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule__ctor_System_String_System_String_System_String_" data-uid="DDCssLib.StyleSheetRule.#ctor(System.String,System.String,System.String)">
          <a class="xref" href="DDCssLib.StyleSheetRule.-ctor.html#DDCssLib_StyleSheetRule__ctor_System_String_System_String_System_String_">StyleSheetRule(string, string, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="DDCssLib_StyleSheetRule_BackColor" data-uid="DDCssLib.StyleSheetRule.BackColor">
          <a class="xref" href="DDCssLib.StyleSheetRule.BackColor.html#DDCssLib_StyleSheetRule_BackColor">BackColor</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_CSSText" data-uid="DDCssLib.StyleSheetRule.CSSText">
          <a class="xref" href="DDCssLib.StyleSheetRule.CSSText.html#DDCssLib_StyleSheetRule_CSSText">CSSText</a>
        </td>
        <td class="markdown level1 summary"><p>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).</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_ClassName" data-uid="DDCssLib.StyleSheetRule.ClassName">
          <a class="xref" href="DDCssLib.StyleSheetRule.ClassName.html#DDCssLib_StyleSheetRule_ClassName">ClassName</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the ClassName of this StyleSheetRule.  This value can be used to retrieve the stylesheet rule from it's parent stylesheet.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_DdCharset" data-uid="DDCssLib.StyleSheetRule.DdCharset">
          <a class="xref" href="DDCssLib.StyleSheetRule.DdCharset.html#DDCssLib_StyleSheetRule_DdCharset">DdCharset</a>
        </td>
        <td class="markdown level1 summary"><p>Implementation of IStyleSheetRule.DdCharset.  DdCharset is the charset/script for the font.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_DdVerticalFont" data-uid="DDCssLib.StyleSheetRule.DdVerticalFont">
          <a class="xref" href="DDCssLib.StyleSheetRule.DdVerticalFont.html#DDCssLib_StyleSheetRule_DdVerticalFont">DdVerticalFont</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the dd vertical font CSS property.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_Declaration" data-uid="DDCssLib.StyleSheetRule.Declaration">
          <a class="xref" href="DDCssLib.StyleSheetRule.Declaration.html#DDCssLib_StyleSheetRule_Declaration">Declaration</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the CSSDeclaration object used by this style.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_Font" data-uid="DDCssLib.StyleSheetRule.Font">
          <a class="xref" href="DDCssLib.StyleSheetRule.Font.html#DDCssLib_StyleSheetRule_Font">Font</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_FontFamily" data-uid="DDCssLib.StyleSheetRule.FontFamily">
          <a class="xref" href="DDCssLib.StyleSheetRule.FontFamily.html#DDCssLib_StyleSheetRule_FontFamily">FontFamily</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the FontFamily value.<br>
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).</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_FontSize" data-uid="DDCssLib.StyleSheetRule.FontSize">
          <a class="xref" href="DDCssLib.StyleSheetRule.FontSize.html#DDCssLib_StyleSheetRule_FontSize">FontSize</a>
        </td>
        <td class="markdown level1 summary"><p>Returns font size in points.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_FontStyle" data-uid="DDCssLib.StyleSheetRule.FontStyle">
          <a class="xref" href="DDCssLib.StyleSheetRule.FontStyle.html#DDCssLib_StyleSheetRule_FontStyle">FontStyle</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the font-style declaration value.<br>
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.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_FontUnit" data-uid="DDCssLib.StyleSheetRule.FontUnit">
          <a class="xref" href="DDCssLib.StyleSheetRule.FontUnit.html#DDCssLib_StyleSheetRule_FontUnit">FontUnit</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the font unit.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_FontWeight" data-uid="DDCssLib.StyleSheetRule.FontWeight">
          <a class="xref" href="DDCssLib.StyleSheetRule.FontWeight.html#DDCssLib_StyleSheetRule_FontWeight">FontWeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'font-weight' property of the style.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_ForeColor" data-uid="DDCssLib.StyleSheetRule.ForeColor">
          <a class="xref" href="DDCssLib.StyleSheetRule.ForeColor.html#DDCssLib_StyleSheetRule_ForeColor">ForeColor</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsBackColor" data-uid="DDCssLib.StyleSheetRule.InheritsBackColor">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsBackColor.html#DDCssLib_StyleSheetRule_InheritsBackColor">InheritsBackColor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits background color value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsFontFamily" data-uid="DDCssLib.StyleSheetRule.InheritsFontFamily">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsFontFamily.html#DDCssLib_StyleSheetRule_InheritsFontFamily">InheritsFontFamily</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits font family value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsFontSize" data-uid="DDCssLib.StyleSheetRule.InheritsFontSize">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsFontSize.html#DDCssLib_StyleSheetRule_InheritsFontSize">InheritsFontSize</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits font size value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsFontStyle" data-uid="DDCssLib.StyleSheetRule.InheritsFontStyle">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsFontStyle.html#DDCssLib_StyleSheetRule_InheritsFontStyle">InheritsFontStyle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits font style value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsFontVertical" data-uid="DDCssLib.StyleSheetRule.InheritsFontVertical">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsFontVertical.html#DDCssLib_StyleSheetRule_InheritsFontVertical">InheritsFontVertical</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits font vertical value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsFontWeight" data-uid="DDCssLib.StyleSheetRule.InheritsFontWeight">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsFontWeight.html#DDCssLib_StyleSheetRule_InheritsFontWeight">InheritsFontWeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits font wighth value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsForeColor" data-uid="DDCssLib.StyleSheetRule.InheritsForeColor">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsForeColor.html#DDCssLib_StyleSheetRule_InheritsForeColor">InheritsForeColor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits foreground color value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsTextAlign" data-uid="DDCssLib.StyleSheetRule.InheritsTextAlign">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsTextAlign.html#DDCssLib_StyleSheetRule_InheritsTextAlign">InheritsTextAlign</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits text alignment value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsTextDecoration" data-uid="DDCssLib.StyleSheetRule.InheritsTextDecoration">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsTextDecoration.html#DDCssLib_StyleSheetRule_InheritsTextDecoration">InheritsTextDecoration</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits text decoration value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_InheritsVerticalAlign" data-uid="DDCssLib.StyleSheetRule.InheritsVerticalAlign">
          <a class="xref" href="DDCssLib.StyleSheetRule.InheritsVerticalAlign.html#DDCssLib_StyleSheetRule_InheritsVerticalAlign">InheritsVerticalAlign</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether current stylesheet rule inherits vertical alignment value.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_Kinsoku" data-uid="DDCssLib.StyleSheetRule.Kinsoku">
          <a class="xref" href="DDCssLib.StyleSheetRule.Kinsoku.html#DDCssLib_StyleSheetRule_Kinsoku">Kinsoku</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'ddo-enable-kinsoku' CSS property.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_ParentStyleSheet" data-uid="DDCssLib.StyleSheetRule.ParentStyleSheet">
          <a class="xref" href="DDCssLib.StyleSheetRule.ParentStyleSheet.html#DDCssLib_StyleSheetRule_ParentStyleSheet">ParentStyleSheet</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the parent StyleSheet. The StyleSheet should be specified on creation of the instance.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_ParentStyleSheetRule" data-uid="DDCssLib.StyleSheetRule.ParentStyleSheetRule">
          <a class="xref" href="DDCssLib.StyleSheetRule.ParentStyleSheetRule.html#DDCssLib_StyleSheetRule_ParentStyleSheetRule">ParentStyleSheetRule</a>
        </td>
        <td class="markdown level1 summary"><p>Sets/Returns this instances parent StyleSheetRule.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_ShrinkToFit" data-uid="DDCssLib.StyleSheetRule.ShrinkToFit">
          <a class="xref" href="DDCssLib.StyleSheetRule.ShrinkToFit.html#DDCssLib_StyleSheetRule_ShrinkToFit">ShrinkToFit</a>
        </td>
        <td class="markdown level1 summary"><p>When get, it returns a System.Boolean object based on the curren CSS property.
When set, it sets the CSS property.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_TextAlign" data-uid="DDCssLib.StyleSheetRule.TextAlign">
          <a class="xref" href="DDCssLib.StyleSheetRule.TextAlign.html#DDCssLib_StyleSheetRule_TextAlign">TextAlign</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'text-align' CSS property.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_TextDecoration" data-uid="DDCssLib.StyleSheetRule.TextDecoration">
          <a class="xref" href="DDCssLib.StyleSheetRule.TextDecoration.html#DDCssLib_StyleSheetRule_TextDecoration">TextDecoration</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'text-decoration' property of the style.<br>
The Blink, Linethrough, Overline, and Underline values can be masked (the Inherit, nor None value should not be masked).</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_TextJustify" data-uid="DDCssLib.StyleSheetRule.TextJustify">
          <a class="xref" href="DDCssLib.StyleSheetRule.TextJustify.html#DDCssLib_StyleSheetRule_TextJustify">TextJustify</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets 'text-justify' CSS property</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_VerticalAlign" data-uid="DDCssLib.StyleSheetRule.VerticalAlign">
          <a class="xref" href="DDCssLib.StyleSheetRule.VerticalAlign.html#DDCssLib_StyleSheetRule_VerticalAlign">VerticalAlign</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'vertical-align' CSS property.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_WhiteSpace" data-uid="DDCssLib.StyleSheetRule.WhiteSpace">
          <a class="xref" href="DDCssLib.StyleSheetRule.WhiteSpace.html#DDCssLib_StyleSheetRule_WhiteSpace">WhiteSpace</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'white-space' CSS property.</p>
</td>
      </tr>
      <tr>
        <td id="DDCssLib_StyleSheetRule_WrapMode" data-uid="DDCssLib.StyleSheetRule.WrapMode">
          <a class="xref" href="DDCssLib.StyleSheetRule.WrapMode.html#DDCssLib_StyleSheetRule_WrapMode">WrapMode</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets the 'ddo-wrap-mode' CSS property.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="DDCssLib_StyleSheetRule_Dispose" data-uid="DDCssLib.StyleSheetRule.Dispose">
          <a class="xref" href="DDCssLib.StyleSheetRule.Dispose.html#DDCssLib_StyleSheetRule_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"><p>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="GrapeCity.ActiveReports.ReportsCore.Tools.ObjectExtensions.ApplyDefaults.html#GrapeCity_ActiveReports_ReportsCore_Tools_ObjectExtensions_ApplyDefaults__1___0_">ObjectExtensions.ApplyDefaults&lt;TObject&gt;(TObject)</a>
  </div>
  <div>
      <a class="xref" href="GrapeCity.ActiveReports.ReportsCore.Tools.ObjectExtensions.SetValue.html#GrapeCity_ActiveReports_ReportsCore_Tools_ObjectExtensions_SetValue__1___0_System_ComponentModel_PropertyDescriptor_System_String_">ObjectExtensions.SetValue&lt;TObject&gt;(TObject, PropertyDescriptor, string)</a>
  </div>
  <div>
      <a class="xref" href="GrapeCity.ActiveReports.ReportsCore.Tools.ObjectExtensions.ToNameValueCollection.html#GrapeCity_ActiveReports_ReportsCore_Tools_ObjectExtensions_ToNameValueCollection_System_Object_">ObjectExtensions.ToNameValueCollection(object)</a>
  </div>

</div>
