Nuget Package Installation

Installing the Package

After Installation

Clean out your App.xaml.cs file so that it looks like this:

namespace YourNamespace
{
    using System.Windows;

    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
        }
    }
}

Add the AppBoostrapper to your App.xaml's Resources section as shown for the appropriate platform:

Silverlight
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:YourNamespace"
             x:Class="YourNamespace.App">
    <Application.Resources>
        <local:AppBootstrapper x:Key="bootstrapper" />
    </Application.Resources>
</Application>

WPF

Note: Make sure to remove the StartUri value. Caliburn.Micro will be handling the main window creation for you.

<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:YourNamespace"
             x:Class="YourNamespace.App">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <local:AppBootstrapper x:Key="bootstrapper" />
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>


Last edited Apr 5, 2011 at 11:54 PM by EisenbergEffect, version 5

Comments

nbarnwell Feb 20 at 11:45 AM 
Is the package name still relevant? I'm fairly sure one needs to install Caliburn.Micro.Start these days?