Customizing PaneToggleButton Icon and Position in NavigationView UWP

Sateesh Kumar N 1 Reputation point
2021-06-17T20:48:45.413+00:00

I have tried to change PaneToggleButton icon using the default style PaneToggleButtonStyle and changed the Icon to '>'

<TextBlock  
     x:Name="Icon"  
     Text="&#xE76C;"  
     FontSize="{TemplateBinding FontSize}"  
     AutomationProperties.AccessibilityView="Raw"/>  

But when I tried to achieve the following design, I am not able to move the Icon position to right as shown below
106761-samplenavigationview.png

So how can I create a custom template for PaneToggleButton ?

Developer technologies | Universal Windows Platform (UWP)

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,871 Reputation points
    2021-06-18T06:01:40.413+00:00

    Hello, Welcome to Micorosoft Q&A,

    Customizing PaneToggleButton Icon and Position in NavigationView UWP

    if you has checked NavigationView style. you will find TogglePaneButton was placed on the RootGrid and on the top level, but not on the pane, so you can't place it on the right of panel.

    For above design, the better way is make navigation base on SplitView. And make arrow button to control the splitview open or not.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.