本文整理汇总了C#中System.Windows.Input.CanExecuteRoutedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CanExecuteRoutedEventArgs类的具体用法?C# CanExecuteRoutedEventArgs怎么用?C# CanExecuteRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CanExecuteRoutedEventArgs类属于System.Windows.Input命名空间,在下文中一共展示了CanExecuteRoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: SwitchToIdleModeCommand_CanExecute
private void SwitchToIdleModeCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
if (VM.InputMode == Controls.Problem.InputMode.Idle)
e.CanExecute = false;
else
e.CanExecute = true;
}
开发者ID:patrickmaster,项目名称:badaniaoperacyjne,代码行数:7,代码来源:ProblemGraph.xaml.cs
示例17: CanExecuteOpenComponentGraphCommand
private void CanExecuteOpenComponentGraphCommand(object sender, CanExecuteRoutedEventArgs e)
{
if (OpenComponentGraphCommand != null)
{
e.CanExecute = OpenComponentGraphCommand.CanExecute(e.Parameter);
}
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:DefineCompositeComponentWizard.xaml.cs
示例18: OpenInBrowser_CanExecute
private void OpenInBrowser_CanExecute(object sender, CanExecuteRoutedEventArgs e) {
var url = (string)e.Parameter;
Uri uri;
e.CanExecute = Uri.TryCreate(url, UriKind.Absolute, out uri) &&
(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps);
e.Handled = true;
}
开发者ID:zooba,项目名称:PTVS,代码行数:7,代码来源:CookiecutterSearchPage.xaml.cs
示例19: PrintCommandBinding_CanExecute
void PrintCommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
if (MySQLHandler.ClassList.Default.Dt.Rows.Count == 0)
e.CanExecute = false;
else e.CanExecute = true;
}
开发者ID:GrayJumba,项目名称:Onion,代码行数:7,代码来源:ClassList.xaml.cs
示例20: CanAddBookItemExecute
private void CanAddBookItemExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = !String.IsNullOrWhiteSpace(uxAddBookTitle.Text) &&
!String.IsNullOrWhiteSpace(uxAddBookAuthor.Text);
//&& !String.IsNullOrWhiteSpace(uxAddBookISBN.Text);
e.Handled = true;
}
开发者ID:Erls-Corporation,项目名称:BookHouse,代码行数:7,代码来源:MainWindow.xaml.cs
注:本文中的System.Windows.Input.CanExecuteRoutedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论