随笔分类 -  学习C#高级编程

MVMM 中的ViewModel 实现IsLoading进度条
摘要:private bool _isBusy = false; public bool IsBusy { get { return _isBusy; } internal set { _isBusy = value; base.RaisePropertyChanged("IsBusy"); } }注意:在这里必须设定 internal set才可以。。测试可行XMAL:<my:BusyIndicator x:Name="busyindicator" IsBusy="{Binding IsBusy}" HorizontalAlignm 阅读全文

posted @ 2011-04-08 18:06 SUNJUNLIN 阅读(1471) 评论(0) 推荐(0) 编辑

Whitespace is not allowed after end of Markup Extension. 标记扩展符号末尾不允许有空格
摘要:When building your Silverlight project fails with the error message “Whitespace is not allowed after end of Markup Extension.”, you’ve got a blank (or more) behind a databinding expression, like here:1<Button Content="{StaticResource ResText_SaveButton} "/>注意:引号前是没有空格的 阅读全文

posted @ 2011-04-06 11:31 SUNJUNLIN 阅读(1139) 评论(0) 推荐(0) 编辑

Silverlight MVVM INotefiyChanged 的重要性
摘要:public class VMInfoViewModel: INotifyPropertyChanged { private string strAccountName = ""; private string strVMName = "SSP"; private VMInfoContext _context; public event PropertyChangedEventHandler PropertyChanged; public void RaisePropertyChanged(string propertyName) { if (this. 阅读全文

posted @ 2011-03-30 11:24 SUNJUNLIN 阅读(339) 评论(0) 推荐(1) 编辑

An unhandled exception of type 'System.StackOverflowException' occurred 解法
摘要:c# An unhandled exception of type 'System.StackOverflowException' occurred in ClientPortal最近发现的一个bug,找了一下,发现原来是property set bug, //硬盘大小总和 public int Vm_TotalHardDisksQty { get { return vm_TotalHardDisksQty; } set { Vm_TotalHardDisksQty = value; } Vm_TotalHardDisksQty to vm_TotalHardDisksQty, 阅读全文

posted @ 2011-03-30 11:13 SUNJUNLIN 阅读(2588) 评论(0) 推荐(0) 编辑

学习C#高级编程--在重写基类的方法中,如何调用基类的函数
摘要:用于从派生类调用基类的方法:要编写base.<methodNam>()class customerAccout{public virtual decimal calculateprice(){//implementation}}class goldAccount:customerAccout{public override decimal calculatprice(){return ... 阅读全文

posted @ 2008-11-29 10:44 SUNJUNLIN 阅读(755) 评论(0) 推荐(0) 编辑

学习C#高级编程--方法重写和隐藏
摘要:把一个基类函数声明为virtual,就可以在任何派生类中重写了:class MyBaseClass{public virtual string VitualMethod(){return "virtual Method and defind in MyBaseClass";}}派生类重写基类的函数时,要使用override关键字显式声明:class MyDerivedClass:MyBassCla... 阅读全文

posted @ 2008-11-29 10:25 SUNJUNLIN 阅读(368) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示