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; }
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); }