You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WinUI3中ListView拖拽重排致应用崩溃问题求助

WinUI3 ListView拖拽重排崩溃问题

开发WinUI3应用时,尝试为ListView实现拖拽重排列表项功能,操作时应用持续崩溃。

使用的ListView XAML代码如下:

<ListView x:Name="AccountSelector"
          SelectionMode="None"
          Height="Auto"
          CornerRadius="8"
          Padding="-16,-4,-16,-4"
          CanDragItems="True" 
          CanReorderItems="True" 
          AllowDrop="True"
          ItemsSource="{x:Bind model.DisplayAccounts}">

已排查情况

  • 参考官方拖拽示例修改代码后,崩溃问题仍存在
  • C#调试器无异常提示,附加原生调试器后捕获到访问违例错误:
    Exception thrown at 0x00007FFC1D03EFDC (Microsoft.ui.xaml.dll) in WinUi3Test.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
  • 网络搜索发现相关问题多为已修复的GitHub Issue,推测可能需要升级WinAppSDK版本

相关补充信息

  • 拖拽重排时的崩溃现象有视频记录
  • 问题代码位于仓库Reorder-crash分支的AccountsListPage.xaml文件中
  • 错误信息对应两张截图(Error info 1、Error info 2)

内容的提问来源于stack exchange,提问作者JavaJumper

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 14:17:35