[solved] How to make window maximized?

Nov 20, 2010 at 6:38 PM
Edited Nov 20, 2010 at 6:38 PM

Hello,

I'm new to Caliburn and trying to gain some experience with it. I've tested the samples from the documentation but I
would like to know how I can get the window (ShellView) become fullscreen after it has been activated??

And what is the best base class for my application window, which also opens other dialogs and frames on button click?

 

Thanks in advance.

Nov 20, 2010 at 11:20 PM

If your ShellView is your Window, you can set the WindowState like this in XAML.

<Window x:Class="UIShell.Views.ShellView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.caliburnproject.org"
Height="600"
Width="800"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
         WindowStyle="None"
         WindowState="Maximized">

For a base class for the ShellViewModel, it sounds like you'll probably want to use a Conductor. You can check the documentation on Screens and Conductors for more info.
Nov 21, 2010 at 12:47 AM

Ah, many thank for it. Thought that every window managed by the MVVM framework must be a usercontrol. Changed it and it works fine.