我创建了Entry,我试图将它绑定到Decimal属性,如下所示:
var downPayment = new Entry () {
HorizontalOptions = LayoutOptions.FillAndExpand,
Placeholder = "Down Payment",
Keyboard = Keyboard.Numeric
};
downPayment.SetBinding (Entry.TextProperty, "DownPayment");
Run Code Online (Sandbox Code Playgroud)
当我尝试在模拟器上输入Entry时,我收到以下错误.
对象类型System.String无法转换为目标类型:System.Decimal