且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在WPF中将对象属性绑定到数据网格

更新时间:2022-03-13 02:11:21

听起来像您希望属性网格查看单个对象实例的属性,其中每个属性/值对都是一个行 ,是吗?如果是这种情况,请查看一些第三方属性网格控件。 WPF扩展工具包有一个免费的工具。

Sounds like you want a property grid to view the properties of a single object instance, where each property/value pair is a 'row', yes? If that's the case, look into some of the third-party Property Grid controls. The WPF Extended Toolkit has a free one.

通常,这些网格可以自动发现目标对象的属性,并且您可以选择隐藏某些属性,方法是使用 [Browsable(false)] 装饰它们

Typically, these grids can automatically discover the properties of the target object, and you can choose to hide certain properties by adorning them with [Browsable(false)].