开发者

In WPF how do you write an application for multiple screens?

I have been asked to look into writing an application that will be a very very large application, expanding over 9 screens at (obviously) a very high resolution.

My question is, what is the best way to go about doing this?

Do I just write a开发者_如何学Gon application that is (1024x3) x (768x3)? How on earth can I do that at development time? I won't be able to see the application running, or perhaps I can develop with a RenderTransform that scales is back down to 1024x768 and remove that transform at deployment time?

What about the performance of the system? We will have a very powerful PC powering it all, with a great graphics card, but will WPF be able to cope with this sized application OK?


I have written such an app two years ago (It was more a hack than an app but the client was happy with it).

I used for every screen a window and had a configuration that mapped the windows to the screens (In my environment, not all monitors had the same resolutions). I used also scaling so that I could place all windows on one screen (on my dev-machine).

As I remember we had about five or six PCs and something more than 20 screens. Some of the PCs had NVidia Quad-graphics cards, others served only two monitors.

What I remember is, that the performance of the quad-graphics cards was very little. It was not possible to include nice visual effects. In my project this was not a big issue and therefore I digged not deeper into the reasons why it was so slow. Maybe it was only a configuration problem. But make sure to make some tests on such a multi-monitor-PC before investing a lot of time for developping, to remark afterwards that that app is not useable because of its visual slowness.

If your app will have a lot of visual changes and you want to see them in a acceptable framerate, here some thoughs:

  • Check if the graphics card supports hw-rendering for each screen. If not, the fill rate for 9 screens would be huge and the performance will go down.
  • For your project, generally beware of Effects such as DropShadowEffect. They can affect the calculation of the dirty regions in a way that the whole screeen or big regions will be repainted. Use perforator to make shure that no unnecessary drawings will happen. This would be fatal.
  • If you can split the big screen to smaller ones, I would recommend (one Window per monitor). This gives you more flexibility if you encouter problems. If the rendering of some areas is independent to others, think about using 5 cheap pc's, make one the master and connect them through WCF. Render per pc two monitors.

Undelete after deleting the post

I undeleted my answer because you asked for. But with over 50 views and not one upvote it seems that my fear is not justified. And as I wrote, we had a much higher screeen resolution in my project. With only 1024*768 and two years later, performance is maybe no more an issue. But I would take care.


Take a look at SystemInformation.VirualScreen in Windows.Forms

For WPF use SystemParameters.VirtualScreenHeight and SystemParameters.VirtualScreenWidth. Not sure how WPF copes with that, at least you will know the resolution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜