vb.net 和 winforms 中的 INotifyPropertyChanged 接口错误?
我在 vb.net 中创建了一个小项目,其中包含一个类和 INotifypropertyChanged 接口。类中的属性绑定到主窗体中的文本框。
一切工作正常,但有一个大问题。如果我通过在文本框中输入新值来更改一个属性,则同一类中所有其他属性的 getter 都会触发。如果我手动输入值,那没有问题,但如果我有外部更改(例如计时器更新),则无法再输入。所有文本框中的光标都会闪烁,因为每次都会触发外部更改的属性。
我的意思是,为什么这是一个错误?我已经在 WPF 和 C# 中构建了相同的应用程序和函数。如果我更改一个属性,则只有该属性的 getter 会触发 - 而不是同一类中的所有其他属性。为了重现这个问题,我在 GitHub 上创建了一个小应用程序。
GitHub 存储库链接:链接
问题:双数文本框中无法输入值,因为光标闪烁,无法输入。
I've created a small project in vb.net with a class and the INotifypropertyChanged interface. The properties from the class bound to text boxes in the main form.
Everything is working fine, but there is one big problem. If I change one property by entering a new value in the text box, the getter of all other properties in the same class firing to. If I enter values manually, that's no issue, but if I have external changes - like timer updates - no entering is possible anymore. The cursor in all text boxes flickering, because the external changed property is fires every time.
Why, I mean, this is a bug? I've built the same application and functions in WPF and C#. And if I change a property, only the getter of this property firing - not all other in the same class. To reproduce this issue, I’ve created a small application on GitHub.
Link to the GitHub Repo: Link
The issue: It's not possible to enter a value in the Double Number text box, because the cursor is flickering and no enter is possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论