SurfaceWindow在扩展桌面上 [英] SurfaceWindow on extended desktop

查看:178
本文介绍了SurfaceWindow在扩展桌面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我试图让SurfaceWindow显示在两个屏幕上(设置为扩展桌面)。但是,窗口仅显示在第一个屏幕上。我不需要在扩展屏幕上触摸命令,我只需要显示视频。我可以使用Window而不是SurfaceWindow的
但是直到手指稍微移动才触发TouchDown命令。有没有人知道这方面的方法?



谢谢,


Chris

解决方案

您是在尝试显示扩展桌面还是在第二个屏幕上尝试获取Surfacewindow程序?


如果你是第二种情况,那么你需要将SurfaceWindow的大小定义为偏离主屏幕区域。


让我说你有2个屏幕已满高清分辨率。通过扩展您的桌面,屏幕分辨率变为原始尺寸的时间。

因此,尺寸为宽度= 10920且高度= 1080的SurfaceWindow将显示在主屏幕和表面窗口上,宽度> 10920和高度> 1080将在extendend屏幕上显示。我们在传统的WPF应用程序中使用它,它猜测它应该在Surface应用程序上运行


然后你可以使用以下类型的测试来定义分辨率或在单个屏幕内

 if(System.Windows.SystemParameters.WorkArea.Width> 1920 || System.Windows.SystemParameters.WorkArea.Height> 1080)
{
//在巨型监视器上运行时缩小
Width = Math.Min(System.Windows.SystemParameters.WorkArea.Width,1920);
高度= Math.Min(System.Windows.SystemParameters.WorkArea.Height,1080);
WindowState = WindowState.Normal;
}

希望有帮助b


问候


哔叽


Hi,

I am trying to get a SurfaceWindow to display across two screens (setup as extended desktop). However, the window only shows on the first screen. I don't need touch commands on the extended screen, I just need to show a video. I could use Window instead of a SurfaceWindow but then the TouchDown commands are not triggered until a finger is moved slightly. Does anyone know a way around this?

Thanks,

Chris

解决方案

Are you trying to display simply the extended desktop or are you trying to get one of your Surfacewindow program on the second screen ?

If your are in the second case then you need to define the size of your SurfaceWindow to be off of the main screen area.

Let says that you ahve 2 screen with full HD resolution . By extendending your desktop the screen resolution became to time the original size.
So SurfaceWindow with size of Width=10920 and Height= 1080 will be shown on main screen and Surface window with Width >10920 and Height >1080 will be shown on extendend screen. We have use this in a traditionnal WPF application it guess it should work the same on Surface app.

Then you can use the following type of test on order to define resolution over or inside single screen

 if (System.Windows.SystemParameters.WorkArea.Width > 1920 || System.Windows.SystemParameters.WorkArea.Height > 1080)
            {
                // Shrink down when running on giant monitors
                Width = Math.Min(System.Windows.SystemParameters.WorkArea.Width, 1920);
                Height = Math.Min(System.Windows.SystemParameters.WorkArea.Height, 1080);
                WindowState = WindowState.Normal;
            }

Hope it helps

regards

serge


这篇关于SurfaceWindow在扩展桌面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆