我在Page類有一個屬性(MainStudent):綁定到財產
public partial class AddStudent : Page
{
public AddStudent()
{
InitializeComponent();
MainStudent = new Student();
}
public Student MainStudent
{
get;
set;
}
}
什麼是MainStudent物業的名字屬性綁定(學生類有一些方法的最佳方式。例如:名字, )到XAML中TextBox的Text屬性?
請注意,使用UpdateSourceTrigger = PropertyChanged鍵入的每個字符都會調用setter。否則Setter被調用失去焦點 – sebastianmehler 2012-04-25 08:51:39
它通知視圖模型已更改,因此可以更新視圖。 http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.propertychanged.aspx – 2012-04-25 09:02:27