Overriding the main window class

Topics: Bootstrappers & IoC, Conventions, Getting Started
Dec 12, 2012 at 2:07 PM

Hi! I've been trying to integrate the Fluent Ribbon window (MS-Office style) with Caliburn Micro for a while now but could not find a way to do it..

The problem is, the Office styled window is a class derived from Window called FluentWindow and I need to somehow inject it as the main window of my application..

I tried overriding WindowManager's CreateWindow method but I still have to call the base.CreateWindow method so caliburn can generate the window and bind it to the ViewModel.. After that I'm stuck with a the default WindowClass..

Any suggestions how to inject the derived window into the application? Maybe a way to tell caliburn to create the FluentWindow object instead of the regular Window?


Dec 12, 2012 at 2:21 PM
Edited Dec 13, 2012 at 2:44 PM

You can define the view for the main view model as a FluentWindow, instead of a UserControl, so that CM will not create a Window itself. Given that the FluentWindow inherits from Window.

Feb 13, 2013 at 12:14 PM
For additional information:
Using Fluent Ribbon with Caliburn.Micro