Kent Boogaart

Hi there,

I have two validation-related problems that I am trying to solve:

1. How can I easily execute validations for all visible controls inside a given UI container I wrote some code to do this manually but am wondering whether I've re-invented the wheel. I couldn't see anything obvious that does this. Side question: is there a built-in method that gets all DependencyProperty instances for a given DependencyObject

2. How can I easily and generically trap movements from one UI "form" to the next (for example, switching tabs on a tab control). I want to be able to trap these events in order to run validations and cancel the navigation if any errors are found.

Again, I have some ideas about how to achieve this but am wondering whether there is something built-in to WPF that I'm missing. I am not using WPF's navigation infrastructure so I can't use NavigationServices.Navigating to achieve this.

Thanks for any advice,
Kent