TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nishant Rana
NA
20
0
Draw a "focusVisual" (Rectangle) only when control receives focus via keyboard, not when 'via mouse'
Nov 1 2010 5:44 AM
The problem is that I have a control which has some embedded elements within, i.e. textbox, textblock etc. For this control i I want to implement my custom "FocusVisualStyle" that just encapsulate "TextBox" not entire control. To do that i've placed triggers on "IsKeyboardFocused" property to shape my "FocusVisual" (Rectangle) just around textbox.
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
Reply
Answers (
2
)
Translate complete application in diffrent language
WPF Slider control Delay issue??