HB.MVVM (nuget): 为更优雅的MVVM写法而生;适用平台: wpf，uwp,xamarin.form //class ModelA:ViewModelBase    //普通模式 class ModelA:ViewModelBase<ModelA>   //单例模式 {       public ModelA()      {             RegisterChangedEvent(nameof(str),()=>{});//注册属性变化事件      }      public string str { get => GetString(“默认值”); set => Set(value); } //带默认值      public int  age { get => GetInt(); set => Set(value); } //优雅模式       //命令定义       public ICommand clickCommand => GetCommand(() =>       {       //代码       });        }       //绑定到UI       this.DataContent=new ModelA();   //新实例       this.DataContent=ModelA.Instance;   //单例       ModelA.Instance.Connect(this)//快捷注册       或在Xaml中绑定
Keywords: MVVM