在我的ViewModel我有:結合類項目,並沒有固定的執行
private MyType item;
public MyType Item
{
get { return item; }
set {
if(item == null)
return;
item = value;
OnPropertyChanged(()=>Item);
}
}
筆者認爲:
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Item.Name, UpdateSourceTrigger=PropertyChanged}" />
有沒有到觸發設置項目,同時在文本框中輸入任何可能性?或者我應該爲每個類的領域創建Property?