Winform Extend and Replace

Oct 22, 2010 at 8:42 AM

Hello. I'm just finsihed going through the Caliburn Micro (CM) framework articles and would like to know if the framework can handle the following scenario.

We have a large WinForm application that we want to extend with WPF MVVM and over time replace parts of the application until it is a full WPF MVVM application. The design is hub and spoke where a single main screen calls out other model screens, so I thought CM's concept of screens and supervising conductors would be especially useful. I was thinking of putting the bootstapper code in the Winform startup that creates a dumb hidden root screen (using System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop) and have an API manager class to create new root screens/Conductors as required. The problem I see is that in some cases data needs to be sent back to the calling Winform application but I can't see how that can be done unless a coroutine or like is used?

Is this possible with this framework or is this sort of thing outside of the design possiblities?

Coordinator
Oct 22, 2010 at 2:24 PM

I haven't done something like this before, but your plan seams to make sense. You should consider using the EventAggregator to send messages between the two sub-systems. I haven't written the article on that yet, but I can send you a sample if you email me. Someone just asked about this yesterday, so I should probably prioritize writing that article...In any case, you will probably need to slightly alter the implementation of the built-in implementation so that it doesn't have any WPF dependencies, but that shouldn't be too hard.

Oct 25, 2010 at 6:51 AM

Thanks, I will. I'm really trying to get enough proof of concept applications up and going before we dive into using this framework.

So far our experience with using WPF MVVM within the application requirements have been like having a small hole through a glass window. We can stick a hand through to touch some very nice things but can't get there just yet. Especially with the design time starting to run out...