c# - How to use mouseleave with if -


when checkbox checked , mouseleave-enter events false, when unchecked mouseleave-enter events true. how can them ? sorry bad language

as stated @icemanind, have add business logic (i.e. if condition pertinent case) mouse enter/leave event handler. .net c#/wpf checkbox implemented shown in following sample code snippet:

private void checkbox_mouseenter(object sender, mouseeventargs e) {     checkbox chk = sender checkbox     if((bool)chk.ischecked)     {        // code here     } }  private void checkbox_mouseleave(object sender, mouseeventargs e) {     checkbox chk = sender checkbox     if((bool)chk.ischecked)     {        // code here     } } 

also, can combine these 2 event handlers 1 if logic both mouse enter/leave events similar. hope may help. best regards,


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -