Beispiel #1
0
        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            var page = sender as CustomNavigationPage;

            FontFamily = page.TitleFontFamily;
            TitleHorizontalAlignment = page.TitleHorizontalAlignment;
            TitleFontAttributes      = page.TitleFontAttributes;
            TitleFontSize            = page.TitleFontSize;
        }
Beispiel #2
0
        TypefaceStyle ConvertFontAttributesToTypefaceStyle(FontAttributesEnum fontAttributes)
        {
            if (fontAttributes == FontAttributesEnum.Bold)
            {
                return(TypefaceStyle.Bold);
            }
            if (fontAttributes == FontAttributesEnum.BoldItalic)
            {
                return(TypefaceStyle.BoldItalic);
            }
            if (fontAttributes == FontAttributesEnum.Italic)
            {
                return(TypefaceStyle.Italic);
            }

            return(TypefaceStyle.Normal);
        }