问题
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