Blend(v5)をDesignInstanceで正しく動作させることができません。
私は簡単なプロジェクトを持っています。
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>
およびVM.csと
public class VM
{
public string Test
{
get { return "Hello World"; }
}
}
予想通り、私のVS2010デザイナーでは、「HelloWorld」と表示されています。ただし、プロジェクトをBlend(v5)にロードすると、何も表示されません(空白の白いコントロール)。誰かが私が間違ったことを指摘できますか?
1つの興味深い事実..VM.csのctorにブレークポイントを設定し、Blendにアタッチすると、ctorにヒットしますが、プロパティにはヒットしません。
どんなポインタでも歓迎されます!