Question

I want to try to create a WPF application with Caliburn.Micro framework, but I have a problem. I saw many sources for tutorial in Silverlight but not good on WPF. I have everything like in Silverlight tutorials, everything is compiled but not rendering.

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

bootstrapper

namespace CaliburnTest
{
    class AppBootstrapper : Bootstrapper<AppViewModel> {}
}

AppView

<Window x:Class="CaliburnTest.Views.AppView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="AppView" Height="350" Width="525">
    <Grid>

    </Grid>
</Window>
namespace CaliburnTest.Views
{
    public partial class AppView
    {
        public AppView()
        {
            InitializeComponent();
        }
    }
}

AppModelView

using Caliburn.Micro;

    namespace CaliburnTest.ViewModels
    {
        class AppViewModel : PropertyChangedBase
        {
        }
    }

thanks for reply.

Was it helpful?

Solution

I found the problem. It was bad written app.xaml application rescources This is right content of xaml file

<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:CaliburnTest"
             x:Class="CaliburnTest.App">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <local:AppBootstrapper x:Key="Bootstrapper" />
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top