Hello everyone
I am trying to Display a Glyth, but I cannot

I use this, to generate my icons
https://andreinitescu.github.io/IconFont2Code/
Hello everyone
I am trying to Display a Glyth, but I cannot

I use this, to generate my icons
https://andreinitescu.github.io/IconFont2Code/
Do you mean "glyph" instead of "glyth"? Maybe you could specify the font family to which the font icon belongs. In addition, you can refer to
https://stackoverflow.com/questions/61258115/fontawesome-xamarin-setting-glyph-not-working-from-code-behind
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/text/fonts
I did this, but it doesn't show up
Glyph = new FontImageSource {
Glyph = IconFonts.Grid,
FontFamily = "material",
Size = 44![111797-screenshot-2021-07-05-102504.png][1]
};
x:DataType="vm:NotesVM"
xmlns:syncfusion="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms">
<ContentPage.ToolbarItems>
<ToolbarItem Command="{x:Binding ChangeLayoutCommand}">
<ToolbarItem.IconImageSource>
<FontImageSource Glyph="{x:Binding Glyph}"/>
</ToolbarItem.IconImageSource>
</ToolbarItem>
</ContentPage.ToolbarItems>
<ContentPage.BindingContext>
<vm:NotesVM/>
</ContentPage.BindingContext>
<ContentPage.Content>
[1]: /answers/storage/attachments/111797-screenshot-2021-07-05-102504.png
I did what you told me but it doesn't show up
View Model
Glyph = IconFonts.Grid,
FontFamily = "material",
Size = 44
My view
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Safe.View.NotesPage"
xmlns:vm="clr-namespace:Safe.ViewModel"
xmlns:model="clr-namespace:Safe.Model"
xmlns:fi="clr-namespace:MaterialFonts.Fonts"
Visual="Material"
Title="Notes"
x:DataType="vm:NotesVM"
xmlns:syncfusion="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms">
<ContentPage.ToolbarItems>
<ToolbarItem Command="{x:Binding ChangeLayoutCommand}">
<ToolbarItem.IconImageSource>
<FontImageSource Glyph="{x:Binding Glyph}"/>
</ToolbarItem.IconImageSource>
</ToolbarItem>
</ContentPage.ToolbarItems>
Is the value of Glyph "\u000f02c1"? It should be escaped in XAML.
8 people are following this question.