RoutedEventArgs.OnSetSource(Object) 方法

定义

在派生类中重写时,每当实例的 Source 属性的值发生更改,则提供一个通知回调入口点。When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

protected:
 virtual void OnSetSource(System::Object ^ source);
protected virtual void OnSetSource (object source);
abstract member OnSetSource : obj -> unit
override this.OnSetSource : obj -> unit
Protected Overridable Sub OnSetSource (source As Object)

参数

source
Object

Source 所设置为的新值。The new value that Source is being set to.

继承者说明

以编程方式更改事件的报告源可能需要更新事件内特定于类型的数据。Changing the reported source of an event programmatically can potentially require updating the type-specific data within the event. 出于此原因,OnSetSource(Object) 方法是受保护的虚拟方法,旨在由 RoutedEventArgs的子类重写。For this reason, the OnSetSource(Object) method is protected virtual and is intended to be overridden by subclasses of RoutedEventArgs.

此方法没有默认实现。This method has no default implementation.

适用于

另请参阅