示例#1
0
        void RefreshCommandCanExecuteChanged(object sender, EventArgs eventArgs)
        {
            if (IsRefreshing)
            {
                return;
            }

            if (Command != null)
            {
                SetValueCore(IsEnabledProperty, Command.CanExecute(CommandParameter));
            }
            else
            {
                SetValueCore(IsEnabledProperty, true);
            }
        }
示例#2
0
 void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs)
 {
     IsEnabled = Command.CanExecute(CommandParameter);
 }