wpf - Powershell WPF PerformClick() 错误
问题描述
$Window.Add_KeyDown({
if ($args[1].key -eq 'Enter'){
$syncHash.GEL.Value.PerformClick() #button
}
})
#error
Method invocation failed because [System.Windows.Controls.Button] does not contain a method named 'PerformClick'.
:171 char:5
+ $syncHash.GEL.Value.PerformClick()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
解决方案
推荐阅读
- ubuntu - virtualbox-guest-dkms 和 virtualbox-guest-dkms-hwe 有什么区别?
- ios - 在stackview中动画子视图?
- mysql - SQL Server - MySQL 迁移错误:不正确的字符串值:'\xF4\x80\x82\x83...'
- php - 在 PHP 中嵌套 MySQLi 的正确方法
- azure-media-services - Azure 媒体播放器在悬停或鼠标悬停时显示控件
- node.js - 如果没有中间件处理,传递给“next”的错误会发生什么?
- reactjs - 如何使用 React 和 Firebase 托管在 SPA 上提供 robots.txt?
- android - ViewPager 加载不同的片段
- python - for 循环中的 Scrapy 请求响应仅获得一个值
- python - 切片数据帧时出现 KeyError