vendredi 8 novembre 2019

How to determine which property is the default property for databinding?

Given a Class of X that has multiple properties that are bindable, how do I determine which one should be the default property to select via reflection?

In the Winforms designer you can select Databinding. How does Visual Studio determine that "EditValue" should be the default property to bind to rather than say "Text"?

enter image description here

I already know how to get properties and attributes from the object, but I'm missing something that would tell me which one to use as default.





Aucun commentaire:

Enregistrer un commentaire