How to set WPF window position in secondary display

后端 未结 3 2052
栀梦
栀梦 2020-12-15 18:46

I have two displays. I want to make a media player and I want to play video full screen on my secondary display. So I’m trying to make a media player using WPF

Here

3条回答
  •  无人及你
    2020-12-15 19:31

    I use the following in VS 2019:

    private void MaximizeToSecondaryScreen()
    {
        this.Left = SystemParameters.VirtualScreenLeft;
        this.Top = SystemParameters.VirtualScreenTop;
        this.Height = SystemParameters.VirtualScreenHeight;
        this.Width = SystemParameters.VirtualScreenWidth;
    }
    

提交回复
热议问题