Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

FontImageSource destroys other Labels

walliwalli Member ✭✭

Hello,
we are using a FontImageSource to load icons for a TabbedPage (works fine).
On Android however, once the FontImageSource loaded the font, our other icons (Labels with font set to the icon font) do not work anymore.
The FontImageSource and our icons share the same font file from the android assets.
When using another font file for the FontImageSource, the problem disappears.

Regards,
Gabriel

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited June 2019

    You can try to use DynamicResource for FontImageSource

    <FontImageSource
            FontFamily="{DynamicResource MaterialFontFamily}"
            Glyph="{Binding Car}"
            Size="44"
            Color="{StaticResource PrimaryColor}" />
    
  • lowleetaklowleetak MYMember ✭✭

    @LeonLu said:
    You can try to use DynamicResource for FontImageSource

    <FontImageSource
            FontFamily="{DynamicResource MaterialFontFamily}"
            Glyph="{Binding Car}"
            Size="44"
            Color="{StaticResource PrimaryColor}" />
    

    Tested not working on my side

Sign In or Register to comment.