static bool OnChanged(BindableObject bindable) { if (GetCancelEvents(bindable)) { return(false); } IFontElement fontElement = (IFontElement)bindable; SetCancelEvents(bindable, true); bindable.SetValue(FontProperty, fontElement.ToFont()); SetCancelEvents(bindable, false); return(true); }
public static Typeface ToTypeface(this IFontElement self, IFontManager fontManager) => self.ToFont().ToTypeface(fontManager);
internal static void ApplyFont(this TextBlock self, IFontElement element) => self.UpdateFont(element.ToFont(), CompatServiceProvider.FontManager);
internal static void ApplyFont(this UI.Xaml.Documents.TextElement self, IFontElement element) => self.UpdateFont(element.ToFont(), CompatServiceProvider.FontManager);
internal static UIFont ToUIFont(this IFontElement self) => CompatServiceProvider.FontManager.GetFont(self.ToFont());