Caliburn Micro与HandyControl元件一起工作吗?(例如:PasswordBox)



我有一个HandyControl密码框,正在尝试使用Caliburn Micro来捕获密码更改,但NotifyOfPropertyChange没有在密码框上启动。。。有什么想法吗?

XAML

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

--更新--所以我找到了解决办法。HandyControl Passwordbox的isSafeEnabled属性需要设置为true,然后绑定到UnsafePassword。

它看起来是这样的:

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

Caliburn Micro与HandyControl元素一起工作吗?(例如:PasswordBox(?

显然没有开箱即用,这在Caliburn之后非常有意义。Micro不能知道要绑定到自定义控件的哪个目标属性。

尝试显式定义到UnsafePassword属性的绑定。

相关内容

最新更新