public static string GetName(this CssFontStyle value) { switch (value) { case CssFontStyle.Inherit: return("inherit"); case CssFontStyle.Italic: return("italic"); case CssFontStyle.Normal: return("normal"); case CssFontStyle.Oblique: return("oblique"); default: throw new Exception("Unable to get name for: " + value); } }
public static string ToCssStringValue(this CssFontStyle fontstyle) { return(_cssFontStyleMap.GetStringFromValue(fontstyle)); }
public static T SetFontStyle <T>(this T control, CssFontStyle fontStyle) where T : HtmlControl { control.FontStyle = fontStyle; return(control); }