MouseEnter while MouseLeftButtonDown


hello,

in 1 of silverlight programs have grid of buttons respond normal buttons. aligned no pixels between them. have click, mouseenter , mouseleave event. click event 'flags' 1 button , changes background. mouseenter event changes content of button.

now want create effect should 'flag' button when mouse pressed (mousedown) , mouse on button (mouseenter). problem button stays focussed when mousedown event starts, resulting in not firing mouseenter events on other buttons.

what i've found far button control mousedown , mouseenter events modifies behaviour of these events (like, mouseenter not fired when mousedown active).

searching results in drag-and-drop tutorials, not looking for. want move outside of button, moving mouseenter event different button, not update position of button (and keeping focus on same button).

how can override button achieve effect?

greetings,

tim

my understanding when button control handles click, automatically captures mouse well, preventing mouse events being raised on other controls.  in order prevent behavior, can call releasemousecapture method on clicked button in it's mouseleave event handler.   may need test out particular scenario, releasing mouse capture before mouse button has been released have side-effects in instances.

the documentation on msdn silverlight doesn't make mention of behavior, .net framework 3 states click causes mouse captured , make sense behavior same silverlight.



Silverlight  >  Silverlight Controls and Silverlight Toolkit



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607