Search code examples
winrt-xamlwin-universal-apptemplate10

how to put a seperate view inside a splitview in template 10?


basically I want this splitview from MainPageView to load the departmentView which contains its own ViewModel that has an Observablecollection

        <SplitView.Pane>
            <Frame>
                <local:DepartmentsView/>
            </Frame>
        </SplitView.Pane>

but it has to be in sync with the navigation service. because I am relying on the template10's OnNavigatedToAsync to load my data


Solution

  • This is interesting. Nobody has ever asked for this before. I am not 100% sure you want the Template 10 hamburger menu in this circumstance. Why? Because the T10 HamMenu is really built around the idea of managed buttons in the Pane. There is NOTHING stopping you from simply adding your own SplitView control to your app and doing what you are wanting. The more I think about it the more I think that might be the best thing for you to do. If you think otherwise, please explain. Otherwise, just adding a SPlitView might not have been an option you thought of until now. The HamMenu in T10 uses the SplitView control.