當前位置: 首頁>>代碼示例>>C#>>正文


C# Input.CanExecuteRoutedEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Input.CanExecuteRoutedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# CanExecuteRoutedEventArgs類的具體用法?C# CanExecuteRoutedEventArgs怎麽用?C# CanExecuteRoutedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CanExecuteRoutedEventArgs類屬於System.Windows.Input命名空間,在下文中一共展示了CanExecuteRoutedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ApplicationUndoCommand_CanExecute

 private void ApplicationUndoCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (lstHistory == null || lstHistory.Items.Count == 0)
         e.CanExecute = false;
     else
         e.CanExecute = true;
 }
開發者ID:ittray,項目名稱:LocalDemo,代碼行數:7,代碼來源:MonitorCommands.xaml.cs

示例2: Refresh_CanExecute

 private void Refresh_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (_pageLoaded)
     {
         e.CanExecute = true;
     }
 }
開發者ID:flawiddsouza,項目名稱:Marky,代碼行數:7,代碼來源:MainWindow.xaml.cs

示例3: CanExecuteAddControlCommand

		private void CanExecuteAddControlCommand(object sender, CanExecuteRoutedEventArgs e)
		{
			//var type = GetType(e.Parameter);

			//e.CanExecute = type == null || _controls.All(c => c.Control.GetType() != type.Item1);
			e.CanExecute = true;
		}
開發者ID:kknet,項目名稱:StockSharp,代碼行數:7,代碼來源:ControlsGallery.xaml.cs

示例4: pausethejob_CanExecute

 private void pausethejob_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     var j = this.DataContext as Job;
       if (j != null && j.IsProcessing) {
     e.CanExecute = true;
       }
 }
開發者ID:dotob,項目名稱:wop,代碼行數:7,代碼來源:JobListTemplate.xaml.cs

示例5: CanExecute

        private static void CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            FrameworkElement senderElement = (sender as FrameworkElement);

            if (HelpProvider.GetHelpString(senderElement) != null)
                e.CanExecute = true;
        }
開發者ID:ppucik,項目名稱:DOZP,代碼行數:7,代碼來源:HelpProvider.cs

示例6: canExecute_Save

 void canExecute_Save(object sender, CanExecuteRoutedEventArgs e)
 {
     if (Surname.Text != "" && Name.Text != "" && Patronymic.Text != "" && Year.Text != "" && Male.Text != "") 
         e.CanExecute = true; 
     else 
         e.CanExecute = false;
 }
開發者ID:KuriyIO,項目名稱:WPF_labs,代碼行數:7,代碼來源:MainWindow.xaml.cs

示例7: CanExecuteSave

 private static void CanExecuteSave(object sender, CanExecuteRoutedEventArgs e)
 {
     if (sender == null)
         throw new ArgumentNullException("sender");
     var owner = sender as Example;
     e.CanExecute = owner != null && owner.diagram != null && owner.diagram.Items.Count > 0;
 }
開發者ID:nukolai,項目名稱:xaml-sdk,代碼行數:7,代碼來源:Example.xaml.cs

示例8: CommandClearTrace_CanExecute

 private void CommandClearTrace_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(txtTrace.Text))
     {
         e.CanExecute = true;
     }
 }
開發者ID:wallymathieu,項目名稱:Prolog.NET,代碼行數:7,代碼來源:TraceComponent.xaml.cs

示例9: ResetDecoder_CanExecute

 private void ResetDecoder_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     //e.CanExecute =
     //    station != null && station.Connected && Decoder != null &&
     //    ((station.MainTrackActive && (NMRAProgramMode)cbProgramMode.SelectedValue == NMRAProgramMode.POM) || (NMRAProgramMode)cbProgramMode.SelectedValue != NMRAProgramMode.POM)
     //    ;
 }
開發者ID:KonstantinKolesnik,項目名稱:Typhoon,代碼行數:7,代碼來源:ucDecoderProgramming.xaml.cs

示例10: CommandBinding_CanExecute

 private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (e.Command.Equals(ApplicationCommands.Find))
     {
         e.CanExecute = !this.IsUpdateChecking;
     }
 }
開發者ID:e-Deniska,項目名稱:easySync,代碼行數:7,代碼來源:AboutWindow.xaml.cs

示例11: StartGame_CanExecute

        /// <summary>
        /// Determine if the start button should be enabled
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StartGame_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            var playerSetupControls = StackPanel_Players.Children.OfType<PlayerSetup>();
            List<string> usedNames = new List<string>(5);
            foreach (var playerSetupControl in playerSetupControls)
            {
                if (playerSetupControl.IsRequired && playerSetupControl.IsEmpty)
                {
                    e.CanExecute = false;
                    e.Handled = true;
                    return;
                }
                else if (playerSetupControl.IsEmpty == false)
                {
                    if (usedNames.Contains(playerSetupControl.PlayerName.ToUpper()))
                    {
                        e.CanExecute = false;
                        e.Handled = true;
                        return;
                    }
                    usedNames.Add(playerSetupControl.PlayerName.ToUpper());
                }
            }

            e.CanExecute = true;
            e.Handled = true;
        }
開發者ID:ischyrus,項目名稱:coloretto_old,代碼行數:32,代碼來源:GameStartDialog.xaml.cs

示例12: Command_CanExecute_MoveInHistory

        private void Command_CanExecute_MoveInHistory(object sender, CanExecuteRoutedEventArgs args)
        {
            if (args.Parameter == null) return;

            if (int.Parse(args.Parameter.ToString()) == -1)
            {
                if (lbHistory.SelectedIndex == 0 || lbHistory.SelectedIndex == -1)
                {
                    args.CanExecute = false;
                }
                else
                {
                    args.CanExecute = true;
                }
            }
            else
            {
                if (lbHistory.SelectedIndex == lbHistory.Items.Count - 1)
                {
                    args.CanExecute = false;
                }
                else
                {
                    args.CanExecute = true;
                }
            }
        }
開發者ID:Chronix,項目名稱:GothicCheckers,代碼行數:27,代碼來源:MainWindow.xaml.cs

示例13: gl_editCmd_CanExecute

 private void gl_editCmd_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (this.xCatNameTxt.Text == "")
         e.CanExecute = false;
     else
         e.CanExecute = true;
 }
開發者ID:ryanmvsg,項目名稱:CategoryMgr,代碼行數:7,代碼來源:CategoryEditWin.xaml.cs

示例14: CreateLinkFromSelectionCanExecute

 private void CreateLinkFromSelectionCanExecute(object sender, CanExecuteRoutedEventArgs args)
 {
     RichTextBox wikiEditor = sender as RichTextBox;
     args.CanExecute = !wikiEditor.Selection.IsEmpty;
     args.ContinueRouting = false;
     args.Handled = true;
 }
開發者ID:ngbrown,項目名稱:WPFinAction,代碼行數:7,代碼來源:WikiWindow.xaml.cs

示例15: ClearOutputCommand_CanExecute

		private void ClearOutputCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
		{
			if (Model == null)
				return;

			e.CanExecute = Model.ExecutedScripts.Any();
		}
開發者ID:srmrco,項目名稱:SqlRunnerNet,代碼行數:7,代碼來源:MainWindow.xaml.cs


注:本文中的System.Windows.Input.CanExecuteRoutedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。