开发者

Filter elements in PropertyGrid

开发者 https://www.devze.com 2022-12-28 20:24 出处:网络
In System.Windows.Forms there are a PropertyGrid that displays properties of an attached object. Let\'s say MyTextBox : TextBox.

In System.Windows.Forms there are a PropertyGrid that displays properties of an attached object. Let's say MyTextBox : TextBox.

Now, I would like to display on it some MyTextBox properties, say only Size, Location and my custom property Date.

More that than, I would like to be able to change the real property names, say "Dimension", "Location" and "Starting Date".

I saw two projects on this subject : first and second, but first does not work well(for browsabl开发者_开发问答e properties), and the second seems to add an event for each property changes, this is not acceptable.


You should be able to hide them with a [Browsable(false)] attribute. If you want to change the name, you need to write your own TypeDescriptor as seen here

0

精彩评论

暂无评论...
验证码 换一张
取 消