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
|
Hello Mindscapers, Sample:
|
|
|
ReadOnlyCollection properties are displaying successfully in our test environment -- we see the count appearing against the Tyres property, and the normal expand button to get at individual Tyre objects (which you will in turn have to expand to see their properties, unless you have a TypeEditor for Tyre). I take it you are seeing the count, but not the expand button -- is that correct? If so: Is it possible you have a TypeEditor, for example for ICollection, that is overriding the normal display of collections? What is your implementation of the Tyres getter, e.g. are you creating the ReadOnlyCollection on the fly (e.g. get { return _tyresList.AsReadOnly(); })? Is the count correct? I ask because ReadOnlyCollection does not implement the WPF notification interfaces which means the grid will be unable to detect changes made after the first time it "sees" the collection. Could you provide me with a small project that reproduces the problem? You can attach zip files via the Options tab. |
|
|
We are using the MultipleObjectWrapper to select objects from a 3d scene and using the property grid to display properties of the selected objects. In the attached sample I am just adding objects to the multipleObjectWrapper in the constructor in window1.xaml (this is done on an event handler in our app) and binding the grid to this wrapper. |
|
|
This is an artefact of the MultipleObjectWrapper, which does not currently handle collections. I have committed a fix for this. The MOW will now check to see if the collections are *reference equal* -- i.e. all wrapped objects share the same instance of the collection -- and display the members for editing if so. If the wrapped objects have different instances of the collection, then it reverts to the current behaviour. The MOW will *not* attempt to deal with the case where the wrapped objects have different instances of the collection but they have the same contents. Depending on how the objects in your application share their collections, this may or may not be an issue for you. The fix will be in the next nightly build, which you will be able to get from the store after about 1300 GMT. Please let me know if you run into any problems. |
|
|
Thanks for the quick response and fix, the latest nightly build works as expected. Cheers, Tarang Waghela |
|