locked
Launch a file in WinRT using half screen

    Question

  • Im trying to open a file in a Windows Store App , with half the screen but so far i havent got it to work

    this is the code im using

    try
                        {
                            var options = new Windows.System.LauncherOptions();
                            options.DesiredRemainingView = Windows.UI.ViewManagement.ViewSizePreference.UseHalf;
                            var urii = new Uri(file.Path);
    
                            var success = await Windows.System.Launcher.LaunchUriAsync(urii, options);
                        }
                        catch (Exception e)
                        {
                            Debug.WriteLine(e.Message);
                        }

    the file.path is

    C:\Users\xxxx\AppData\Local\Packages\xxxxxxx\LocalState\Data\chap4_slides.ppt

    and i can launch the file if i use

    await Windows.System.Launcher.LaunchFileAsync(file, options);

    but it doesnt uses half the screen am i doing something wrong?

    Tuesday, October 14, 2014 12:58 PM

Answers

  • Hi Thought2,

    I think you are right. If we want to share the screen with another app, it should a runtime app. Call desktop app will not share screen with a runtime app yet. You can send a request on UserVoice to ask for this new feature.

    A work around is to use multiple windows for an app. You may try to write a container window for the purpose to show a PPT file. See Quickstart: Createing multiple windows for an app.

    If you still have questions about your problem, please post more information about your scenario.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, October 29, 2014 5:04 AM
    Moderator

All replies

  • Perhaps it is up to the application that you call. If I use ...

    StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Data/Doc.pdf"));

    if (file != null)
    {
          var options = new Windows.System.LauncherOptions();
          options.DisplayApplicationPicker = true;

          await Windows.System.Launcher.LaunchFileAsync(file, options);
    }

    The app opens in the half screen.

    Maybe the application connected to your *.ppt needs to use the whole screen?

    Regards

    Torsten


    Tuesday, October 14, 2014 2:11 PM
  • hmm i see 
    with pdf it worked well since it uses the reader app, my .ppt was getting opened by office so im guessing my app wont share screen with my desktop apps :\
    Tuesday, October 14, 2014 3:23 PM
  • Hi Thought2,

    I think you are right. If we want to share the screen with another app, it should a runtime app. Call desktop app will not share screen with a runtime app yet. You can send a request on UserVoice to ask for this new feature.

    A work around is to use multiple windows for an app. You may try to write a container window for the purpose to show a PPT file. See Quickstart: Createing multiple windows for an app.

    If you still have questions about your problem, please post more information about your scenario.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, October 29, 2014 5:04 AM
    Moderator