WPF - UIElement from binded property
WPF
2
Posts
2
Posters
0
Views
1
Watching
-
Hi friends, Is there any way to get UIElement from its binded property name in wpf? What i want is to focus the first control on the form which has error(error means invalid information). i am using IDataErrorInfo here. Thanks.
I'm not aware of a simple way to achieve this. One way to do this would be to walk the Visual Tree, looking at the data binding on each element in the tree, and check to see if it has a binding that relates to the relevant property.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.