I have a complex WPF UserControl made of other ContentControl templates which contain sets of buttons, textfields, and other elements.
The parent UC is focusable so I have a style with a property trigger to update (gratuitous OuterGlowBitmapEffect) when the UC has focus. However when the user clicks or tabs to any of the buttons inside the UC the focus is lost. I would like to maintain the glow while using the UC.
Can I pass the focus from the child controls up to the UC?
You should be able to base your property trigger on the IsKeyboardFocusWithin property, which returns true if any child element has focus.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With