UpdateSourceTrigger 枚举

定义

描述绑定源更新的计时。Describes the timing of binding source updates.

public enum class UpdateSourceTrigger
public enum UpdateSourceTrigger
type UpdateSourceTrigger = 
Public Enum UpdateSourceTrigger
继承
UpdateSourceTrigger

字段

Default 0

绑定目标属性的默认 UpdateSourceTrigger 值。The default UpdateSourceTrigger value of the binding target property. 大多数依赖属性的默认值为 PropertyChanged,而 Text 属性的默认值为 LostFocusThe default value for most dependency properties is PropertyChanged, while the Text property has a default value of LostFocus.

Explicit 3

仅在调用 UpdateSource() 方法时更新绑定源。Updates the binding source only when you call the UpdateSource() method.

LostFocus 2

每当绑定目标元素失去焦点时,都会更新绑定源。Updates the binding source whenever the binding target element loses focus.

PropertyChanged 1

每当绑定目标属性发生更改时,都会更新绑定源。Updates the binding source immediately whenever the binding target property changes.

注解

确定默认值的编程方法UpdateSourceTrigger依赖属性的值是获取的属性使用的属性元数据DependencyProperty.GetMetadata,然后再检查的值FrameworkPropertyMetadata.DefaultUpdateSourceTrigger属性。A programmatic way to determine the default UpdateSourceTrigger value of a dependency property is to get the property metadata of the property using DependencyProperty.GetMetadata, and then to check the value of the FrameworkPropertyMetadata.DefaultUpdateSourceTrigger property.

有关更多信息,请参见Binding.UpdateSourceTriggerFor more information, see Binding.UpdateSourceTrigger.

适用于

另请参阅