Prism Sample 29-InvokeCommandAction
一下子跳到29,不是我的错,应该是新版本中去掉了一些过重的功能,案例就也去掉了,所以不是我的错。
本例是演示行为转命令的,事实上前面已经用到了。
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" <i:Interaction.Triggers>
<!-- This event trigger will execute the action when the corresponding event is raised by the ListBox. -->
<i:EventTrigger EventName="SelectionChanged">
<!-- This action will invoke the selected command in the view model and pass the parameters of the event to it. -->
<prism:InvokeCommandAction Command="{Binding SelectedCommand}" TriggerParameterPath="AddedItems" />
</i:EventTrigger>
</i:Interaction.Triggers>
前面是引入的命名空间,有些例子用错了就提示出错。
这个原因是,不是所有控件都可以直接绑定Command的,只有Button类,MenuItem类,ListBoxItem类可以。
但是这个例子就是ListBox啊,如果不用转命令而是直接绑定怎么办呢?
Prism Sample 29-InvokeCommandAction的更多相关文章
- Android 主题动态切换框架:Prism
Prism(棱镜) 是一个全新的 Android 动态主题切换框架,虽然是头一次发布,但它所具备的基础功能已经足够强大了!本文介绍了 Prism 的各种用法,希望对你会有所帮助,你也可以对它进行扩展, ...
- [转]Blue Prism Architecture
本文转自:https://mindmajix.com/blue-prism-architecture Introduction Automation technology is widely bloo ...
- Prism.WPF -- Prism框架使用(下)
本文参考Prism官方示例 命令使用 Prism提供了两种命令:DelegateCommand和CompositeCommand. DelegateCommand DelegateCommand封装了 ...
- dotnet获取PDF文件的页数
#region 获取PDF文件的页数 private int BytesLastIndexOf(Byte[] buffer, int length, string Search) { if (buff ...
- net 预览文件 转换文件
预览SWF文件 swfobject.js (google浏览器 会阻止 需设置) @{ ViewBag.Title = "PdfPreview"; Layout = " ...
- 1: 介绍Prism5.0 Introduction to the Prism Library 5.0 for WPF(英汉对照版)
Prism provides guidance designed to help you more easily design and build rich, flexible, and easy- ...
- 下载并安装Prism5.0库 Download and Setup Prism Library 5.0 for WPF(英汉对照版)
Learn what’s included in Prism 5.0 including the documentation, WPF code samples, and libraries. Add ...
- Basic linux command-with detailed sample
Here I will list some parameters which people use very ofen, I will attach the output of the command ...
- [转] Spring MVC sample application for downloading files
http://www.codejava.net/frameworks/spring/spring-mvc-sample-application-for-downloading-files n this ...
- Sample Join Analysis
Sample data: student.txt 1,yaoshuya,25 2,yaoxiaohua,29 3,yaoyuanyie,15 4,yaoshupei,26 Sample data:sc ...
随机推荐
- 部门mysql操作
use test_db; -- 删除表 drop table if exists t1_profit; drop table if exists t1_salgrade; drop table i ...
- Linux 系统设置
ubuntu下使用PageUp/PageDown快速翻出历史命令 #vim/etc/inputrc 解除两行注视后重启终端 "\e[5~": history-search-back ...
- 第七章ssh sftp scp
第七章ssh sftp scp 对数据进行了加密和压缩 版本号协商,可能客户端和服务端的版本号不一致,服务端向客户端发送一个ssh协商,告诉客户端使用的ssh协议的版本号是多少,客户端在接收到了这个协 ...
- redis学习(一)常用命令
clear 清屏 info 获取当前redis的版本等信息 keys pattern 查找所有符合给定模式( pattern)的 key keys * 查找所有的key type key 查看某个ke ...
- jmeter设置中文
jmeter.properties #language=enlanguage=zh_CN
- linux中查看用户和组信息小结
查看当前登录用户的组内成员groups 查看当前登录用户名whoami 查看tom用户所在的组,以及组内成员groups tom 查看所有的用户信息cat /etc/passwd 用户名.密码.用户i ...
- Python中,类的特殊方法与内置函数的关联
目录 Python类 Python类的设计原则 特殊方法[Special methods] Duck typing 内置函数 English Version The key design princi ...
- [Java/LeetCode]算法练习:转变日期格式(1507/simple)
1 题目描述 题目来源: https://leetcode-cn.com/problems/reformat-date 给你一个字符串 date ,它的格式为 Day Month Year ,其中: ...
- [软件过程/软件生命周期模型]软件过程的工具链&技术链【待续】
0 宣言:DevOps & RUP统一过程建模 1 项目管理 (需求管理 / 缺陷管理 / ...) 禅道(前身:bugfree) [在线协作] JIRA(项目与事务跟踪工具) 与禅道类同,但 ...
- [数据库/Linux]CentOS7安装MySQL Percona版(RPM方式)
OS: CentOS7 (x86_64) MySQL: MySQL Percona 5.7.31-34 0 前置条件 已配置完成YUM源 已卸载先前可能安装的MySQL rpm -qa | grep ...