Skip to content

Integrate FontAwesome in NavigationViewItem  #675

@oghenez

Description

@oghenez

Hello

I have struggled to incluse fontawesome without success.
First in my App.xaml file i included like this

 <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemeResources />
                <ui:XamlControlsResources />
            </ResourceDictionary.MergedDictionaries>
          
            <FontFamily x:Key="FontAwesome">pack://application:,,,/NavigationDemo;component/Fonts/FontAwesome-5-Free-Regular-400.otf</FontFamily>

        </ResourceDictionary>
    </Application.Resources>
</Application>

and i tried to use like this


<ui:NavigationViewItem Content="Add" Tag="home">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon FontFamily="{StaticResource FontAwesome}" Glyph="&#xf015;" /> 
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                
                <ui:NavigationViewItem Content="customer" Tag="customer" Icon="Contact"/>

But without success, pls can someone help me out

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions