I've seen that is possible editing a NavigationViewItem control template by accessing the item "LayoutRoot" in a Grid, so I would like to know which elements build the navigationview in order to create a control template with a custom Style.
Asked
Active
Viewed 526 times
0
-
You can right-Click on your NavigationView from the visual designer, then click on Edit Template -> Edit a copy. This will create the default template for the NavigationView. In the default template, there is a Grid named RootGrid, it contains the layout of the entire NavigationView, you can start with it. Can you tell us what style do you want to create for your NavigationView? – Faywang - MSFT May 05 '20 at 06:29
-
Hi, thanks for your answer. I didn't know that option from Visual Studio. I would like to have a navigationview similar to the one in MS To-Do app, where the pane has acrylic background, keeps open when the screen is big and it's extended in the titlebar. Those would be my main needs. – mrcstr May 05 '20 at 07:29
-
If you didn't know how to get the style of NavigationView from the above step, you can go to generic.xaml to get the default template. But in this scenario, it is recommended to use [SplitView](https://learn.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/split-view) to achieve the effect like MS To-Do app, you could try to use it. – Faywang - MSFT May 05 '20 at 09:34
-
Ok, I think the simplest way would be using a SplitView, since adapting the NavigationView behaviour it's been complex due to its many components. Thanks for your help. – mrcstr May 05 '20 at 17:58