Beispiel #1
0
        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);
        }
Beispiel #2
0
 public static Typeface ToTypeface(this IFontElement self, IFontManager fontManager)
 => self.ToFont().ToTypeface(fontManager);
Beispiel #3
0
 internal static void ApplyFont(this TextBlock self, IFontElement element) =>
 self.UpdateFont(element.ToFont(), CompatServiceProvider.FontManager);
Beispiel #4
0
 internal static void ApplyFont(this UI.Xaml.Documents.TextElement self, IFontElement element) =>
 self.UpdateFont(element.ToFont(), CompatServiceProvider.FontManager);
Beispiel #5
0
 internal static UIFont ToUIFont(this IFontElement self)
 => CompatServiceProvider.FontManager.GetFont(self.ToFont());