Relay Command can execute and a Task

后端 未结 5 2084
故里飘歌
故里飘歌 2020-12-14 04:13

i want to start a task when a relay command is called, however i want to disable the button as long as that task is running

take this example

private         


        
5条回答
  •  一整个雨季
    2020-12-14 04:49

    You could have a static variable IsRunning, which you can set to True when your task starts, to false when it finishes, and just bind that enabled button to the state of the IsRunning

提交回复
热议问题