When to Modify the TwoPaneView Layout

Nathan Sokalski 4,106 Reputation points
2020-06-08T02:46:04.643+00:00

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

https://learn.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/two-pane-view

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.
39,702 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nathan Sokalski 4,106 Reputation points
    2020-06-08T17:05:32.37+00:00

    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 33,371 Reputation points Microsoft Vendor
    2020-06-09T02:59:55.877+00:00

    Hello,

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.