UWP Community Toolkit DataGrid onecoreuap错误 [英] UWP Community Toolkit DataGrid onecoreuap errors

查看:60
本文介绍了UWP Community Toolkit DataGrid onecoreuap错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行Windows 10版本1903的桌面应用程序中使用Community Toolkit DataGrid(6.0.0内部版本86).我收到很多类似这样的错误:

I am using the Community Toolkit DataGrid (6.0.0 build 86) in a desktop application running with Windows 10 version 1903. I get loads of errors like this:

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

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!00007FF80B5C04B0: (caller: 00007FF80B5C027B) ReturnHr(163) tid(4938) 80070490 Element not found.

任何时候在DataGrid中更新任何项目.我想摆脱错误,或者至少能够将其从调试输出中过滤掉-当不断被这些错误所阻塞时,输出几乎是无用的.

whenever any item is updated in the DataGrid. I would like to get rid of the error or at least be able to filter it out of the debug output - the output is all but useless when continually clogged up with these errors.

这是DataGrid xaml:

This is the 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>

我找不到任何例外或其他设置来过滤掉这些消息.

I can't find any Exception or other settings to filter out these messages.

在理解问题根源或至少过滤掉消息方面的任何帮助将不胜感激.

Any help on understanding the source of the issue or at least filtering out the messages would be appreciated.

仅使用DataGrid创建演示应用程序不会显示错误.回到原始应用程序并从主页中删除所有内容(根网格除外)仍会产生错误,但仅会产生一个错误.我将继续尝试并找出原因.

Creating a demo app with just a DataGrid did not show the errors. Going back to the original app and removing all content from the main page (except a root Grid) still produces the error, but just a single error. I will continue to try and track that down.

推荐答案

当我发现自己创建的演示设置为调试""x86"并且我的应用程序正在显示时,我正准备放弃并创建一个新项目.问题被设置为调试""x64".更改为"x86"已解决了该问题.

I was just about to give up and create a new project when I noticed the demo I had created was set for "Debug" "x86" and my app showing the issue was set to "Debug" "x64". Changing to "x86" has solved the problem.

这篇关于UWP Community Toolkit DataGrid onecoreuap错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆