开发者

Caliburn - IBusyService Logic

开发者 https://www.devze.com 2023-02-16 02:53 出处:网络
Say I have a View with a BusyIndicator and a Button that is attached to an Action. What is the best way to make the Button disabled when Show.Busy() is yielded from the action?Is there an easy way to

Say I have a View with a BusyIndicator and a Button that is attached to an Action.

What is the best way to make the Button disabled when Show.Busy() is yielded from the action? Is there an easy way to hook up a CanMyAction boolean 开发者_高级运维property?

Right now, I have inherited DefaultBusyService to get the job done, but it seems ugly to me.


See my discussion on codplex here.

On VMs that require it, I will implement a ICanBeBusy interface that my custom IBusyService will interact with. Then I can easily use this property to disable the button.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号