Silverlight 4 wait/spinner control

回眸只為那壹抹淺笑 提交于 2020-01-06 17:58:32

问题


I'd like to implement a spinner control (something along these lines) in Silverlight 4 to display during pending operations. There are several examples on the web for Silverlight 3 but I'm either unable to compile them into my project or they just flat out display nothing. In addition I'm unable to find any examples specific to Silverlight 4.

Can someone please post a sample for Silverlight 4 or a link to one?


回答1:


You can use the BusyIndicator.

How To Work With Silverlight BusyIndicator?

Custom Busyindicator style in Silverlight 4




回答2:


I found a good example of a spinner control here. It's very simple and may not be ideal but it works perfect for my purposes. It's a XAML-only solution so it is very easy to port.

If you decide to use it, then I'd like to echo one of the commenters' suggestions that you change the <Grid> to a <Viewbox> so that the spinner will scale automatically.




回答3:


I've put together a pure xaml spinner out of another example I've found ( see source ). It works on silverlight 4 and moonlight 4 too.

Pure XAML Spinner

Slightly nicer visual than the "rotate some rectangles" approach.



来源:https://stackoverflow.com/questions/4651235/silverlight-4-wait-spinner-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!