Reputation: 10201
I'm fairly new to WPF and wish to create what I call a "widget framework". My app would have a window with a canvas where I can place one or more "widget" user controls, which can be dragged around and resized. All widgets will have a common "chrome", perhaps with buttons along the top to maximise/minimise, open a configuration dialog, etc.
In my winform days I would have created a base class user control containing the common UI elements, with each widget user control inheriting from this, however I believe WPF has no equivalent of user control inheritance.
So I'm looking for pointers to get me started. Does the answer lie in templates, user controls, both? Any code snippets or examples would be greatly appreciated!
To get an idea of what I'm looking for, take a look at the "Chronos WPF" framework on Codeplex - http://chronoswpf.codeplex.com/. It's a widget framework and more - I tried in vain to unpick the widget stuff but the source is a huge beast and is also intertwined with a composite application framework. Alas it's no longer being actively developed either.
Upvotes: 0
Views: 178
Reputation: 4680
A possible MVVM based solution for this would look as follows:
Upvotes: 1