Everything goes well except one :-( I want FocusVisual to appear only when we got a focus via keyboard (that is what "IsKeyboardFocused" suppose to do and thats how a FocusVisual should work) but I can see the FocusVisual appear even by mouse clicking on my TextBox.
There are few workarounds, like one : handle "GotKeyboardFocus" but i guess its not really a smart approach.
Is anyone has any idea why "IsKeyboardFocused" absorbing "IsMouseCaptured" event ?
Thanks and Regards
Nishant RanaPosted Nov 4, 2010, 3:25 AM
Well i got what you meant but one thing is confusing as per MSDN hte ISKeyBoardFocused is specifically used to distinguish between focus received via keyboard input or anyother external input (i.e mouse click , touch etc).
However in my case I am not giving any keyboard input to set the visual style
I found similar problem reported at this link hope it help you better understand my requirement.
And if that is the case as you said, We can never achieve the functionality what I am looking for? Do you have any suggestion for that..?
Plz feel free to get more inputs from me regarding in detail of this issue.
Anyway Happy Diwali and long weekend !!! :-)
Thanks and Regards
Nishant
Sivaraman DhamodaranPosted Nov 3, 2010, 5:17 AM
So, definitely, IsKeyBoardFocused is called to test the control it will return true. No matter whether it got the focus by mouse or tab or keyborad short cut to receive key strokes.
Hope this helps.