Forum Xamarin.Forms

Merge between Font Attribute and Font Family in same Label #383

how to use FontAttribute and FontFamily in same Label ?
and how to use converter in FontFamily ?

please any solution


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited March 2018

    There's nothing tricky about them. Just set the properties.

    <Label FontAttributes="Bold"></Label>

  • MusabAlrmmahMusabAlrmmah USMember ✭✭

    @ClintStLaurent When I Apply FontAttribute Does not apply FontFamily

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    But FontFamily works if it is by itself?
    Try swapping the order of the attributes. I know order does matter even though it isn't supposed to. For example Style has to be last or all the other attributes overwrite the style's values.

  • MusabAlrmmahMusabAlrmmah USMember ✭✭


    Did not work
    look this my code


            <converter:BooleanToObjectConverter x:Key="isStaredIconConverter" x:TypeArguments="x:String"
                        TrueValue="{ x:Static local:GrialShapesFont.Star }" 
                        FalseValue="{ x:Static local:GrialShapesFont.StarBorder }"/>
            <converter:BooleanToObjectConverter x:Key="isReadConverter" x:TypeArguments="FontAttributes">
            Text="{Binding V_SENDER_NAME}" 
            TextColor="{ DynamicResource AccentColor }"
                         FontFamily="{ DynamicResource DroidKufiRegular }"
                         FontSize="{ artina:OnOrientationDouble
                            LandscapeTablet=20 }"
                 FontAttributes="{Binding IsRead,Converter={ StaticResource isReadConverter }"
  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    And the point of that post was... ???

  • MusabAlrmmahMusabAlrmmah USMember ✭✭

    please send me example how to use FontFamily with FontAttributes in same label

Sign In or Register to comment.