开发者

How do you get an Idle Message in a UserControl class in C# / Silverlight?

How do you get an Idle Message in a UserControl class in C# / Silverlight?

Back when I was programming in C++ and MFC there was an idle messag开发者_开发问答e for user intervace classes that one could overwrite and make use of. Is there something like that in C# and/or Silverlight?


In WPF (which uses mostly the same Dispatcher API as Silverlight), you can use the Dispatcher to dispatch a task with the Idle or ApplicationIdle priority:

How do we do idle time processing in WPF application?

...But in Silverlight, this functionality doesn't exist (intentionally so) (see http://forums.silverlight.net/t/149518.aspx).

If you want to ensure your task doesn't hang the UI, use BeginInvoke as opposed to Invoke.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜