Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to show svg image in NavigationViewItem? #3846

Closed
BorzillaR opened this issue Dec 21, 2020 · 3 comments
Closed

Question: Is it possible to show svg image in NavigationViewItem? #3846

BorzillaR opened this issue Dec 21, 2020 · 3 comments
Labels
area-Images Images, SVG area-NavigationView NavView control question team-Controls Issue for the Controls team

Comments

@BorzillaR
Copy link

Hello!

I want to show svg image in NavigationViewItem in my WinUI for UWP application.
Is it possible?

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Dec 21, 2020
@YuliKl
Copy link

YuliKl commented Dec 21, 2020

@BorzillaR Ideally, you're looking for SVG support in BitmapIcon, as proposed in #1494. Unfortunately that doesn't work yet. Instead, you can retemplate your NavigationViewItems to use an Image instead of an icon, and add SVGs that way. Not sure if that feels like the right amount of work for your scenario.

@YuliKl YuliKl added area-Images Images, SVG area-NavigationView NavView control team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Dec 21, 2020
@BorzillaR
Copy link
Author

@YuliKl, thank you!

@maxkatz6
Copy link
Contributor

Also NavigationViewItem uses IconElement in the API, so it should be possible to define your own IconElement with svg support inside of its template or copy source of BitmapIcon. I haven't tested it, but should just work.

@microsoft microsoft locked and limited conversation to collaborators Jul 22, 2022
@bkudiess bkudiess converted this issue into discussion #7506 Jul 22, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area-Images Images, SVG area-NavigationView NavView control question team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

3 participants