-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make MA.M more MVVM-friendly #999
Comments
Off-Topic: issue number 999 |
Opening a Flyout is relatively complex in a MVVM scenario.
Works very nicely but you have to know how to use Caliburn's event aggregator. |
Way to complicated ... especially for one that just begins using/learning MVVM ... 😒 |
Here are some code samples from my app to get you started, Note that this uses Caliburn.Micro Interface common to all flyout viewmodels (probably best to make an abstract base class for convenience)
Flyout definiton in your MetroWindow:
Inside your metro windows's viewmodel (e.g. shell):
Here's how to use caliburn attached messages to call the toggleflyout methods:
|
Here is my (possibly not constructive) input on this issue: MahApps.Metro is a UI library, we shouldn't care if the user uses MVVM, MVC, what-have-you. The End. |
@flagbug 👍 |
@flagbug if WPF developers in MS also thought so, then we never see controls with binding support and other cool features. |
I'm with @flagbug, MA.M is an UI library and should be agnostic to any MVVM, MVC, whatever framework. |
I guess, in order to combine the two worlds, the best would be to create a library MA.M + Caliburn.Micro |
Can a contrib project be launched, now that MahApps is in v1.0 stage, that folks can start dumping what they've done to solve common problems in the MVVM space (e.g. showing a dialog via an IDialogManager) in some sort of way that makese sense? |
I've started with my own (opiniated) MVVM library based on MahApps.Metro, see TinyLittleMvvm. It still lacks some documenation though. |
Meantime, I've discovered Caliburn.Metro which seems to be a good start in this direction (Caliburn.Micro + MA.M) |
link @papuashu ? |
@remcoros I might be missing something in here. Where do you specify the UserControl that should appear inside the Flyout? In case of multiple Flyouts, how do you specify that? Thanks |
There are some things in our library that can be made for or improved for MVVM scenarios. We should try to figure out how to make those non-friendly sections more friendly. (Feel free to discuss here or in gitter.)
The text was updated successfully, but these errors were encountered: