728x90
반응형

xaml

      <CheckBox
      Command="{Binding SelfTestCommand}"
      CommandParameter="{Binding RelativeSource={RelativeSource self}, Path=IsChecked}"/>

cs

        private DelegateCommand<bool?> selfTestCommand;

        /// <summary>
        /// SelfTest Command
        /// </summary>
        public ICommand SelfTestCommand
        {
            get
            {
                if (this.selfTestCommand== null)
                {
                    this.selfTestCommand= new DelegateCommand<bool?>((param) => OnSelfTestCommand(param));
                }

                return this.selfTestCommand;
            }
        }

        private void OnFalseCallCommand(bool? isChecked)
        {
        }

 

반응형

+ Recent posts