Search code examples
wpfxamlcaliburn.micropasswordbox

Does Caliburn Micro work with HandyControl elements? (ex: PasswordBox)?


I have a HandyControl passwordbox and trying to use Caliburn Micro to capture password change but the NotifyOfPropertyChange is not firing on the password box...any ideas?

XAML

<hc:PasswordBox Margin="10" 
                Name="Password"  
                ShowClearButton="True" 
                ShowEyeButton="true" 
                hc:InfoElement.Placeholder="Password" 
                Height="34" 
                Width="174"/>

--UPDATE-- So i found the solution. HandyControl Passwordbox has isSafeEnabled property that needs to be set to true, then bind to UnsafePassword.

it will look like this:

<hc:PasswordBox Margin="10" 
                Name="Password"  
                ShowClearButton="True" 
                ShowEyeButton="true"
                IsSafeEnabled="true"
                UnSafePassword="{Binding Path=Password}"
                hc:InfoElement.Placeholder="Password" 
                Height="34" 
                Width="174"/>

Solution

  • Does Caliburn Micro work with HandyControl elements? (ex: PasswordBox)?

    Apparently not out of the box, which makes perfect sense since Caliburn.Micro cannot be supposed to know which target property of a custom control to bind to.

    Try to define a binding to the UnsafePassword property explicitly.