Search code examples
microsoft-metrofilepicker

Open File Picker in snap view of Metro Style App


When I try to open file picker on snap view in Metro Style App, exception occurs and exception dialog box was shown. How to solve that problem? Is there any good idea? I want my app works properly even on snap view.


Solution

  • Before opening the file picker, you must try to leave the snapped mode.

    Here is the code I use:

    var ready = true;
    if (ApplicationView.Value == ApplicationViewState.Snapped)
        ready = ApplicationView.TryUnsnap();
    if (!ready)
        return;