Now that we have defined the font, we will put that to use and define five icons to use in our app. Let's add the XAML first and we'll then examine one of the FontImage tags. Proceed as follows:
- In the News project, open App.xaml.
- Add the following code marked in bold under the OnPlatform tag that we just added:
<ResourceDictionary>
<OnPlatform x:Key="IconFont" x:TypeArguments="x:String">
<On Platform="iOS" Value="Font Awesome 5 Free" />
<On Platform="Android" Value="FontAwesome.otf#" />
</OnPlatform>
<FontImage x:Key="HomeIcon"
FontFamily="{StaticResource IconFont}"
Glyph='& #xf015;' Size="22" Color="Black" />
<FontImage x:Key="HeadlinesIcon"
FontFamily="{StaticResource IconFont}"
...