我正在尝试制作我的自定义组件,但需要帮助。
private string _passwordText;
public string PasswordText
{
get
{
_passwordText = passwordB.Password;
return _passwordText;
}
set
{
SetProperty<string>(ref _passwordText, value, "PasswordText");
passwordB.Password = _passwordText;
passwordB_PasswordChanged(passwordB, null);
}
}
public event PropertyChangedEventHandler PropertyChanged;
private bool SetProperty<T>(ref T storage, T value, [CallerMemberName] String propertyName = null)
{
if (Equals(storage, value)) return false;
storage = value;
OnPropertyChanged(propertyName);
return true;
}
private void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
AkbankStoreApp.exe 中出现“Windows.UI.Xaml.Markup.XamlParseException”类型的异常,但未在用户代码中处理
WinRT 信息:无法分配给属性“Windows8.StoreApp.Common.CustomControls.WatermarkPasswordTextBox.PasswordText”。[行:51 位置:26]