BindingExpression.UpdateTarget 方法

定义

强制将数据从绑定源属性传输到绑定目标属性。Forces a data transfer from the binding source property to the binding target property.

public:
 override void UpdateTarget();
public override void UpdateTarget ();
override this.UpdateTarget : unit -> unit
Public Overrides Sub UpdateTarget ()

例外

此绑定已从其目标分离。The binding has been detached from its target.

注解

利用此方法,您可以强制将数据从源属性传输到目标属性。This method enables you to force a data transfer from the source property to the target property. 如果源对象实现了正确的属性更改的通知机制(例如 INotifyPropertyChanged ),则会自动进行目标更新。If your source object implements a proper property-changed notification mechanism such as INotifyPropertyChanged, target updates happen automatically. 但是,您可以选择使用此方法在以下情况下显式更新目标属性:源对象未提供正确的属性更改通知。However, you have the option to use this method to update the target property explicitly in cases where your source object does not provide the proper property-changed notifications. 如果应用程序需要定期更新目标属性,还可以使用此方法。You can also use this method if your application needs to update the target properties periodically.

适用于

另请参阅