Long pressed button

后端 未结 5 2207
轮回少年
轮回少年 2021-01-18 13:15

I want to repeat an action when a Button is pressed during a long time, like for example the forward button of an MP3 reader. Is there an existing c# event in W

5条回答
  •  被撕碎了的回忆
    2021-01-18 13:43

    You will need to perform some action while the button is pressed, like skipping some seconds in the MP3-track.

    Starting a timer that gets cancelled on mouseUp that triggers that kind of work on a regular interval (100ms?) while the button is down seems viable to me. Easy to implement and is non blocking on the UI.

    A more simple solution will probably cause the UI to block.

提交回复
热议问题