-
Notifications
You must be signed in to change notification settings - Fork 698
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 New NavView VisualStateGroup #4659
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
</Storyboard> | ||
</VisualTransition> | ||
</VisualStateGroup.Transitions> | ||
<VisualState x:Name="PaneOverlay"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These VisualState names don't seem correct to me. @ranjeshj and @MikeHillberg for naming, maybe PaneOverlaying and PaneNotOverlaying
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@karenbtlai you need to merge in master to fix the key mismatch errors. |
dacd169
to
47f4a3a
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
if (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay) | ||
{ | ||
winrt::VisualStateManager::GoToState(*this, L"PaneNotOverlay", true /*useTransitions*/); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very comfusion here.
From your code, Likely PaneNotOverlay and PaneOverlay only happens when DisplayMode is CompactOverlay or Overlay.
So we should have 3 visual states other than 2:
- DisplayMode is not CompactOverlay or Overlay
- DisplayMode is ?Overlay, and Pane is closed
- DisplayMode is ?Overlay, and Pane is opened
Don't use PaneNotOverlay/Overlay, it's easy to mess up with the term: CompactOverlay or Overlay in splitview setting.
It's better to have the LeftNav in the name, for example: Pane???OnLeftNavigationView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added you to the email thread discussing the naming
Looks like these storyboards aren't referenced from the code behind anymore. Can we delete this? If so, can we remove the name from the storyboard definition as well? (We can only remove the name if we haven't published the storyboard in a release yet) Refers to: dev/NavigationView/NavigationView.cpp:101 in 3e2d182. [](commit_id = 3e2d182, deletion_comment = False) |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
</Storyboard> | ||
</VisualTransition> | ||
</VisualStateGroup.Transitions> | ||
<VisualState x:Name="PaneOverlaying" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do a testing that if the default NavigationVIew is set to minimal or compact in Xaml, will PaneNotOverlaying
code still called?
Because your default state is PaneOverlaying, and I want to make sure PaneNotOverlaying working in some default settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does. I confirmed it with different test pages where minimal and compact is the default.
🎉 Handy links: |
Description
PaneOverlayGroup
to controlPaneOverlay
andPaneNotOverlay
vistual statesSplitView
from WUXC to add cornerRadius templateBindings toPaneRoot
OverlayCornerRadius
to SplitView duringPaneOverlay
stateMotivation and Context
How Has This Been Tested?
Visual verification
Screenshots (if appropriate):