MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

INotifyDataErrorInfo Error Message is overflowing the TextBox inside a DataGrid

未关闭
#2,815 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug evaluation required
主要语言
C#
星标
16.3k
派生
3.5k
平均合并
1 天 22 小时
30 天内合并 PR
8

描述

Bug explanation

Is anyone here having the same problem when using INotifyDataErrorInfo where the Error Message of the TextBox is overflowing? No issue when using ValidationRules at all.

I have a DataGrid with 100 items, each item has a TextBox. In my ViewModel, I implemented the INotifyDataErrorInfo. For some reason, if all of the Error Message is shown below the TextBox, some of them are overflowing. I tried using ValidationRules but everything is fine, the problem occurs only when using INotifyDataErrorInfo.

Here is an example of the issue when all of the error is being shown.
Problem 1

Could this be an issue with the DataGrid? The first 20 items are showing the error message in the correct position, but after that until the end of the items is not.

UPDATE: I tried to input the correct entry in the TextBox, then remove the text by clicking the clear icon of the TextBox. After that, the position of the Error Message is corrected, but then I tried to scroll and the problem occur again.

  • I tried typing some text.
    Problem 2

  • Then cleared the text by clicking the clear icon. (Noticed that the position of the error message is corrected)
    Problem 2 - After clicking the clear icon of the TextBox

  • Retype some text. (Everything is fine as of now)
    Problem 2 - Retype some correct text

  • I tried to scroll, going down. (Problem occurred again)
    Problem 2 - After making some scroll

  • Then scroll again, going up. (Still the same problem)
    Problem 2 - After making some scroll going to top

Version

using version 4.5.0

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,在包含 100 个 TextBox 项、使用 INotifyDataErrorInfo 验证以及报告中的 MaterialDesignInXamlToolkit 4.5.0 版本的 WPF DataGrid 中重现该问题。比较使用 ValidationRules、清除文本和滚动时的行为。完成的标准是:在编辑和滚动期间,所有行的验证消息都保持正确定位。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
desktop
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。