This is a migrated thread and some comments may be shown as answers.

Property of type point not updated

1 Answer 46 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Fede
Top achievements
Rank 1
Fede asked on 18 Dec 2017, 11:31 AM

Hello,

 

My team is facing an issue related to the Property Grid component of the WPF, there is an object that has a property of type Point that is represeted as 123.34;1232.34 in the property grid, with a default point value it works however the set value event of the property is not fired when you try to change the value of the textbox, it seems that there is no 2 way binding.

This only happens to that property, so we are suspicious it is because of the type of the property.

 

Can you help us?

 

Thank you

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 21 Dec 2017, 10:39 AM
Hello,

Thank you for the information provided.

May I ask you some additional questions in order to better assist you? How are you representing the Point class in the PropertyGrid as "123.34;1232.34"? I assume those are two different properties of the Point class. Are you then overriding the ToString() method of the Point in order to represent it like so?

In that case, it would be expected that the setter of the Point property won't be fired. What I can suggest is to use the NestedProperties functionality of the RadPropertyGrid in order to edit the properties within the Point class.

Another possible approach would be to create a custom editor for that property. You can take a look at the EditorAttribute example to learn more about that approach.

Please let me know if you find any of these approaches applicable.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PropertyGrid
Asked by
Fede
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or