views:

159

answers:

0

I am mulling over various ways to provide both navigation and general functionality in a WPF/MVVM/Unity application (the app is effectively database front-end, with usual record editing, reports, etc).

I have an expander-type vertical bar to select views which is fine. But, I now feel I need a toolbar (perhaps ribbon style) to be visible at all times, and where its functionality varies with the view activated at any one time. I would like to show/hide toolbars or ribbon tabs depending on the view and even the view's state - e.g. if you are looking at a client record, "Print" prints that,; if looking at a report, "Print" prints the report, whereas "Edit"/"Add"/"Delete" can only apply to a client record.

But, how to marshal all this? Put the toolbar/ribbon in a separate region? How to enable/disable or show/hide the toolbar buttons/ribbon tabs? How to have a mapping of view and functionality that can be easily updated when something new is added to a module or view? How to keep things as loosely coupled as possible?

Event aggregation seems potentially complex and command binding seems more promising - but how do I (in effect) bind between viewmodels?

A web trawl has yielded little on this subject - perhaps my UI design is sub-optimal in the WPF world and perhaps menus of any style should be designed out....

Any direction in this whole area gratefully received!

J Stewart