StylusPlugIn.OnIsActiveForInputChanged 方法

定义

IsActiveForInput 属性更改时发生。

protected:
 virtual void OnIsActiveForInputChanged();
protected virtual void OnIsActiveForInputChanged ();
abstract member OnIsActiveForInputChanged : unit -> unit
override this.OnIsActiveForInputChanged : unit -> unit
Protected Overridable Sub OnIsActiveForInputChanged ()

示例

以下示例演示如何重写 OnIsActiveForInputChanged 方法。

protected override void OnIsActiveForInputChanged()
{
    base.OnIsActiveForInputChanged();

    if (!this.IsActiveForInput)
    {
        // Clean up any resources the plug-in uses.
    }
    else
    {
        // Allocate the resources the plug-in uses.
    }
}
Protected Overrides Sub OnIsActiveForInputChanged()

    MyBase.OnIsActiveForInputChanged()

    If Not Me.IsActiveForInput Then
        ' Clean up any resources the plug-in uses.
    Else
        ' Allocate the resources the plug-in uses.
    End If

End Sub

注解

OnIsActiveForInputChanged使用 方法分配和清理 使用StylusPlugIn的资源。

适用于