PropertyValueChanged Event?

Grids for WPF Forum

Posted 10 years ago by Van Keer
Version: 9.1.0500
Avatar
Hello,

I have a little question concerning an event on the propertygrid. Is there a way to trigger the change of a propert value?
I have used other propertygrid controls before and most of the time I was able to find an event like "PropertyValueChanged". Is there such an event on this actipro propertygrid too?

Regards,
Marten

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marten,

We don't currently have that event, but it is on our TODO list. If you can explain what you need to accomplish, we may be able to help you find a workaround.


Actipro Software Support

Posted 10 years ago by Van Keer
Avatar
Hello,

Thanks for your reply!
I would like to find a way to detect a change of a property on a SelectedObject.
For example:

I set the SelectedObject equal to a Panel.
When I change the background color (via the PropertyGrid offcourse) I would like to detect this change via an event or so.

I tried to hook up the events

PropertyGrid.Items.ItemChanged += ...
PropertyGrid.Properties.CollectionChanged += ...

But none of them worked.

Do you think you can find a way / workaround to detect a property change on the PropertyGrid?

Best Regards,
Marten
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marten,

Currently, the only way to accomplish this to build a custom DataFactory (which can leverage our TypeDescriptorFactory or TypeReflectionFactory) and a custom IPropertyDataAccessor implementation.

Your DataFactory would override the GetProperties method and wrap each IPropertyDataAccessor with your own IPropertyDataAccessor (say MyPropertyDataAccessor). The MyPropertyDataAccessor could raise an event when the Value property is set, and would otherwise pass all calls to the wrapped IPropertyDataAccessor.

Like I said, we do have the PropertyValueChanged event on our TODO list. But I'm not sure when it will be completed yet.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 7 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.