PasswordChanged Event
Collapse the table of content
Expand the table of content

PasswordBox.PasswordChanged Event

 

Occurs when the value of the Password property changes.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public event RoutedEventHandler PasswordChanged

Identifier field

PasswordChangedEvent

Routing strategy

Bubbling

Delegate

RoutedEventHandler

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;
}

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft