SystemTray中进行操作提示在wp中应用比较广泛,截图如下。
实现方法也十分简单
1、xaml代码中写入:
shell:SystemTray.IsVisible="True"
shell:SystemTray.Opacity="0"
2、C#代码中写入:
private ProgressIndicator _progressIndicator = new ProgressIndicator(); private void ShowProgress(String message) { _progressIndicator.Text = message; _progressIndicator.IsVisible = true; _progressIndicator.IsIndeterminate = true; SystemTray.SetProgressIndicator(this, _progressIndicator); } private void HideProgress() { _progressIndicator.IsVisible = false; SystemTray.SetProgressIndicator(this, _progressIndicator); }
在需要显示提示文字的地方调用ShowProgress(String message)方法。隐藏的地方调用HideProgress方法即可。
原文:http://www.cnblogs.com/fatlin/p/3560265.html