I'm working on a WinUI 3 app, and I'd like to have my SplitView.Pane permanently open. I used this StackOverflow answer to try and solve the problem, however doing
private void SplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args)
{
args.Cancel = true;
}
will stop all mouse events to children elements of the SplitView.
My question is whether there is a different way to keep the SplitView from closing its pane, or maybe another component to give me the same look as the SplitView without the pane being able to be closed.
Andrew KeepCoding
15.5k2 gold badges26 silver badges41 bronze badges
asked Jul 4, 2023 at 13:10
Borisonekenobi
5294 silver badges19 bronze badges
1 Answer 1
Besides setting IsPaneOpen to True, try setting DisplayMode to Inline.
<SplitView
DisplayMode="Inline"
IsPaneOpen="True">
<SplitView.Pane>
<TextBlock Text="Pane" />
</SplitView.Pane>
<TextBlock Text="Content" />
</SplitView>
answered Jul 4, 2023 at 13:19
Andrew KeepCoding
15.5k2 gold badges26 silver badges41 bronze badges
Sign up to request clarification or add additional context in comments.
2 Comments
Borisonekenobi
I was trying to, you answered too quickly, and StackOverflow wasn't letting me accept an answer yet!
Andrew KeepCoding
Didn't know that StackOverflow doesn't let you accept answers too soon. Good to know. Thanks!
default