Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Pinning secondary windows alongside 3D scenes for same app in hololens

HarmanHarman
edited June 2017 in Questions And Answers

I am trying to create a holographic app where i have a 3D scene created in Unity. Upon interaction with a 3d model in that scene, i want a plane that renders a webpage to pop up alongside the model. To achieve this i have created a UWP plugin using ApplicationViewSwitcher to switch to another window with the following code:

ApplicationView currentAppView = ApplicationView.GetForCurrentView();
            mainViewId = currentAppView.Id;
            CoreApplicationView newCoreAppView = CoreApplication.CreateNewView();
            bool result = true;
            newCoreAppView.Dispatcher.RunAsync(
              CoreDispatcherPriority.Normal,
              async () =>
              {
                  Window newWindow = Window.Current;
                  var webView = new WebView(WebViewExecutionMode.SeparateThread);
                  webView.Navigate(new Uri("http://www.bing.com"));
                  webView.DoubleTapped += SwitchView;
                  newWindow.Content = webView;
                  newWindow.Activate();
                  ApplicationView newAppView = ApplicationView.GetForCurrentView();


                   result = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(
                        newAppView.Id,
                        ViewSizePreference.UseHalf,
                        currentAppView.Id,
                        ViewSizePreference.UseMore);
              });

I am able to successfully load a new 2d window with the webpage upon interaction but the original 3d scene gets lost. My expectation was some sort of pinned window displaying webpage alongside the 3d scene. Can someone suggest approaches to achieve that?

@HoloSheep ?

Sign In or Register to comment.