开发者

WPF UI Architecture for segmenting the screen ui

Im building this Digital Signage prototype for a master thesis. Im using WPF and experimenting a bit. I have decided to go with UserControls as the main display unit, that is a UserControl to show an image, a usercontrol to show text and a user control to show video.

The main form ui has a grid, one row one column and it is in that grid i display the usercontrol selected.

I want to divide my ui into e.g. 2 column or 3 rows, the idea is that it should be easy to divide the screen into segments (grid?) making it possible for me to place a usercontrol into that section.

The real challenge is that the prototype should be used as some kind of proof of concept for the company im writing my master thesis with, hence it should be possible for their users to specify some kind of "layout".

Im thinking on two solutions:

One where the "layout" is a seperate UserControl that a developer creates and plugs into the system (this plugin system is already used for the image, text ad video display items). That would leave the user to first select a layout control, then somehow pick (how would i do that) the segment/cell in the layout they need a particlar userControl placed in (image/text/video).

The other is where i build the grid in some kind of designer, problem is that i need to make that designer, and make it possible to nest grids, making heights, widths, etc.

Please advice on either of these approaches, or any other approach that may work, im willing to experiment with anything :-)

ch开发者_Python百科eers


Check out the Prism library. It allows you to inject views into regions at runtime.


Just put all UserControl into the Canvas of the main window. Use size of the UserControl in % and calculate correct size and position.

It should work fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜