2

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

1 Answer 1

3

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
Sign up to request clarification or add additional context in comments.

2 Comments

I was trying to, you answered too quickly, and StackOverflow wasn't letting me accept an answer yet!
Didn't know that StackOverflow doesn't let you accept answers too soon. Good to know. Thanks!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.