Skip to content

How to compose icons in NavigationViewItem.Icon #10062

Answered by castorix
Balkoth asked this question in Q&A
Discussion options

You must be logged in to vote

I have decided not to pursue copying and modifying the template. I would rather create a custom control that can be inserted everywhere an IconElement is expected that can compose and render multiple icons into a single one like presented above.

If anyone has an idea to get me started...

I made a test with a class derived from FontIcon
It is draft code, with hardcoded heart icons, but it can be a basis for a better code...

namespace WinUI3_IconControl
{
    /// <summary>
    /// An empty window that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainWindow : Window
    {
        public MainWindow()
        {
            this.In…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@castorix
Comment options

@Balkoth
Comment options

@Balkoth
Comment options

@castorix
Comment options

Answer selected by Balkoth
@Balkoth
Comment options

@Balkoth
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants