Пример #1
0
        static nfloat GetFontWeight(UIFontWeight weight)
        {
            switch (weight)
            {
            case UIFontWeight.UltraLight:
                return(UIFontWeightConstants.UltraLight);

            case UIFontWeight.Thin:
                return(UIFontWeightConstants.Thin);

            case UIFontWeight.Light:
                return(UIFontWeightConstants.Light);

            case UIFontWeight.Regular:
                return(UIFontWeightConstants.Regular);

            case UIFontWeight.Medium:
                return(UIFontWeightConstants.Medium);

            case UIFontWeight.Semibold:
                return(UIFontWeightConstants.Semibold);

            case UIFontWeight.Bold:
                return(UIFontWeightConstants.Bold);

            case UIFontWeight.Heavy:
                return(UIFontWeightConstants.Heavy);

            case UIFontWeight.Black:
                return(UIFontWeightConstants.Black);

            default:
                throw new ArgumentException(weight.ToString());
            }
        }
Пример #2
0
 static nfloat GetFontWeight(UIFontWeight weight)
 {
     switch (weight) {
     case UIFontWeight.UltraLight:
         return UIFontWeightConstants.UltraLight;
     case UIFontWeight.Thin:
         return UIFontWeightConstants.Thin;
     case UIFontWeight.Light:
         return UIFontWeightConstants.Light;
     case UIFontWeight.Regular:
         return UIFontWeightConstants.Regular;
     case UIFontWeight.Medium:
         return UIFontWeightConstants.Medium;
     case UIFontWeight.Semibold:
         return UIFontWeightConstants.Semibold;
     case UIFontWeight.Bold:
         return UIFontWeightConstants.Bold;
     case UIFontWeight.Heavy:
         return UIFontWeightConstants.Heavy;
     case UIFontWeight.Black:
         return UIFontWeightConstants.Black;
     default:
         throw new ArgumentException (weight.ToString ());
     }
 }