一下子跳到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. STM32的USART的DMA不定长度收发代码

    /* * 函数名:USART1_DMA_Config * 描述  :串口1的DMA 的初始化配置 * 输入  :无 * 输出  : 无 * 调用  :在USART1_INIT()中被调用 */ voi ...

  2. SQL作业编辑报错 无法将COM组件......

    在命令行运行下列命令 数据库为2005cd C:\Program Files\Microsoft SQL Server\90\DTS\Binnregsvr32 dts.dll

  3. classpath、path、JAVA_HOME的作用及JAVA环境变量配置 (转)

    CLASSPATH是什么?它的作用是什么? 它是javac编译器的一个环境变量.它的作用与import.package关键字有关.当你写下improt java.util.*时,编译器面对import ...

  4. 《MySQL是怎样运行的》第五章小结

  5. 11.1/2 鼠标显示问题(harib08a)11.2 实现画面外的支持(harib08b)

    ps:能力有限,若有错误及纰漏欢迎指正.交流 11.1 鼠标显示问题(harib08a) 存在问题: ​ 在harib07d中鼠标移动到最右侧后就不能再往右移了 解决办法: 将 if (mx > ...

  6. GRU简介

    一.GRU介绍 GRU是LSTM网络的一种效果很好的变体,它较LSTM网络的结构更加简单,而且效果也很好,因此也是当前非常流形的一种网络.GRU既然是LSTM的变体,因此也是可以解决RNN网络中的长依 ...

  7. 使用EFCore的Code First和MySql数据库迁移

    1. 感慨一下 随着.net core的持续更新和升级,至少对于从事.net开发的人员和即将踏入这个领域的人来说,我相信大家的热情还是持续高涨的.国内的.net开发生态相比于之前来说,还是大有所好转的 ...

  8. 使用K8S进行蓝绿部署的简明实操指南

    在之前的应用部署系列文章里,我们已经介绍过什么是蓝绿部署.如需回顾,点击下方文章链接即可重温.本文我们将会介绍如何使用 Kubernetes 实现蓝绿部署. 应用部署初探:3个主要阶段.4种常见模式 ...

  9. 在Ubuntu 18.04上安装NVIDIA

    安装NVIDIA显卡驱动风险极大,新手注意. 在Ubuntu 18.04上安装NVIDIA有三种方法: 使用标准Ubuntu仓库进行自动化安装 使用PPA仓库进行自动化安装 使用官方的NVIDIA驱动 ...

  10. python之re详解

    import re# .匹配任何一个字符,除了换行#[]匹配里面任意一个字符# \d匹配一个数字0-9# \D匹配不是一个数字# \s 匹配一个空格和tab# \S 匹配非空格和tab一个字符# \w ...