protected override void OnElementPropertyChanged(PropertyChangedEventArgs args) { if (args.PropertyName == ChangeFontEffect.FontProperty.PropertyName) { var val = ChangeFontEffect.GetFont(Element); if (val != null) { Typeface font = Typeface.CreateFromAsset(Forms.Context.ApplicationContext.Assets, ChangeFontEffect.GetFont(Element)); control.Typeface = font; } } }
protected override void OnAttached() { try { control = Control as TextView; Typeface font = Typeface.CreateFromAsset(Forms.Context.ApplicationContext.Assets, ChangeFontEffect.GetFont(Element)); control.Typeface = font; } catch (Exception e) { } }