
Thanks,
Greg
Hi,
is the RefreshPropertiesAttribute supported by the current version? I could not find any usage of it in your PropertyGrid samples.
Best regards
Sonja
Hi Sonja,
Sorry but no, we still don't currently support RefreshPropertiesAttribute. This info in the first reply of this thread still applies:
Your underlying object must implement INotifyPropertyChanged, use dependency properties, or include a XYZChanged event for each non-dependency property (where XYZ is the property name). With this in place, changes will be automatically sync'ed when the property change notification is received.
Thus in WPF, you generally don't need a RefreshPropertiesAttribute if your data object is set up with those things in mind.
If you have a specific need for it, what would be best is if you could put together a new simple sample project that shows the scenario and we can debug with that to see if adding in support for the attribute would be feasible. If you do send a sample project to our support address, please remove the bin/obj folders from the ZIP and rename the .zip file extension so it doesn't get spam blocked. Thanks!
Hi,
I have the same problem as discribed by Greg in his second post. We have several properties which change the visibility, the readonly state ect. depending on the value of another property. We had hoped to reuse our previous algorithm, which determines the browsable and read-only values when building the Property-Descriptors.
I have already found your solution for dynamic read-only values in the PropertyGrid examples. But due to the fact that the Property-Descriptors are not exchanged, our previous algorithm is no longer usable.
We hoped that there would be an implementation of the RefreshPropertiesAttribute nine years after the first request. Is there another way to achieve a refresh of the Property-Descriptors? PropertyGrid.Refresh is not sufficient, because we use PropertyChanged as UpdateSourceTrigger for some properties and the property-textboxes looses focus when calling the Refresh-method.
Kind regards,
Sonja
Hi Sonja,
That there is part of the problem we haven't done this.... since any kind of referesh functionality we make would likely wipe out and re-create the property editors. Then you lose scroll, selection, and focus states.
The one idea I did have now was to run through all the property models and perhaps raise each of their INotifyPropertyChanged.PropertyChanged events for properties like "Value", "ValueAsString", "IsReadOnly", etc. Since if those get raised, the property editor UI elements should rebind themselves. That might effectively be like a "repaint" of the property grid.
You could give that a try, or if you would like us to look into it, please send over a new simple sample project like I requested above. Thanks!
Please log in to a validated account to post comments.