2

I am trying to implement screen mirroring onTV using a wifi dongle for windows 8.1 tablet. I used the projectionmanager class provided by microsoft, but for some reason its not able to detect the secondary display. Following is the code:

 bool available = ProjectionManager.ProjectionDisplayAvailable;

 ProjectionManager.ProjectionDisplayAvailableChanged += (s, e) =>
 {
       available = ProjectionManager.ProjectionDisplayAvailable;
 };

 int thisviewid = ApplicationView.GetForCurrentView().Id;
 // CoreDispatcher preseDispatcher= await ((App)App.Current).CreateNewView;
 ApplicationView appView = ApplicationView.GetForCurrentView();

 CoreApplicationView view = CoreApplication.CreateNewView();
 ApplicationView newAppView = ApplicationView.GetForCurrentView();
 await view.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,() =>
      {
          Window newWindow = Window.Current;

          var rootframe = new Frame();
          rootframe.Navigate(typeof(Projection),null);
          Window.Current.Content = rootframe;
      }
 ); 
 await ProjectionManager.StartProjectingAsync(newAppView.Id, appView.Id);

when I debugged the code, the ProjectionsDisplayAvailable value remains false. Not sure how to proceed on the same or make this working

4

0 回答 0