....
xmlns:viewmodel="clr-namespace:MyRecipe.ViewModels">
<navigation:Page.Resources>
<viewmodel:RecipeViewModel x:Key="RecipeViewModel" />
</navigation:Page.Resources>
<toolkit:DataForm x:Name="form"
HorizontalAlignment="Left" VerticalAlignment="Top"
ItemsSource="{Binding Recipes}" Width="500" Height="600" />
在视图模型中:
public EntitySet<Recipe> Recipes
{
get { return _recipes; }
set
{
if (_recipes != value)
{
_recipes = value;
OnPropertyChanged("Recipes");
}
}
}
我想将数据表单绑定到食谱实体集。数据表单未显示任何字段或任何已绑定的指示。怎么了?