mans
mans

Reputation: 18168

How to set the style of windows in caliburn micro

In calibrun micro, the main window is created by caliburn and I have no access to it. How can style it. For example I want to make it un-resize-able and so on.

Upvotes: 1

Views: 1571

Answers (1)

Adrian Fâciu
Adrian Fâciu

Reputation: 12552

Caliburn micro has WindowManager class. You can create your own class derived from this one and override CreateWindow method.

Example:

public class CustomWindowManager : WindowManager
{
       protected override Window CreateWindow(object rootModel, bool isDialog, object context)
        {
             var window = base.CreateWindow(rootModel, isDialog, context);

             window.Style = YourCustomStyle; 

             return window;
        }
}

Upvotes: 3

Related Questions