一下子跳到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. web自动化--窗口切换

    窗口切换 handles = driver.window_handles ------获取所有窗口句柄,返回的数据是一个列表类型 driver.switch_to.window(handles[-1] ...

  2. white-space: pre-line;的坑

    html模版解析换行 这是字符串 跟标签设置white-space: pre-line: pre兼容ie8,pre-line不兼容ie 6-7 这行文字开头是没有空格的但是还是有很大的空格,代码方法截 ...

  3. PYinstall打包程序出现编码错误的解决 'utf-8' codec can't decode byte 0xce in position 171: invalid continuation b

    网上说,先执行,再打包 chcp 65001 试过没有用. 解决方案: 把import的包批量注释,然后寻找是import那个文件导致. 虽然注释会导致程序运行出错,但是打包才不管你能不能运行. 最后 ...

  4. DOC命令学习(一)

    DOC命令学习(一) 命令 切换目录命令(cd) cd /d E: 查看目录命令(dir) dir   #查看# 回显命令(echo) @echo offset d = %date:~0,10%set ...

  5. 声网 X 远程超声:实时音视频解决基层“看病难” 推动医疗资源均衡化

    实时互联网像触角一样,通过情景的共享延伸开来,链接着我们彼此的线下.线上生活,形成一张不可分割的网络.随着社交直播.在线教育.视频会议成为大众生活不可或缺的一部分的同时,智能手表.智能作业灯.视频双录 ...

  6. 2023最新ELK日志平台(elasticsearch+logstash+kibana)搭建

    前言 去年公司由于不断发展,内部自研系统越来越多,所以后来搭建了一个日志收集平台,并将日志收集功能以二方包形式引入自研系统,避免每个自研系统都要建立一套自己的日志模块,节约了开发时间,管理起来也更加容 ...

  7. SpringBoot工程入门case

    SpringBoot的设计目的是用来简化Spring应用的初始搭建以及开发过程. SpringBoot入门案例: 1.创建一个新module 2.除pom和src文件剩余都删除. 3.在src.com ...

  8. 一篇文章带你了解Java中的运算符

    前言 在前一篇文章中,壹哥给大家讲解了Java数据类型之间的转换,包括自动类型转换.强制类型转换.隐含的强制类型转换等问题.且在上一篇文章中,我还简单地给大家提到了Java的类型提升.在类型提升的案例 ...

  9. 2PC(两阶段提交)【XA 与 Seata方案】

    更多内容,前往 IT-BLOG 一.概述 2PC(two phase commit protocol,2PC)即两阶段提交协议,是将整个事务流程分为两个阶段,准备阶段(Prepare phase).提 ...

  10. cron语句

    名称 是否必须 允许值 特殊字符 秒 是 0-59 , - * / 分 是 0-59 , - * / 时 是 0-23 , - * / 日 是 1-31 , - * ? / L W C 月 是 1-1 ...