You can use the PasswordChanged
event via Interactions
like this:
XAML
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
<PasswordBox BorderBrush="#FFB0B1AB"
Width="100"
Height="25"
VerticalAlignment="Bottom">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PasswordChanged">
<i:InvokeCommandAction Command="{Binding PasswordChangedCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</PasswordBox>
RelayCommand
private ICommand _passwordChangedCommand = null;
public ICommand PasswordChangedCommand
{
get
{
if (_passwordChangedCommand == null)
{
_passwordChangedCommand = new RelayCommand(param => this.PasswordChanged(), null);
}
return _passwordChangedCommand;
}
}
private void PasswordChanged()
{
// your logic here
}
Some useful links