When to Modify the TwoPaneView Layout

Nathan Sokalski 4,056 Reputation points

I am working on learning how to use the TwoPaneView with Dual Screen devices. Using the following page:


I have determined that this would be done using the ModeChanged event. However, the 2 things I need to know are:

Orientation: I believe I can get this from the Mode property during the ModeChanged event (Tall or Wide)
Single or Double Pane: I would have thought I could get this from the Mode property as well, but TwoPaneViewMode only contains a SinglePane value, which does not tell me the orientation

I have also noticed (and maybe this is just me) that ModeChanged does not seem to always get triggered, especially for SinglePane (or maybe this is just the Microsoft Emulator). But either way, I'm not sure how to get the info I need to determine how to determine the appropriate layout adjustments. Can somebody help me? Thanks.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
26,998 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nathan Sokalski 4,056 Reputation points

    I think I may be better off using the SizeChanged event of the Page, since it seems like ModeChanged is not triggered when using only 1 screen. I'm not sure how else to be always notified for the layout changes I need to make. I may end up making use of ModeChanged once I am more familiar with the Mode property and TwoPaneView, but for now, I might need to save that for the future.

    0 comments No comments

  2. Roy Li - MSFT 29,326 Reputation points Microsoft Vendor


    Welcome to Microsoft Q&A!

    Your issue about TwoPaneView is more related to WinUI. It's an open-source in Github, you could ask your question in GitHub-issues.

    Thank you.

    0 comments No comments