ApplicationView.GetForCurrentView().ViewMode Returns 2 When Switching From Dual to Single Screen

Nathan Sokalski 4,126 Reputation points
2020-06-20T22:34:39.357+00:00

In my dual screen app, one of the events I attempt to use to detect when my app switches between single & dual screen is SizeChanged. In this event, I look at the following property:

ApplicationView.GetForCurrentView().ViewMode

However, when the user switches from dual screen to single screen, this still returns 2. I would have expected it to return to ApplicationViewMode.Default, since 2 (which is soon to be added as ApplicationViewMode.Spanning) is for dual screen. If I then click the Rotate button on the Emulator, it does return to ApplicationViewMode.Default. It seems like the value is only updated by the hardware (well, the Emulator, but what would be hardware for a real test), but not by the software (unspanning the app). Is this a bug? Is there a workaround? Am I doing something wrong? Thanks.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,724 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Fay Wang - MSFT 5,206 Reputation points
    2020-06-23T06:41:30.333+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Your issue is about dual screen, it's recommended to ask your question in GitHub-issues of WinUI.

    Thanks.

    0 comments No comments