I have a XamPropertyGrid that is displaying properties for multiple objects using the SelectedObjects property. For default controls that represent a property, check box for a bool property for example, the control is able to display an indeterminate state when the properties have both true and false values. How can I accomplish this for my own custom controls I provide in a PropertyGridEditorDefinition? I've provided a sample of one of my definitions below. Thanks!
Hello Richard,The PropertyGridEditorDefinition allows you to customize the editor control which will be used in the XamPropertyGrid control. Since you are using the custom WeightEditor controll defined in your application, it should have the three state support defined in order to display correctly when different values are provided by the Weight type. By default, the bool property could be defined as nullable type which is supported by the Checkbox so that when a null value is provided the Checkbox is in undetermined state.Let me know if you have any questions.
Hi Maria, thanks for your reply but that's not really what I'm asking. I was just giving an example of a check box recognizing multiple values and being set as indeterminate. Another example would be a text box bound to a string property where the objects in the SelectedObjects collection have different values. The behavior of the text box control is to show a blank value. That is what I'm after. How are these controls aware that there are multiple values?