Skip to content
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

Add NavigationViewItemSeparator lightweight styling theme resources #2206

Conversation

Felix-Dev
Copy link
Contributor

Description

This PR adds lightweight styling theme resources for the NavigationViewItemSeparator to enable easy customization of its default appearance without having to retemplate it. The following theme resources have been added (each using the current default values):

Foreground:

  • TopNavigationViewItemSeparatorForeground
  • NavigationViewItemSeparatorForeground

Margin:

  • TopNavigationViewItemSeparatorMargin
  • NavigationViewItemSeparatorMargin
  • NavigationViewCompactItemSeparatorMargin

Thickness:

  • TopNavigationViewItemSeparatorWidth
  • NavigationViewItemSeparatorHeight

Motivation and Context

Closes #2139.

How Has This Been Tested?

Tested visually.

Screenshots (if appropriate):

Top mode

First separator from the left uses default styling, second separator uses the following theme resources:

<SolidColorBrush x:Key="TopNavigationViewItemSeparatorForeground" Color="Orange" />
<x:Double x:Key="TopNavigationViewItemSeparatorWidth">2</x:Double>
<Thickness x:Key="TopNavigationViewItemSeparatorMargin">2,0</Thickness>

image

Margin:

image

image

Left mode (expanded + compact)

First separator from the top uses default styling, second separator uses the following resources:

<SolidColorBrush x:Key="NavigationViewItemSeparatorForeground" Color="Red" />
<x:Double x:Key="NavigationViewItemSeparatorHeight">2</x:Double>
<Thickness x:Key="NavigationViewItemSeparatorMargin">32,2</Thickness>
<Thickness x:Key="NavigationViewCompactItemSeparatorMargin">8,2</Thickness>

image

image

Margin (same for both left expanded and left compact mode)

image

image

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Apr 1, 2020
@StephenLPeters StephenLPeters added 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 Apr 1, 2020
@StephenLPeters StephenLPeters requested a review from ojhad April 1, 2020 20:08
@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 3, 2020

@Felix-Dev can you please merge with master which includes some stability fixes for the PR pipeline ?

@Felix-Dev
Copy link
Contributor Author

Felix-Dev commented Apr 3, 2020

@ranjeshj Done.

@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 3, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@StephenLPeters StephenLPeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

Copy link
Contributor

@StephenLPeters StephenLPeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Allow for full control over the styling of NavigationViewItemSeparator
6 participants