一下子跳到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的更多相关文章

  1. Android 主题动态切换框架:Prism

    Prism(棱镜) 是一个全新的 Android 动态主题切换框架,虽然是头一次发布,但它所具备的基础功能已经足够强大了!本文介绍了 Prism 的各种用法,希望对你会有所帮助,你也可以对它进行扩展, ...

  2. [转]Blue Prism Architecture

    本文转自:https://mindmajix.com/blue-prism-architecture Introduction Automation technology is widely bloo ...

  3. Prism.WPF -- Prism框架使用(下)

    本文参考Prism官方示例 命令使用 Prism提供了两种命令:DelegateCommand和CompositeCommand. DelegateCommand DelegateCommand封装了 ...

  4. dotnet获取PDF文件的页数

    #region 获取PDF文件的页数 private int BytesLastIndexOf(Byte[] buffer, int length, string Search) { if (buff ...

  5. net 预览文件 转换文件

    预览SWF文件 swfobject.js  (google浏览器 会阻止 需设置) @{ ViewBag.Title = "PdfPreview"; Layout = " ...

  6. 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- ...

  7. 下载并安装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 ...

  8. 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 ...

  9. [转] Spring MVC sample application for downloading files

    http://www.codejava.net/frameworks/spring/spring-mvc-sample-application-for-downloading-files n this ...

  10. Sample Join Analysis

    Sample data: student.txt 1,yaoshuya,25 2,yaoxiaohua,29 3,yaoyuanyie,15 4,yaoshupei,26 Sample data:sc ...

随机推荐

  1. 博弈论练习6 Deleting Divisors(sg找规律,思维)

    题目链接在这里:G-Deleting Divisors_牛客竞赛博弈专题班组合游戏基本概念.对抗搜索.Bash游戏.Nim游戏习题 (nowcoder.com) 这道题一道比较明显的思路是使用sg函数 ...

  2. mysql使用support-files下的mysql.server启动报错“Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)”

    报错版本:mysql-5.7.35 1.报错完整提示信息: [root@localhost support-files]# ./mysql.server start ./mysql.server: l ...

  3. Unity递归查找子物体

  4. 谷歌翻译不能用解决办法(谷歌翻译关闭后,如何继续使用Chrome浏览器的翻译功能?)

    1.查找 IP   虽然谷歌不再提供 translate.google.cn 网页版的服务了,但谷歌翻译的 API 服务还在. 只需要通过 hosts 重定向至国内服务器,即可恢复使用. 1.Ping ...

  5. 执行sql语句,查询sql版本

    SELECT VERSION();

  6. 学习记录--C++文件读入与存储

    C++中对文件操作需要包含头文件<fstream> 操作文件的三大类:1.ofstream写操作 2.ifstream读操作 3.fstream读写操作 一.写文件步骤 1.包含头文件 # ...

  7. FastReport OpenSource发布到Linux上的准备

    一.安装libgdiplus(libgdiplus是一个Mono库,用于对非Windows操作系统提供GDI+兼容的API)   apt-get install build-essential lib ...

  8. [rk3568][buildroot] 移除RK3568 iodomain check

    1. 问题背景 RK3568 基线代码默认会起一个服务监控RK3568 iodomain,该服务间隔性输出log信息: 由于该功能非必要,故选择移除该部分逻辑 2.解决方案 查看源码编译脚本,如下图所 ...

  9. PHP 数据库操作

    连接数据库 连接数据库常用的函数 mysqli_connect(主机IP,用户名,密码,数据库名,端口号) // 端口号如果是3306可以省略 mysqli_connect_error():获取连接数 ...

  10. nginx+lua+openresty+kafka相关问题汇总

    这里使用的是kafka插件是doujiang大佬的https://github.com/doujiang24/lua-resty-kafka,版本为v0.2.0. 应用场景 在nginx转发中,记录非 ...