Welcome to WindowsClient.net | Sign in | Join

Rob Relyea - XAMLified

WPF, Silverlight and XAML

Syndication

Sponsors





  • advertise here
David Teitlebaum: VideoWall with WPF

David, a WPF/Silverlight graphics PM, did a short write-up recently on some tips that he has shared with customers doing VideoWalls.

WPF applications can only run with hardware acceleration when their window's size does not exceed the maximum texture size allowed by the machine's video card (typically 4k x 4k or 8k x 8k).  This is not normally an issue when running applications on a typical monitor, but when running applications whose windows span multiple monitors, it is very easy to resize the window so large that the maximum texture size is exceeded.

One way to work around this, and allow a single application to span multiple monitors without falling back to software rendering, is to create a separate window for each monitor.  Each window can be dragged to the appropriate monitor and maximized to fill the whole monitor.  Depending on the type of content to be displayed, getting your application's content to span multiple monitors can be as easy as filling each window with a visual brush displaying some section of your overall application.  This may not work well for all content types, and will not allow for interactivity as it's a visual brush, but for a large class of display-only solutions including video walls, this can work well.

Initial sample (and future enhancements) can be found here: http://robrelyea.com/demos/videowall

Sample overview:

The basic idea is to create one MediaElement and create n ViewportWindows, which split amongst monitors, or not, show a segment of the video by rendering a visual brush of a segment of the MediaElement.

I’ve taken David’s initial technology example, and evolved the API/factoring a little bit.

The user of each ViewportWindow can right click to load a new video, pause/resume, create a new window, close window, and exit the application. Each of the ViewportWindows can be dragged and dropped via the small square in the upper right of the window.

My guess is that there are several enhancements that we’ll be able to do to this…hope it is helpful.

Published Friday, June 11, 2010 9:07 AM by Rob_Relyea

Comments

# re: David Teitlebaum: VideoWall with WPF@ Friday, June 11, 2010 7:15 PM

Rob

I've used the WPF perf tool and see that our app is not getting h/w acceleration. We don't have this case of windows spanning monitors.

Is there a way to discover why we're s/w rendered?  There's plenty of gfx memory etc..

Any tips or links?

by jps

# Windows Client Developer Roundup for 6/14/2010@ Monday, June 14, 2010 1:09 AM

This is Windows Client Developer roundup #28. The Windows Client Developer Roundup aggregates information

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Page view counter