I'm doing windows 8 app dev using the caliburn.micro MVVM framework.
I'm having issues with design time data. I've looked high and low through various blogs and what not to find an answer. No luck so far.
Here is a section from my view where I say use this view model for design time
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:cal="using:Caliburn.Micro"
xmlns:vm="using:MyApp.SampleViewModels"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=vm:SampleNewsViewModel, IsDesignTimeCreatable=True}"
cal:Bind.AtDesignTime="True">
The d:DataContext... part is being underlined and saying "object reference not set to an instance of an object"
I have a view model with a default constructor
namespace MyApp.SampleViewModels
{
public sealed class SampleNewsViewModel
{
public SampleNewsViewModel()
{
Title = "News Title";
}
private string _title;
public string Title
{
get { return _title; }
set { _title = value; }
}
}
}
Pretty sure there's nothing wrong with my ViewModel (but I could be wrong). I can't figure this out, any point in the right direction would be awesome.
cheers, Lochana