且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Xamarin Forms 找不到“Sku"的属性、可绑定属性或事件,或者值和属性之间的类型不匹配

更新时间:2023-11-16 15:43:46

在属性名称中,您有一个错字:

In the property name, you have a typo:

public static readonly BindableProperty SkuPoperty = BindableProperty.Create(nameof(Sku), typeof(ApiModels.SkuDetailModel), typeof(AddToCartButton));

SkuPoperty => SkuProperty

SkuPoperty => SkuProperty

详细说明,Xamarin 需要具有 PropertyNameProperty 命名约定:创建可绑定属性

To elaborate, Xamarin requires to have PropertyNameProperty naming convention: Creating a bindable property