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.
When to Modify the TwoPaneView Layout
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.
2 answers
Sort by: Most helpful
-
-
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.