Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Window GotFocus event not firing

Tags:

wpf

I couldnt get the GotFocus() event fired in the WPF window by clicking. But if I click any controls, it will be fired.

My requirement is as follows: I have a hostwindow which has a viewport with two datagrids which can host user controls. I do animations like flip and fade on this user controls. I am using a transparent background(glass effect) for the controls. But when one user control get on top of the other, both of them overlap. So I want to make the top one opaque when the user click on one user control.

like image 968
sony Avatar asked Oct 28 '25 09:10

sony


1 Answers

Try using the Activated event, as GotFocus is intended to be used only with controls.

like image 187
BDFun Avatar answered Oct 31 '25 13:10

BDFun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!