| Start |
|---|
| Accessing custom Fonts in Syles Xamarin.Forms provide great mechanism for styling your cross-platforms application with global styles. In mobile world your application must be pretty and stand out from the other applications. One of this characters is Custom Fonts used in application. With power support of XAML Styling in Xamarin.Forms just created base style for all labels with yours custom fonts. To include custom fonts into you iOS and Android project follow the guide in Using custom fonts on iOS and Android with Xamarin.Forms (opens new window) post written by Gerald. Declare Style in App.xaml file resource section. This make all styles globally visible. From Gerald post above we need to use StyleId property but it isn't bindable property, so to using it in Style Setter we need to create Attachable Property for it: Then add style in App.xaml resource: According to post above we need to create Custom Renderer for Label which inherits from LabelRenderer On Android platform. For iOS platform no custom renderers required. Now you can obtain style in your`s page markup: For specific label Or apply style to all labels on the page by creating Style Based on LabesStyle RemarksResources to look at: |
Read Article
https://develop.horje.com/learn/1434/reference