我无法得到Blend(v5)与我的“设计信息”正确合作。
我有一个简单的项目。
MainPage.xaml
<UserControl x:Class="SilverlightApplication8.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SilverlightApplication8"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance local:VM,IsDesignTimeCreatable=True}"
d:DesignHeight="300"
d:DesignWidth="400"
mc:Ignorable="d">
<Grid x:Name="LayoutRoot" Background="White">
<TextBlock Text="{Binding Test}" />
</Grid>
</UserControl>
and VM.cs with
public class VM
{
public string Test
{
get { return "Hello World"; }
}
}
As expected, in my VS2010 designer, it shows "Hello World". However, if I load the project into Blend (v5), then it shows nothing (blank white control). Can anyone point out what I have done wrong?
One interesting fact.. If I put a break point in the ctor of VM.cs, and attach to Blend, it DOES hit the ctor, but DOES NOT hit the property.
欢迎任何要点!