-
Notifications
You must be signed in to change notification settings - Fork 459
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
Update the Shell Page of the NavPanel to use the new NavigationView control #308
Comments
goal here is to use the UWP Community Toolkit control, they will do the heavy lifting to support it, we migrate off once we have mainstream Fall Creators Update support. We won't migrate to this for a bit. |
cross ref: #212 |
Yes, there was a PR somewhere for moving to the community toolkit version. Added this when I discovered that the FCU will have a native control. At that point, we should switch to the native control, from the toolkit. |
agreed but that won't be for a bit due to the n-1 release rule. |
@crutkas Xref #334 would be good to understand the implications of the N-1 rule. It also stops the ability to use WTS to explore new SDKs when they are out in preview. It's also the cause of #327. If we can get stats on the distribution of what versions people are running it would really inform this decision. |
This will happen after next release after Fall Creators Update |
we are not updating to NavView until the next full update of Windows. The UWP Toolkit will handle a smart flip for this control depending on the build you are on. |
This will happen in the spring 2018 time frame :) |
There is a documentation to explain how to move to NavigationView from HamburguerControl. |
I will have a look on that. |
The toolkit documentation is something we should point anyone with an existing app too. Need to consider the impact on Settings in particular and try our best to not break backward compatibility when using 2.x templates to add pages or features to projects created with 1.x. |
I've been working on adding NavigationView control to SplitView projects. In this branch can be generated apps that uses NavigationView control with all project types, Mvvm Basic framework, and Blank-Settings pages. The first approach done is based on NavigationView documentation. We were trying to not use the Switch sentence on ShellViewModel and after finding this article on Jerry Nixon we update the templates to generate the apps using an Extension Class. CountriesApp_Switch.zip Templates update summary:
@mrlacey @crutkas could you please review the two different approaches? IMO Extensions created by Jerry Nixon is a better solution but could be not easier to understand to a new developer in the platform, but this removes a postaction on ShellViewModel and you can not break the navigation by changing a Tag property. |
I'm agree with your naming proposal Matt. |
Title TextBlock is defined in a composition template with the filter ProjectType != NavigationView. We only need to update this to ProjectType = Blank. |
I think we can remove the "Title TextBlock" from every page regardless of project type. It's basically just placeholder content and expected to be removed anyway. |
Thats true, but the blank project would be very blank without the title I guess. It also provides guidance about how to localize strings |
Actively working on the VB versions |
VB template merged. I was checking that all works fine. I'm going to remove the titles on Pivot Projects on a separated commit. |
On this commit I've updated the ItemNameEditable property to enable pages to be single instance template. This is oriented to set a fixed name to settings page because NavigationView isn't thought to have more than one settings page. |
NavigationView is setting the settings page name always to "Settings" (or its localized values) independently of the name you choose, that's why we think settings page name should not be configurable in the wizard to avoid confusion. But we loose the possibility to rename it on the Tabbed/Pivot (and Blank) project type too. Telem for the last month has been 70% SplitView (15% each Blank and Tabbed Pivot) |
Pull Request added! #2115 |
Created #2126 to see if we can re-enable name editing for settings page in project type blank and tabbedpivot. |
NavigationView is in dev now. @lee or @milazzom could you have a look at the Prism implementation. @nigel-sampson could you have a look at the Caliburn.Micro implementation. Thanks!! |
Will take a look tonight thanks @sibille |
@mrlacey, for CodeBehind the helper method that looks for the correct NavigationViewItem comparing NavHelper and SourcePage type is called |
@sibille yes |
I've raised a PR to standardize the names |
Looks ok to me, a little sad to see the move away from a more view model driven approach and having the view "leak" into the view model as raised earlier by @mrlacey but some of the binding limitations on navigation view make this unfeasible. There could be some ways to work around this given we're already abstracting the view behind an interface though. |
Verified in |
Use the new native control when targeting Fall Creators Update
https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/navigationview
The text was updated successfully, but these errors were encountered: