private Windows.FontWeight TransformFontWeight(Styles.FontWeight fontWeight) { switch (fontWeight) { case Styles.FontWeight.Normal: return(Windows.FontWeights.Normal); case Styles.FontWeight.Bold: return(Windows.FontWeights.Bold); case Styles.FontWeight.Thin: return(Windows.FontWeights.Thin); default: throw new ArgumentException("fontWeight"); } }
private Drawing.FontStyle TransformFontWeight(Styles.FontWeight fontWeight) { switch (fontWeight) { case Styles.FontWeight.Normal: return(Drawing.FontStyle.Regular); case Styles.FontWeight.Bold: return(Drawing.FontStyle.Bold); case Styles.FontWeight.Thin: return(Drawing.FontStyle.Regular); // no pair for this -> return the default style default: throw new ArgumentException("fontWeight"); } }
private Graphics.TypefaceStyle TransformFontWeight(Styles.FontWeight fontWeight) { switch (fontWeight) { case Styles.FontWeight.Normal: return(Graphics.TypefaceStyle.Normal); case Styles.FontWeight.Bold: return(Graphics.TypefaceStyle.Bold); case Styles.FontWeight.Thin: return(Graphics.TypefaceStyle.Normal); // no pair for this -> return the default style default: throw new ArgumentException("fontWeight"); } }