How do I capture/intercept the "LostFocus" event on every control on a WPF/XAML page?

I want to capture/intercept the lostfocus event on every textbox, listbox and checkbox on my WPF/XAML page.  I am needing execute another piece of code whenever one of these events happens.  How can I do that without adding a "LostFocus" element to each UIElement?
LVL 1
BruceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
how will you know which control has lost focus without adding the appropriate lost focus to each control?
0
Jaime OlivaresSoftware ArchitectCommented:
The LostFocus event should bubble up, so you just need to implement an event handler in your page.

Tutorial: http://www.codeproject.com/Articles/464926/To-bubble-or-tunnel-basic-WPF-events
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BruceAuthor Commented:
David, I understand why you ask but I don't need to know the control for what I am trying to do.  I just need to know that an editable control has lost focus.   What I am doing in the event handler is comparing two objects.  One holds the original values collected from the database and the other is the object bound via property to all the controls.  I have one link statement the compares the properties of theses objects and returns me a list of the "changes".  

This technique means I don't have to have an "OnPropertyChanged" call inside each of my properties in my POCO objects.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.