Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1735
Customizing Expandable Properties
posted

Hi.

I have a list-based property that I want to display in the xamPropertyGrid. I want to display it as read-only, i.e. I don't want the option to add/remove items to the list using the property grid. I also want to cutomize the way the items are presented in the property grid.

I have played around with the corresponding sample (xamPropertyGrid->Display->Customizing Expandable Properties) in the Samples Browser, but the current sample does not give me exactly what I want. Attached is an annotated screenshot from the Samples Browser. I have the following questions:

1. How to configure/remove the text displayed withing the red ellipse?

2. How to remove the minus-signs displayed within the blue ellipse at the right edge?

Regarding question 2, I have tried to set the property to read-only using the ReadOnly attribute, but that does not help. If I set the property to return e.g. a IReadOnlyList the minus signs do go away. However, I then have trouble getting my type descriptors to work to e.g. modify the default item labels to someting else than '[0]', '[1]' etc.

Regards,
Leif

Parents Reply Children
No Data