UIElement.OnIsKeyboardFocusedChanged 方法

定義

當這個項目上引發未處理的 IsKeyboardFocusedChanged 事件時叫用。 實作這個方法可為此事件加入類別處理。

protected:
 virtual void OnIsKeyboardFocusedChanged(System::Windows::DependencyPropertyChangedEventArgs e);
protected virtual void OnIsKeyboardFocusedChanged (System.Windows.DependencyPropertyChangedEventArgs e);
abstract member OnIsKeyboardFocusedChanged : System.Windows.DependencyPropertyChangedEventArgs -> unit
override this.OnIsKeyboardFocusedChanged : System.Windows.DependencyPropertyChangedEventArgs -> unit
Protected Overridable Sub OnIsKeyboardFocusedChanged (e As DependencyPropertyChangedEventArgs)

參數

備註

當相依性屬性的值 IsKeyboardFocused 變更時,就會引發這個虛擬方法。 虛擬方法會先引發,而且可以視需要操作事件資料。 然後,事件 IsKeyboardFocusedChanged 會以相同的事件資料實例引發。 請注意, IsKeyboardFocusedChanged 事件不是路由事件。 因此,您無法將它標示為在類別處理常式中處理。

這個方法沒有預設實作。 由於繼承中的中繼類別可能會實作這個方法,因此建議您在實作中呼叫基底實作。 視您的需求而定,您可以在特殊處理之前或之後呼叫基底。

適用於