I find that when I use Windows media player in WPF, if I set the full screen of Windows media player through code, and then I find that Windows Media Player exits the full screen mode when I pop up a window, why

陶陶 张 1 Reputation point
2020-12-28T03:33:24.61+00:00

I find that when I use Windows media player in WPF, if I set the full screen of Windows media player through code, and then I find that Windows Media Player exits the full screen mode when I pop up a window, why

code :

  axWindowsMediaPlayer1.fullScreen = true;
  var win = new Window();
  win.Show();
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,783 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. DaisyTian-1203 11,626 Reputation points
    2020-12-28T08:47:51.13+00:00

    The focus should leave on the axWindowsMediaPlayer1 control , the fullScreen of axWindowsMediaPlayer1 can take effect. You can adjust your code like below:

       var win = new Window();  
       win.Show();  
       axWindowsMediaPlayer1.fullScreen = true;  
    

    Then with the new Window opened, the axWindowsMediaPlayer1 doesn't exits the full screen mode.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.