PasswordBox.PasswordChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生於 Password 屬性的值變更時。
public:
event System::Windows::RoutedEventHandler ^ PasswordChanged;
public event System.Windows.RoutedEventHandler PasswordChanged;
member this.PasswordChanged : System.Windows.RoutedEventHandler
Public Custom Event PasswordChanged As RoutedEventHandler
事件類型
範例
下列範例示範如何指定 事件的處理常式方法 PasswordChanged 。
<PasswordBox
Name="pwdBox"
MaxLength="64"
PasswordChar="#"
PasswordChanged="PasswordChangedHandler"
/>
下列範例顯示對應的事件處理常式。 在此情況下,事件處理常式只會遞增計數器。
private int pwChanges = 0;
void PasswordChangedHandler(Object sender, RoutedEventArgs args)
{
// Increment a counter each time the event fires.
++pwChanges;
}
Private pwChanges As Integer = 0
Private Sub PasswordChangedHandler(ByVal sender As Object, ByVal args As RoutedEventArgs)
' Increment a counter each time the event fires.
pwChanges += 1
End Sub
備註
路由事件資訊
識別碼欄位 | PasswordChangedEvent |
路由策略 | 鼓 泡 |
代理人 | RoutedEventHandler |