网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容 知识问答

WPF之Command基础

时间:2024-11-03 09:37:42

1、界面布局,文本框和按钮

WPF之Command基础

2、声明并定义命令private RoutedCommand sayCmd = new RoutedCommand("Say", typeof(MainWindow));

WPF之Command基础

8、命令可执行逻辑e.CanExecute = myText.Text.ToString() == "" ? false : true;

WPF之Command基础

10、执行效果如下

WPF之Command基础
© 2025 智德知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com