Вопрос

I have a PropertyGrid on my form, one of the properties I'm editing is a String List. I have implemented a UITypeEditor, so that when the user clicks the '...' button on that property, a new form appears.

This works really well, except that when the user saves the list, my property suddenly has two sub properties: Capacity and Count

My question is, how do I stop these sub properties being exposed?

Это было полезно?

Решение

You probably can sublass the List and set [Browsable(false)] attribute on Capacity and Count properties, which would prevent them to be shown in the PropertyGrid.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top