WPF应用程序在检查DataGrid的全选选项时崩溃 [英] WPF App crashing on checking the select all option on datagrid

查看:115
本文介绍了WPF应用程序在检查DataGrid的全选选项时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有全选复选框的数据网格.在其中填充XLS文件的列表.当非常频繁地选中/取消选中全选"复选框时,WPF应用程序崩溃.例外情况和适当的问题报告.

在调试器下运行它,并找出引发未处理异常的确切代码行.如果您无法以这种方式重现它,请在每个线程的堆栈上捕获所有异常,并将完整的异常信息转储到某个文件中.确保得到Exception.Stack,它的完整类型消息和所有内部异常(递归).这样,您将看到失败代码的行号.

如果仍然找不到解决方案,请在此页面上发布此信息.使用改善问题".不要忘记根据您在异常堆栈中找到的行号来发布代码和注释行.确保您发布未修改的代码,与测试中使用的代码相同.

—SA


I have a datagrid with a select all check box. A list of XLS files is populated in this. The WPF app crashes when checking/unchecking the select all check box very frequently.

解决方案

For a software developer, there is no such thing as "crash", there are exceptions and proper issue reports.

Run it under debugger and find out exact line of code where unhandled exception was thrown. If you cannot reproduce it in this way, catch all exceptions on top of the stack of every thread and dump full exception information to some file. Make sure you get Exception.Stack, it''s full type message and all inner exceptions (recursively). In this way, you will see the line numbers of the failing code.

If you still cannot find a solution, post this information on this page. Use "Improve question". Don''t forget to post code and comment lines according to line numbers you find in exception stack. Make sure you post unmodified code, the same as you used in your test.

—SA


这篇关于WPF应用程序在检查DataGrid的全选选项时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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