【问题标题】:UWP Community Toolkit DataGrid onecoreuap errorsUWP 社区工具包 DataGrid onecoreuap 错误
【发布时间】:2020-03-20 02:04:46
【问题描述】:

我在运行 Windows 10 版本 1903 的桌面应用程序中使用 Community Toolkit DataGrid(6.0.0 build 86)。我收到大量如下错误:

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!00007FF80B5C04B0: (调用者: 00007FF80B5C027B) ReturnHr(163) tid(4938) 80070490 找不到元素。

每当 DataGrid 中的任何项目更新时。我想摆脱错误,或者至少能够将其从调试输出中过滤掉 - 当这些错误不断堵塞时,输出几乎毫无用处。

这是 DataGrid xaml:

                                <controls:DataGrid ItemsSource="{Binding Devices}" Name="Devices" MinHeight="150" Margin="5"
                                                   SelectedItem="{Binding SelectedDevice, Mode=TwoWay}" VerticalScrollBarVisibility="Visible"
                                                   AutoGenerateColumns="False" RowHeight="25">
                                <controls:DataGrid.Columns>
                                    <controls:DataGridTextColumn Width="SizeToCells" MinWidth="120" Header="Device name" Binding="{Binding Name}"/>
                                    <controls:DataGridTextColumn Width="SizeToCells" MinWidth="100" Header="Address" Binding="{Binding DeviceAddress}"/>
                                    <controls:DataGridTextColumn Width="SizeToCells" MinWidth="110" Header="Connected" Binding="{Binding IsConnected}"/>
                                    <controls:DataGridTextColumn Width="SizeToCells" MinWidth="100" Header="Paired" Binding="{Binding IsPaired}"/>
                                    <controls:DataGridTextColumn Width="SizeToCells" MinWidth="80" Header="RSSI" Binding="{Binding RSSI}"/>
                                </controls:DataGrid.Columns>
                            </controls:DataGrid>

我找不到任何异常或其他设置来过滤掉这些消息。

对于理解问题根源或至少过滤掉消息的任何帮助将不胜感激。

编辑:仅使用 DataGrid 创建演示应用程序未显示错误。返回原始应用程序并从主页中删除所有内容(根网格除外)仍然会产生错误,但只是一个错误。我会继续努力追查。

【问题讨论】:

标签: uwp datagrid windows-community-toolkit


【解决方案1】:

当我注意到我创建的演示设置为“调试”“x86”并且显示问题的应用程序设置为“调试”“x64”时,我正要放弃并创建一个新项目。改成“x86”解决了这个问题。

【讨论】:

    猜你喜欢
    • 2019-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-25
    • 2017-12-17
    • 2019-03-17
    • 2023-03-11
    • 1970-01-01
    相关资源
    最近更新 更多