BusyIndicator using MVVM 忙碌状态指示器的的实现
2024-08-30 11:11:06
ViewModel 视图模型
public abstract class ViewModelBase : INotifyPropertyChanged
{
private bool isbusy; public bool IsBusy
{
get
{
return isbusy;
}
set
{
isbusy = value;
RaisePropertyChanged("IsBusy");
}
} public event PropertyChangedEventHandler PropertyChanged; protected void RaisePropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged; if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
View 视图
<extWpfTk:BusyIndicator IsBusy="{Binding IsBusy}">
<ContentControl />
</extWpfTk:BusyIndicator>
当 IsBusy = true 时, BusyIndicator 就开始显示出来
参考网址 http://stackoverflow.com/questions/12384012/busyindicator-using-mvvm
Extended WPF Toolkit 下载地址 http://wpftoolkit.codeplex.com/releases/view/99072
最新文章
- Google疯了,竟然这样!
- OpenJudge 2985数字组合 解析报告/DP
- 关于ubuntukylin安装后界面中英文混杂的问题
- C#中弹出新窗口
- SpringSecutiry权限管理手册
- Redis的值value(数据结构类型)
- sql 按年月日统计
- 对filter的初步认识
- 使用VSFTPD传输文件
- 虚拟机Ping不通主机解决
- IOS 设备备份文件详解 (二)
- [No00004F]史上最全Vim快捷键键位图(入门到进阶)vim常用命令总结
- 9、如何在Xamarin中进行iOS真机调试和发布
- html 第一行不缩进,第二行缩进,文字对齐
- mciSendCommand 音频视频播放命令函数
- [z]IE6各种不兼容问题
- JavaWeb项目中各个文件夹的作用
- DataGrid合并单元格(wpf)
- Python 并行任务技巧
- 判断浏览器是否支持css3属性或单位