| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using MvvmScaffoldFrame48.DLL;
- using MvvmScaffoldFrame48.DLL.AuditTrail;
- using MvvmScaffoldFrame48.DLL.WindowsTools;
- using MvvmScaffoldFrame48.Model;
- using MvvmScaffoldFrame48.Model.StorageModel.AuditTrail;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Input;
- namespace MvvmScaffoldFrame48.ViewModel.ViewModel
- {
- public class CustomControlViewModel:BaseViewModel
- {
- #region 界面绑定属性
- private bool _staticTest = false;
- public bool StaticTest
- {
- get { return _staticTest; }
- set
- {
- if (_staticTest != value)
- {
- _staticTest = value;
- OnPropertyChanged(nameof(StaticTest));
- }
- }
- }
- #endregion
- #region 界面绑定事件
- public ICommand TestCommand { get; set; }
- #endregion
- #region 属性
- #endregion
- #region 绑定用Action方法
- private void Test(object obj)
- {
- StaticTest = !StaticTest;
- }
- #endregion
- #region 绑定用Predicate方法
- private bool CanTest(object obj)
- {
- return true;
- }
- #endregion
- #region 其他方法
- public CustomControlViewModel()
- {
- TestCommand = new RelayCommand(Test, CanTest);
- }
- #endregion
- }
- }
|