Currently I can measure the impressive font icons on my page with tabs from XAML code as follows:
<ContentPage.IconImageSource>
<FontImageSource FontFamily="{StaticResource Solid }" Glyph="" ></FontImageSource>
</ContentPage.IconImageSource>
That way I can already put icons in my applications, but I want to do it from the codebehind because that tabbed page will have to be created from certain actions and I did it in the following way:
contenido.IconImageSource = new ContentPage().IconImageSource {
new FontImageSource().FontFamily = "\uf108";
};
but in the first "{" I get the error that says "I expected one ; "
Update
code App.xaml
<Application.Resources>
<ResourceDictionary>
<!--Global Styles-->
<Color x:Key="NavigationPrimary">#2196F3</Color>
<Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor" Value="{StaticResource NavigationPrimary}" />
<Setter Property="BarTextColor" Value="White" />
</Style>
<OnPlatform x:TypeArguments="x:String"
x:Key="Brands">
<On Platform="Android"
Value="BrandsRegular.otf#Regular" />
</OnPlatform>
<OnPlatform x:TypeArguments="x:String"
x:Key="Regular">
<On Platform="Android"
Value="FreeRegular.otf#Regular" />
</OnPlatform>
<OnPlatform x:TypeArguments="x:String"
x:Key="Solid">
<On Platform="Android"
Value="FreeSolid.otf#Regular" />
</OnPlatform>
</ResourceDictionary>
</Application.Resources>