.NET 5 无法正确显示 PropertyGrid [英] PropertyGrid is not displayed properly with .NET 5
问题描述
我有一个编译为 .NET 4.7.2 的 winform 项目.它在主窗体上有一个 PropertyGrid 元素,显示效果很好.迁移到 .NET 5 后,它看起来不像预期的那样:
I have a winform project compiled to .NET 4.7.2. It has a PropertyGrid element on the main form and it is displayed well. After migrating to .NET 5, it does not look as expected:
一些文本出现在控件的顶部并查看任何属性的值 - 必须单击它.
Some text appears on top of the control and to view the value of any property - one has to click on it.
推荐答案
这是 .NET 5.0.4 的(巨大)回归.看这里:
This is a (huge) regression with .NET 5.0.4. See here:
为PropertyGird控件设置SelectedObject属性后,默认值没有显示在正确位置"
"The default value is not displayed in the correct position after setting SelectedObject property for PropertyGird control"
https://github.com/dotnet/winforms/issues/4593
它将在 5.0.5 中修复.
It will be fixed in 5.0.5.
这篇关于.NET 5 无法正确显示 PropertyGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!