EDIT: It seems that I finally made it to work. I asked an author of that post which I referred before and he said that it's a known issue. He also gave mi a workaround (in the comment below the post), so I consider this question as closed. But thanks to all of you for time spent with my problems :)
I'm trying to learn MVVM with Caliburn Micro framework, but I got problems from the beginning. I'm following this tutorial and I got such a 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-->
<Application.Resources>
<caliburnMicro:Bootstrapper x:Key="bootstrapper" />
</Application.Resources>
</Application>
But I got an error:
The name "Bootstrapper" does not exist in the namespace "clr-namespace:Caliburn".
I got Caliburn Micro 1.5.2 from 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);
//container.PerRequest<MainPageViewModel>();
AddCustomConventions();
}
static void AddCustomConventions()
{
//ellided
}
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);
}
}
}