BusyIndicator控件重复显示好象有问题

sjhcsdn 2011-11-14 04:02:02
/// <summary>
/// 进度条
/// </summary>
/// <param name="isWait"></param>
public static void SetWaitWindow(Grid g,string msg = "") {
var isWait = string.IsNullOrEmpty(msg);
fBusyIndicator.IsBusy = !isWait;
fBusyIndicator.BusyContent = msg;
if (fBusyIndicator.Parent != null)
((Grid)fBusyIndicator.Parent).Children.Remove(fBusyIndicator);
g.Children.Add(fBusyIndicator);
}
static BusyIndicator fBusyIndicator;

-------------------------
第一次调用的时候能显示出来 但当第二次(调用时)就没反应了,不晓得是怎么回事
...全文
148 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zxh198841 2011-11-14
  • 打赏
  • 举报
回复
看看是不是被其他控件挡住了
sjhcsdn 2011-11-14
  • 打赏
  • 举报
回复
回2楼,这是个通用 的BusyIndicator所以不同的Grid使用相同的B~ 如果一个Grid多次调用 这个方法 不删除了再添加 的话会报 错(一个控件那个~~嗯)所以要这样的
Architecture Net 2011-11-14
  • 打赏
  • 举报
回复
你直接设置fBusyIndicator.IsBusy=false即可控制BusyIndicator控件的显示和隐藏,不用删除了再添加。

8,737

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧