【C#/WPF】如何查看System.Windows.Interactivity.dll中EventTrigger的EventNames属性有哪些
WPF项目中,从Nuget搜索并下载System.Windows.Interactivity.dll,安装到项目中,并在XAML界面引入。
<UserControl
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
....
</UserControl>
在目标UI控件上添加一个鼠标右键点击弹起事件。
<!-- 鼠标右键事件 -->
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseRightButtonDown">
<!-- 激发ViewModel中自定义的ICommand命令,同时演示如何传参 -->
<i:InvokeCommandAction
Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.MouseRightButtonDownCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type Button}}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
现在的问题是:在Visual Studio中书写EventTrigger的EventName时,没有智能提示的,如何查看这里还能写哪些可选的事件?
可选的事件有以下这些:
重要的参考:
https://stackoverflow.com/questions/22060381/is-there-a-list-available-for-eventtrigger-eventnames
【C#/WPF】如何查看System.Windows.Interactivity.dll中EventTrigger的EventNames属性有哪些的更多相关文章
- “System.Runtime.InteropServices.COMException”类型的第一次机会异常在 System.Windows.Forms.dll 中发生
最近做一个winform项目,在里面用了webbrowser控件进行html文档打印,遇到了标题所示问题.根据查到的一些资料,在调试>异常>查找中输入“System.Runtime.Int ...
- 【WPF/WAF】使用System.Windows.Interactivity交互事件
下载System.Windows.Interactivity.dll文件,并引入项目中(在VS项目的引用列表中可以看到).可在Nuget搜索System.Windows.Interactivity下载 ...
- WPF中使用System.Windows.Interactivity实现事件绑定的替代方法
一.问题描述 对于 Button 等控件,在 MVVM 中我们能通过 Command 绑定解决 Click 事件.具体如下所示: <Button Margin="10" He ...
- 用 .NET Reflector 8 查看 System.Windows.Controls 命名空间下的类
为了学习自定义控件,就想看看WPF基本元素的代码.使用到工具.NET Reflector. System.Windows.Controls 命名空间在PresentationFramework.dll ...
- 解决引用 System.Windows.Interactivity程序集生成多国语言文件夹fr、es、ja等问题
原文:解决引用 System.Windows.Interactivity程序集生成多国语言文件夹fr.es.ja等问题 通过以下方式对 System.Windows.Interactivity程序集添 ...
- ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found.
最近有个项目要用到System.Windows.Forms.dll,在Unity编辑器里用着还好好的,但是一导出就给我报错,让我十分不爽. 于是请教百度,搜出了五花八门的答案,没一个能解决我的问题的, ...
- System.Runtime.Serialization.SerializationException”类型的未经处理的异常在 System.Runtime.Serialization.dll 中发生
异常信息: “System.Runtime.Serialization.SerializationException”类型的未经处理的异常在 System.Runtime.Serialization. ...
- WPF关于“在“System.Windows.Markup.StaticResourceHolder”上提供值时引发了异常。”问题解决办法
在WPF中添加样式,在MainWindow.xaml使用自定义按钮FButton时报错,报错信息如下: "System.Windows.Markup.XamlParseException&q ...
- System.ComponentModel.DataAnnotations.Schema.TableAttribute 同时存在于EntityFramework.dll和System.ComponentModel.DataAnnotations.dll中
Entity Framework 与 .net4.5 的 System.ComponentModel.DataAnnotations 都有 System.ComponentModel.DataAnno ...
随机推荐
- 訪问可能没有定义的data (通过static类型flash.net:FileReference引用)
今天使用Flex实现了图片预览及其上传的功能,在整个开发过程中遇到了"訪问可能没有定义的data (通过static类型flash.net:FileReference引用)"错误, ...
- redis lpop key 当key不存在时,返回nil , 监测redis执行语句是否正常执行
Lpop key 返回值: 列表的头元素. 当key 不存在时, 返回 nil . 需求: 开发在执行 lpop key 时, 出现问题 , 执行语句卡住, 不能执行下去 , 需对此做一个监测 由于 ...
- nginx反向代理proxy_set_header自定义header头无效
公司使用nginx作为负载均衡,有时候需要自定义header头发送给后端的真实服务器. 想过去应该是非常的简单的事情. 例子如下: 设置代理服务器ip头 1 proxy_set_header X- ...
- IntelliJ IDEA java项目导入jar包,打jar包
一.导入 1.java项目在没有导入该jar包之前,如图: 2.点击 File -> Project Structure(快捷键 Ctrl + Alt + Shift + s),点击Proje ...
- HDUOJ----Safecracker(1015)
Safecracker Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- Android开发之5大布局方式详解
Android中常用的5大布局方式有以下几种: 线性布局(LinearLayout):按照垂直或者水平方向布局的组件. 帧布局(FrameLayout):组件从屏幕左上方布局组件. 表格布局(Tabl ...
- iOS - App 应用
1.Xcode 项目属性 Product Name 软件名称.产品名称.项目名称 Organization Name 公司名称.组织名称 Organization Identifier 公司的唯一标识 ...
- matplotlib热图
1.基础知识点回顾 1.plot(x, y, marker='D')表示绘制折线图,marker设置样式菱形. 2.scatter(x, y, marker='s', color='r')绘制散点图, ...
- Python endswith() 方法
描述 endswith() 方法用于判断字符串是否以指定后缀结尾,如果是则返回 True,否则返回 False. 语法 endswith() 方法语法: S.endswith(suffix[,star ...
- [转] 基本RS触发器
在触发器中,最简单的触发器是基本RS触发器,它由两个与-非门(或者两个或-非门)来组成. 图5.2.1(a)是由与-非门构成的基本RS触发器,由图看出,基本RS触发器有两个输入端(和)和两个输出端(和 ...