So the great thing about 8.1 apps is that you can use json in your DesignData, saving lots of time when working with Json api's. While it works great with get/set properties, I'm having trouble getting the design layout to bind to read only properties, despite
the class type being set in the definition. It's just blank :(
DesignData :
d:DataContext="{Binding Source={d:DesignData Source=/SampleData.json, Type=local:MyViewModel}}"
SampleData.json
{
"FirstName":"John",
"LastName":"Doe"
}
MyViewModel Class
public class MyViewModel
{
public string FirstName {get; set;}
public string LastName {get; set;}
public string FullName
{
get {
return FirstName + " " + LastName;
}
}
}
Xaml
<TextBlock Text="{Binding FullName}" />
Am I doing something incorrectly?