c# - Change Layouts from Navigation Drawer (UWP) -
i know basic question none of tutorials found explain me.
so have mainpage.xaml has navigation drawer.
then have transferpage.xaml has different content on it. tried doing this:
private void mylistbox_selectionchanged(object sender, selectionchangedeventargs e) { frame frame = new frame(); if (startlistboxitem.isselected) { frame.navigate(typeof(transferpage), null); } }
but didn't work. need transfer page 1 page 2 while keeping navigation drawer.
please ask me more specific before downvoting.
as @codexnz said frame
instantiated not on page. requirement, set frame
splitview.content
following:
<splitview.content> <frame name="myframe"/> </splitview.content>
and navigate page it, more detail refer code sample.
private void mylistbox_selectionchanged(object sender, selectionchangedeventargs e) { if (mainitem.isselected) { myframe.navigate(typeof(homepage)); } else if (favourititem.isenabled) { myframe.navigate(typeof(favouritepage)); } }
Comments
Post a Comment