This seems v开发者_如何学运维ery strange to me.
I know through some adventurous inheritance you can convert most UIElements to a button, but it is a cumbersome way of implementing the most basic of of computer events
The ButtonBase
class certainly has a Click
event. So has derived classes.
I think the most basic events are MouseDown and MouseUp which are available to every UIElement
use RoutedEvents event if you really need to use. Other wise use dependency property to register a Click event against your control and then do what ever you want to do.
You can add RoutedEvents to your controls.
Here is an implementation example
精彩评论