Olivier Samson
Olivier Samson

Reputation: 703

Windows Template Studio - Customizing the Navigation Pane

I am trying to customize the style of my Navigation Pane but I have found difficult to access the UI elements related to it. Basically, I would want to have the top part of the navigation pane as a certain color, which would be a continuation of our header. This is what I have now :

enter image description here

I would need to be able to change the color of the back button and hamburgermenu button areas but I can't seem to be able to access these elements like the rest of the navigationViewItems.

How can I achieve this? I am using the Navigation Pane project type with the Code Behind design pattern.

Thanks.

Upvotes: 0

Views: 297

Answers (1)

Xie Steven
Xie Steven

Reputation: 8611

You could edit the NavigationView's template to achieve your target. Go to the 'Document Outline -> right click your navigation view control -> Edit Template -> Edit a Copy'.

For example, if you want to change the color of the back button, it should be in the 'NavigationBackButtonNormalStyle' like this:

<Style x:Key="NavigationBackButtonNormalStyle" TargetType="Button">
        <Setter Property="Background" Value="Red"/>
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
        ....
 </Style>

You could change its background, foreground etc.

Upvotes: 1

Related Questions