System.Windows.Input.ICommand 구현

        public bool CanExecute(object parameter)
        {
            return _imageData.ImagePath != null;
        }
 
        public event EventHandler CanExecuteChanged
        {
            add { CommandManager.RequerySuggested += value; }
            remove { CommandManager.RequerySuggested -= value; }
        }

잘 이해는 안 된다... ㅠㅠ. WPF가 바인딩된 모든 Command들의 실행 가능 상태가 바뀔 때로 예상되면, 실행하는 CommandManager.RequerySuggestedstatic event 에등록...

ㅅㅂ 뭔 개소리냐... ㅠㅠ

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter