giving classes click events C#

后端 未结 3 1885
不知归路
不知归路 2021-01-14 12:50

Hi i was just wondering if theres a way to give classes there own click event. For instance i have a card class, and is there a way of knowing when the user clicks on the r

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-14 13:18

    You can easily add events to your class, but the only way the class can know when something was clicked is when it is, or has a component that is, based on a window.

    That's what controls are for. If you need to write a class that can detect such events, I would recommend creating a control.

提交回复
热议问题