UIElement.OnIsKeyboardFocusWithinChanged 方法

定義

在此項目引發 IsKeyboardFocusWithinChanged 事件前叫用。 實作這個方法可為此事件加入類別處理。

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

參數

備註

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

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

適用於