question

njsokalski avatar image
njsokalski asked ·

ApplicationViewMode: What to do when a 2 is returned but ApplicationViewMode.Spanning is not included?

I am working on a dual screen app, and I am looking at the value returned by ApplicationView.GetForCurrentView().ViewMode. My app is returning a value of 2, which is kind of what I expect, except that the ApplicationViewMode enumeration (at least according to Intellisense) only includes Default & CompactOverlay. I understand that ApplicationViewMode.Spanning is being added, which will (I'm assuming) have a value of 2. But since Intellisense does not list this, what should I do when checking the value returned by ApplicationView.GetForCurrentView().ViewMode? Thanks.

windows-uwp
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

danielescipioni avatar image
danielescipioni answered ·

While waiting that the SDK includes ApplicationViewMode.Spanning value you can do something like that:

ApplicationViewMode applicationViewMode = ApplicationView.GetForCurrentView().ViewMode;
switch ((int)applicationViewMode)
{
    case 0: // Default
        break;
    case 1: // CompactOverlay
        break;
    case 2: // Spanning
        break;
    default:
        throw new ArgumentOutOfRangeException();
}
Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.