/// <summary> /// Sets a style property. /// </summary> /// <param name="style">The style name.</param> /// <param name="value">The value to set.</param> protected void SetStyleProperty(CssAttribute style, Unit value) { if (value == null || value.IsEmpty) { _mhe.RemoveStyleAttribute(style); } else { _mhe.SetStyleAttribute(style, value); } }
/// <summary> /// Sets the style property. /// </summary> /// <param name="style">The style enum name.</param> /// <param name="value">The new value.</param> private void SetStyleProperty(CssAttribute style, Unit value) { if (value == null) { _mhe.RemoveStyleAttribute(style); } else { _mhe.SetStyleAttribute(style, value.ToString()); } }
/// <summary> /// Set a value on the owning HtmlElement. /// </summary> /// <param name="property">The CSS property.</param> /// <param name="val">The value.</param> private void SetCssValue(CssAttribute property, string val) { _owner.SetStyleAttribute(property, val); }