UWP Community Toolkit DataGrid onecoreuap errors

你。 提交于 2021-02-10 17:00:58

问题


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: (caller: 00007FF80B5C027B) ReturnHr(163) tid(4938) 80070490 Element not found.

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.

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.

Edit: 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.


回答1:


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.



来源:https://stackoverflow.com/questions/59020682/uwp-community-toolkit-datagrid-onecoreuap-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!