1
我有问题。 C#windows应用程序中的什么是等效的UpdateSourceTrigger?什么是C#winform中的等效UpdateSourceTrigger?
public static void Bind(ComboBox cmb, ComboVAlidationRule vld)
{
Binding bndControl = new Binding("DataBind");
bndControl.Source = vld;
bndControl.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
bndControl.ValidationRules.Add(vld);
cmb.SetBinding(ComboBox.SelectedItemProperty, bndControl);
}
'INotifyPropertyChanged'不在Winforms中使用,对不对? – LuckyLikey
@LuckyLikey它*用于WinForms,并在对象实现'INotifyPropertyChanged'时正常工作。请参阅[这里](https://msdn.microsoft.com/en-us/library/xz45s2bh.aspx) –