RoutedEventArgs.OnSetSource(Object) RoutedEventArgs.OnSetSource(Object) RoutedEventArgs.OnSetSource(Object) RoutedEventArgs.OnSetSource(Object) Method

定義

在衍生類別中覆寫時,每當執行個體的 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 Object Object 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.

適用於

另請參閱