EDITOR: It seems I finally got it to work. I asked the author of this post, which I spoke about earlier, and he said that this is a known problem. He also gave mi a workaround (in the comment below the post), so I view this issue as closed. But thank you all for your time on my problems :)
I am trying to learn MVVM with Caliburn Micro framework, but I have problems from the very beginning. I follow this tutorial and I got this code in App.xaml:
<Application
x:Class="Caliburn.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:caliburnMicro="clr-namespace:Caliburn">
<Application.Resources>
<caliburnMicro:Bootstrapper x:Key="bootstrapper" />
</Application.Resources>
</Application>
But I have an error:
The name "Bootstrapper" does not exist in the namespace "clr-namespace: Caliburn".
I got Caliburn Micro 1.5.2 from the NuGet repository. Any ideas appreciated ...
My bootstrapper:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caliburn.Micro;
namespace Caliburn
{
public class Bootstrapper : PhoneBootstrapper
{
PhoneContainer container;
protected override void Configure()
{
container = new PhoneContainer();
container.RegisterPhoneServices(RootFrame);
AddCustomConventions();
}
static void AddCustomConventions()
{
}
protected override object GetInstance(Type service, string key)
{
return container.GetInstance(service, key);
}
protected override IEnumerable<object> GetAllInstances(Type service)
{
return container.GetAllInstances(service);
}
protected override void BuildUp(object instance)
{
container.BuildUp(instance);
}
}
}