c# - state manager for xaml SplitView pane inside frame -
that's kind of long title. have shell.xaml content .xaml's
<grid> <visualstatemanager.visualstategroups> <visualstategroup> <visualstate> <visualstate.statetriggers> <adaptivetrigger minwindowwidth="720" /> </visualstate.statetriggers> <visualstate.setters> <setter target="shellsplitview.displaymode" value="compactinline"/> </visualstate.setters> </visualstate> <visualstate> <visualstate.statetriggers> <adaptivetrigger minwindowwidth="0" /> </visualstate.statetriggers> <visualstate.setters> <setter target="shellsplitview.displaymode" value="overlay"/> </visualstate.setters> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups> <splitview x:name="shellsplitview"> <splitview.pane> <grid> <listview x:name="navmenulist"> ... </listview> </grid> </splitview.pane> <frame x:name="contentframe"> </frame> </splitview> </grid>
inside frame other .xaml's loadad actual content. use (to add further depth, mail app: folder->email list->email view) if add nested xaml doesn't anything.
my goal have behave 2 separate frames when in small view (like phone), user can navigate between them (again, win10 mail app).
right visualstatemanager of frame xaml looks this, test see working. mentioned i'd prefer similar behaviour mail app.
<visualstatemanager.visualstategroups> <visualstategroup> <visualstate> <visualstate.statetriggers> <adaptivetrigger minwindowwidth="720" /> </visualstate.statetriggers> <visualstate.setters> <setter target="peoplesplitview.displaymode" value="inline"/> </visualstate.setters> </visualstate> <visualstate> <visualstate.statetriggers> <adaptivetrigger minwindowwidth="0" /> </visualstate.statetriggers> <visualstate.setters> <setter target="peoplesplitview.displaymode" value="compactinline"/> <setter target="peoplesplitview.ispanelopen" value="false"/> </visualstate.setters> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups>
also when resizing window, content of frame splitview content doesn't resize , stays full width (thus not wrapping text).
<splitview x:name="peoplesplitview" displaymode="inline" ispaneopen="true" openpanelength="400" compactpanelength="48"> <splitview.pane></splitview.pane> <splitview.content> <grid padding="0"> <listview.../> </grid> </splitview.content> </splitview>
you need delete element of c# code found in event of listview selects frames
i think should you
private void listviewsplit_tapped(object sender,tappedroutedeventargs e) { //delete lines if (mysplitview.ispaneopen) mysplitview.ispaneopen = !mysplitview.ispaneopen; }
Comments
Post a Comment