一下子跳到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. MariaDB简介

    一.什么是数据库 DB 与 DBMS :DB(DataBase)即数据库,存储已经组织好的数据的容器.DBMS(DataBase Manage System)是数据库管理系统用来对数据库及数据库中的数 ...

  2. 使用selemium被反爬解决方法

    使用selenium进行自动化的时候,如csdn登录时可能会遇到检测反爬,从而需要验证       1. 反爬 有时候,我们利用 Selenium 自动化爬取某些网站时,极有可能会遭遇反爬. 实际上, ...

  3. Linux拷贝以及赋权

    拷贝     cp -r  /源文件/* 目标文件/&     //&后台运行符 改变权限  sudo chown -R 用户:群组  文件名           // sudo ch ...

  4. android装包

    一.找到对应包体apk 二.数据线连接电脑及手机,弹出USB连接选项并选择传输文件 注:如果未弹出USB连接选项可尝试换根数据线解决 三.点击我的电脑找到本机设备 四.将对应包体文件拖入本机设备 五. ...

  5. VC9.0 for Python2

    python2安转包时提示: pip install xxx时,提示 Microsoft Visual C++ 9.0 is required 下载并安装: 链接:https://pan.baidu. ...

  6. Java笔记第十一弹

    TCP通信程序 TCP发送数据 //需要进行三次握手 import java.io.*; public class Main{ public static void main(String[] arg ...

  7. 深入理解 Python 虚拟机:复数(complex)的实现原理及源码剖析

    深入理解 Python 虚拟机:复数(complex)的实现原理及源码剖析 在本篇文章当中主要给大家介绍在 cpython 虚拟机当中是如何实现 复数 complex 这个数据类型的,这个数据类型在 ...

  8. 《程序员的自我修养》学习笔记——ELF 文件结构介绍【第二弹】

    ELF 文件结构介绍 文件头 以 ELF 文件64位版本为例: e_ident [ELF魔数 16byte] 1-4字节:ELF 文件都必须相同的标识码,分别为 0x7F,0x45,0x4C,0x46 ...

  9. webgl 系列 —— 绘制猫

    其他章节请看: webgl 系列 绘制猫 上文我们了解了如何绘制渐变彩色三角形,明白了图形装配.光栅化,以及片元着色器计算片元的颜色. 现在如果让你绘制如下一只猫.难道绘制很多三角形,然后指定它们的颜 ...

  10. SpringBoot集成海康网络设备SDK

    目录 SDK介绍 概述 功能 下载 对接指南 集成 初始化项目 初始化SDK 初始化SDK概述 新建AppRunner 新建SdkInitService 新建InitSdkTask 新建 HCNetS ...