【问题标题】:Xamarin Forms: UWP app clicking is not working as expectedXamarin Forms:UWP 应用点击未按预期工作
【发布时间】:2021-01-20 04:52:33
【问题描述】:

我的 UWP 版本的 xamarin 表单项目有一个奇怪的问题。单击未按预期工作。有时单击项目(按钮、图像)时没有响应,有时单击项目时顶部项目正在打开。

请观看此video 以获得清晰的想法。在此视频中,我多次单击下一步按钮(测验页面),但没有响应。在游戏页面上,点击物品时会打开顶部物品页面。在 android 和 ios 中,一切正常。

版本详情:

Xamarin Forms: 4.7.0.968
UWP target version: Windows 10, version 1903(10.0;Build 18362)
UWP Min version: Windows 10, Fall Creators Update(10.0; Build 16299)

请帮我找出这背后的问题。提前致谢。

更新

按钮代码

<Button 
    Text="NEXT"
    TextColor="White"
    HorizontalOptions="EndAndExpand"
    BackgroundColor="#f5c74c" 
    Clicked="NextButtonClicked"
    WidthRequest="150"
    HeightRequest="40"
    FontSize="18"
    BorderRadius="20"/>
    
public void NextButtonClicked(object sender, EventArgs args)
{
    //action
}

【问题讨论】:

  • 看起来按钮的尺寸不是特定的,能不能把按钮的xaml代码分享给我们?
  • @NicoZhu-MSFT 添加按钮代码提问,请检查
  • 在你的视频中,它看起来你的按钮包含图像,为什么它不包含上面的图像代码?
  • 这是测验页面的完整xaml文件链接,行号:883 drive.google.com/file/d/1sIinlpArQu9lyZfMXk7A8y0gEnfRFVxL/…
  • 您可以尝试删除自定义字体并重新测试吗?

标签: xamarin.forms uwp click


【解决方案1】:

我已通过将 xamarin 表单版本更新到 4.8.0.1269 解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-01
    • 1970-01-01
    • 2016-01-29
    相关资源
    最近更新 更多