共用方式為


InkCanvas.EditingModeChanged 事件

定義

EditingMode 物件的 InkCanvas 屬性變更時,就會發生。

public:
 event System::Windows::RoutedEventHandler ^ EditingModeChanged;
public event System.Windows.RoutedEventHandler EditingModeChanged;
member this.EditingModeChanged : System.Windows.RoutedEventHandler 
Public Custom Event EditingModeChanged As RoutedEventHandler 

事件類型

範例

下列範例會檢查 屬性是否 EditingMode 設定為 InkSelect

void inkCanvas1_EditingModeChanged(object sender, EventArgs e)
{
    if (inkCanvas1.EditingMode == InkCanvasEditingMode.Ink)
    {
        modeLabel.Text = "Ink";
    }
    else if (inkCanvas1.EditingMode == InkCanvasEditingMode.Select)
    {
        modeLabel.Text = "select";
    }
}
Private Sub inkCanvas1_EditingModeChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)

    If inkCanvas1.EditingMode = InkCanvasEditingMode.Ink Then
        modeLabel.Text = "Ink"
    ElseIf inkCanvas1.EditingMode = InkCanvasEditingMode.Select Then
        modeLabel.Text = "select"
    End If

End Sub

備註

此事件會在編輯模式變更之後發生;變更會反映在 的 InkCanvas 屬性中 EditingMode

路由事件資訊

識別碼欄位 EditingModeChangedEvent
路由策略 鼓 泡
代理人 RoutedEventHandler

適用於