This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, My propertygrid uses SelectedObject (ObjectWrapper) or SelectedObjects (MultiObjectWrapper). Now I have 2 properties (Id of type int and IdName of type string) that I want to make readonly in case SelectedObjects is being used. It makes no sense to set the Id/IdName of multiple objects to the same value. The gray background and '(Multiple values)' text is fine, as long as the button is deactivated or hidden. How to achieve this? Best regards, Jan |
|
|
I think you should be able to do this with a smart editor whose CanEdit looks at the property name and whose EditorTemplate is a generic read-only element such as a TextBlock. See http://www.mindscapehq.com/blog/index.php/2008/04/30/smart-editor-declarations-in-the-wpf-property-grid/ for info and examples. |
|