我有一個 HandyControl 密碼框并嘗試使用 Caliburn Micro 來捕獲密碼更改,但NotifyOfPropertyChange密碼框沒有觸發……有什么想法嗎?
XAML
<hc:PasswordBox Margin="10"
Name="Password"
ShowClearButton="True"
ShowEyeButton="true"
hc:InfoElement.Placeholder="Password"
Height="34"
Width="174"/>
--UPDATE-- 所以我找到了解決方案。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"/>
uj5u.com熱心網友回復:
Caliburn Micro 是否與 HandyControl 元素一起使用?(例如:密碼框)?
顯然不是開箱即用的,這很有意義,因為 Caliburn.Micro 不能知道要系結到自定義控制元件的哪個目標屬性。
嘗試UnsafePassword顯式定義與屬性的系結。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/443424.html
標籤:wpf xml caliburn.micro 密码箱
