PasswordBox.PasswordChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the value of the Password property changes.
public:
event System::Windows::RoutedEventHandler ^ PasswordChanged;
public event System.Windows.RoutedEventHandler PasswordChanged;
member this.PasswordChanged : System.Windows.RoutedEventHandler
Public Custom Event PasswordChanged As RoutedEventHandler
Event Type
Examples
The following example shows how to specify the handler method for the PasswordChanged event.
<PasswordBox
Name="pwdBox"
MaxLength="64"
PasswordChar="#"
PasswordChanged="PasswordChangedHandler"
/>
The following example shows the corresponding event handler. In this case, the event handler simply increments a counter.
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
Remarks
Routed Event Information
Identifier field | PasswordChangedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.