未找到 属性、可绑定 属性 或 'Tapped' 事件
No property, bindable property, or event found for 'Tapped'
我在 Image
的 Tapped
Binding
使用 Prism MVVM 时遇到编译错误。
No property, bindable property, or event found for 'Tapped', or
mismatching type between value and property.
这是我的代码
<Image Source="bell.png" HeightRequest="25" WidthRequest="25" x:Name="yellowBoxView"
RelativeLayout.YConstraint="{ConstraintExpression
Type=RelativeToParent,
Property=Height,
Factor=0.018,Constant=10}"
RelativeLayout.XConstraint="{ConstraintExpression
Type=RelativeToParent,
Property=Width,
Factor=0.85,Constant=15}">
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="{Binding GetStaffAnnCommand}"></TapGestureRecognizer>
</Image.GestureRecognizers>
</Image>
我该如何解决这个问题?
尝试绑定到 Command
属性:
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{Binding GetStaffAnnCommand}"></TapGestureRecognizer>
</Image.GestureRecognizers>
希望对您有所帮助,编码愉快!
我在 Image
的 Tapped
Binding
使用 Prism MVVM 时遇到编译错误。
No property, bindable property, or event found for 'Tapped', or mismatching type between value and property.
这是我的代码
<Image Source="bell.png" HeightRequest="25" WidthRequest="25" x:Name="yellowBoxView"
RelativeLayout.YConstraint="{ConstraintExpression
Type=RelativeToParent,
Property=Height,
Factor=0.018,Constant=10}"
RelativeLayout.XConstraint="{ConstraintExpression
Type=RelativeToParent,
Property=Width,
Factor=0.85,Constant=15}">
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="{Binding GetStaffAnnCommand}"></TapGestureRecognizer>
</Image.GestureRecognizers>
</Image>
我该如何解决这个问题?
尝试绑定到 Command
属性:
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{Binding GetStaffAnnCommand}"></TapGestureRecognizer>
</Image.GestureRecognizers>
希望对您有所帮助,编码愉快!