WPF Rectangle does not have a Click event

后端 未结 4 799
南旧
南旧 2020-12-15 05:00

It seems that the WPF Rectangle shape does not have the Click event defined. What am I supposed to use instead?

It does have MouseUp, but it\'s not quite the same be

4条回答
  •  生来不讨喜
    2020-12-15 05:01

    If you're not happy with MouseDown and MouseUp, perhaps you could just put the Rectangle in a Button and handle the Button's Click event?

    
    

    It really depends with the behavior you're after. Please elaborate if needs be.

提交回复
热议问题