문제

Just wondering if anybody has any advice on making a custom loading indicator/HUD for silverlight that resembles the MBProgressHUD for the iphone.

https://github.com/jdg/MBProgressHUD

All I want is a busy indicator, like the one that comes with the silverlight toolkit but to style it like the MBProgressHUD with a spinning loading indicator.

Any ideas?

Thanks

도움이 되었습니까?

해결책

Just create a custom control with appropriate animations and elements arranged in a circle (see rotate transforms).
You may wish to use a timer in the code behind but if you do, be sure to un-hook the event handler when the progress indicator is no longer displayed or you will leak memory.

If you then want to use it as the one in the silverlight toolkit just use your control in a controltemplate for the busy indicator in the silverlight toolkit. Alternatively just create your own version of the control (Alignment set to center, visibility to show/hide, a background which fills the screen if you need it to disable clicking on the form behind, but it as the last item in your layout-root so it's on top).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top