Learn what’s included in Prism 5.0 including the documentation, WPF code samples, and libraries. Additionally find out where to get the library and sample source code and the library NuGet packages.

Prism5.0中包含了文档,WPF代码示例,程序集。本篇告诉你从哪里获取程序集和代码示例,还有NuGet包的内容。

For a list of the new features, assets, and API changes, see What's New in Prism 5.0.

对于新功能,资产,和API的更改信息,请看Prism5.0新内容.

Documentation 文档

Prism includes the following documentation:

Prism包含以下文档:

NuGet Packages NuGet包

  • Prism: Downloads NuGet dependency packages—Prism.Composition, Prism.Interactivity, Prism.Mvvm, and Prism.PubSubEvents NuGet Packages.
          Prism: 下载Prism集合包——Prism.Composition, Prism.Interactivity, Prism.Mvvm, and Prism.PubSubEvents NuGet 包.(叫集合包不一定对,有待验证)
  • Prism.Composition: Modularity, UI Composition, Bootstrapping, Interactivity, IActiveAware, Navigation, and deprecated NotificationObject and PropertySupport.
          Prism.Composition: 模块化,组合式UI,引导,交互,IActiveAware接口,导航,弃用的NotificationObject 和 PropertySupport
          Prism.Interactivity: 交互
  • Prism.Mvvm: The Portable Class Library for MVVM and the associated platform specific code to support MVVM. Includes Commanding, BindableBase, ErrorsContainer, IView, and ViewModelLocationProvider.
          Prism.Mvvm:MVVM跨平台类库和针对不同平台的MVVM平台相关代码。包含命令,BindableBase,ErrorsContainer,IView,和 ViewModelLocationProvider.
          Prism.PubSubEvents:跨平台PubSubEvents.类库。
          Prism.UnityExtensions:使用这个扩展,使你的Prism应用程序基于Unity。
  • Prism.MefExtensions: Use these extensions to Prism to build Prism applications based on Managed Extensibility Framework (MEF).
          Prism.UnityExtensions:使用这个扩展,使你的Prism应用程序基于MEF。
译注:Unity和MEF是两个依赖注入框架。感兴趣的朋友可以查查看。NuGet是目前非常流行的包管理工具,感兴趣看看。
 

The following table shows common Prism namespaces and in which assemblies and NuGet packages they can be found.

下表显示Prism公共命名空间。并限塑令额你从哪个程序集和从哪个NuGet包可以找到它。

Namespace

Assembly

NuGet Package

Microsoft.Practices.Prism.Logging

Microsoft.Practices.Prism.Modularity Microsoft.Practices.Prism.Regions

Microsoft.Practices.Prism.Composition

Prism.Composition

Microsoft.Practices.Prism.Interactivity

Microsoft.Practices.Prism.Interactivity

Prism.Interactivity

Microsoft.Practices.Prism.Commands

Microsoft.Practices.Prism.Mvvm

Microsoft.Practices.Prism.ViewModel

Microsoft.Practices.Prism.Mvvm

Prism.Mvvm

Microsoft.Practices.Prism.PubSubEvents

Microsoft.Practices.Prism.PubSubEvents

Prism.PubSubEvents

Download and Setup the Prism Source Code 下载并安装Prism源代码

This section describes how to install Prism. It involves the following three steps:

此节描述了怎样安装Prism。分三步:

  1. Install system requirements. 安装系统需求。
  2. Download and extract the Prism source code and documentation. 下载并提取Prism库中的源码和文档。
  3. Compile and run the QuickStarts, Reference Implementation, or Prism Library source code. 编译并运行快速入门,参考实现,或Prism源码。

Step 1: Install System Requirements 第一步:安装系统需求

Prism was designed to run on the Microsoft Windows 8 desktop, Microsoft Windows 7, Windows Vista, or Windows Server 2008 operating system. WPF applications built using this guidance require the .NET Framework 4.5.

在Win8,Win7,Vista,Server2008操作系统上,可运行Prism。用Prism5.0需要.NET Framework 4.5。

Before you can use the Prism Library, the following must be installed:

在你使用Prism库之前,下面两项必须安装:

  • Microsoft .NET Framework 4.5 (installed with Visual Studio 2012) or Microsoft .NET Framework 4.51.
  • Microsoft Visual Studio 2012 or 2013 Professional, Premium, or Ultimate editions.
Note:注意
Visual Studio 2013 Express Edition can be used to develop Prism applications using the Prism Library.
Visual Studio 2013 Express Edition 可以被用作开发Prism应用程序。

Optionally, you should consider also installing the following:

可选的,你可以考虑安装这个:

          Microsoft Blend for Visual Studio 2013. 一个专门用于设计WPF酷炫用户体验工具

Step 2: Download and Extract the Prism Source Code and Documentation 第二步:下载并提取Prism库源码和文档

You can download the source code for the Prism library, the reference implementation and the QuickStarts from the following link:

Prism库中的一些源码时可以下载到的,下面是参考实现和快速入门示例的下载链接:

To install the Prism assets, right-click the exe file or zip file, and then click Run as administrator. This will extract the source code into the folder of your choice.

右击刚刚下载的exe或zip文件,然后以管理员身份运行。这样做将会提取出Prism库源代码,放到你选择存放的文件夹中。

Note:注意
The Stock Trader Reference Implementation and the QuickStarts can also be downloaded separately. The table below provides links to the source code for each.
股票操盘参考实现和快速入门示例都可以被单独下载,下表分别提供了每个示例下载的连接。

Sample

示例

Category

类型

Description

描述

Stock Trader Reference Implementation

股票操盘参考示例

Prism

The Stock Trader RI application is a reference implementation that illustrates the baseline architecture. Within the application, you will see solutions for common, and recurrent, challenges that developers face when creating composite WPF applications.

股票操盘应用程序是一个描述Prism基本架构的参考实现。在程序中,你将看到一些我们开发组合式WPF应用时面临的公共的,重复遇到的,富有挑战的问题。

The Stock Trader RI illustrates a fictitious, but realistic financial investments scenario. Contoso Financial Investments (CFI) is a fictional financial organization that is modeled after real financial organizations. CFI is building a new composite application to be used by their stock traders.

股票操盘应用程序是一个模拟程序,但是一个现实的金融投资方案。Contoso Financial Investments (CFI) 是个模拟现实金融机构的虚拟机构。CFI想构建你哥给他们股民使用的组合式应用程序。

Hello World Hands-on Lab

Hello World动手实验室

Get Started

入门

The Hello World Hands-on Lab demonstrates the end solution for the hands-on lab "Getting Started Using the Prism Library 5.0 for WPF Hands-on Lab." In this lab, you will learn the basic concepts of Prism and apply them to create a Prism Library solution that you can use as the starting point for building a composite WPF.

在Hello World动手实验室示例中,你将看到一些Prism基本概念,你可以用这些概念作为你创建组合式WPF应用的一个起点。

Unity模块化入门
MEF模块化入门

Modularity

模块化

The Modularity QuickStarts demonstrate how to code, discover, and initialize modules using Prism. These QuickStarts represent an application composed of several modules that are discovered and loaded in the different ways supported by the Prism Library using MEF and Unity as the composition containers.

模块化快速入门演示了怎样利用Prism编码,发现,及初始化模块。这些快速入门展示了以不同方式发现并加载模块,利用Unity或是MEF作为组合容器。

MVVM QuickStart

MVVM快速入门

MVVM

The MVVM QuickStart demonstrates how to build an application that implements the MVVM presentation pattern, showing some of the more common challenges that developers can face, such as wiring a view and view model using the ViewModelLocator, validation, UI interactions, and data templates.

MVVM快速入门演示了怎样构建一个实现了MVVM模式的程序,内含使用ViewModelLocator连接视图和视图模型,验证,UI交互,和数据模板。

Commanding QuickStart

命令快速入门

Commanding

The Commanding QuickStart demonstrates how to build a WPF UI that uses commands provided by the Prism Library to handle UI actions in a decoupled way.

命令快速入门展示了怎样构建一个用Prism命令处理UI动作的WPF界面。利用Prism命令还是一中松耦合的方式。

UI Composition QuickStart

组合式UI快速入门

UI Composition

This QuickStart demonstrates how to build WPF UIs composed of different views that are dynamically loaded into regions and that interact with each other in a decoupled way. It illustrates how to use both the view discovery and view injection approaches for UI composition.

此示例描述了怎样组合不同的视图,视图的加载方式,以松耦合的方式交互。它说明怎样使用视图发现和视图注入方法来组合UI。

State-Based Navigation QuickStart

基于状态导航快速入门

Navigation

This QuickStart demonstrates an approach to define the navigation of a simple application. The approach used in this QuickStart uses the WPF Visual State Manager (VSM) to define the different states that the application has and defines animations for both the states and the transitions between states.

此示例描绘了一个定义一个简单应用程序导航的方法。就是使用WPF视图状态管理器(VSM),去定义不同的状态的动画及不同状态间的切换动画。

View-Switching Navigation QuickStart

视图切换导航快速入门

Navigation

This QuickStart demonstrates how to use the Prism Region Navigation API. The QuickStart shows multiple navigation scenarios, including navigating to a view in a region, navigating to a view in a region contained in another view (nested navigation), navigation journal support, just-in-time view creation, passing contextual information when navigating to a view, views and view models participating in navigation, and using navigation as part of an application built through modularity and UI composition.

此示例描述怎样使用Prism区域导航API。示例展示多个导航场景,包含导航一个区域内的视图,导航一个嵌套在一个视图中的区域的视图。导航记录支持,即时视图创建,导航时传递上下文,视图和视图模型参与导航,和使用导航作为程序模块化和组合UI的一部分。

Event Aggregation QuickStart

事件聚合快速入门

Event Aggregation

This QuickStart demonstrates how to build a WPF application that uses the Event Aggregator service. This service enables you to establish loosely coupled communications between components in your application.

此示例描述了怎样构建一个使用了事件聚合的WPF应用程序。此服务可以让你的组件可以松耦合的通信。

Interactivity QuickStart

交互快速入门

Interactivity

This QuickStart demonstrates how to create a view and view model that work together when the view model needs to interact with the user or user gesture needs to raise an event that invokes a command. In each of these scenarios the view model should not need to know about the view. The first scenario is handled by using and InteractionRequestTriggers. The second scenario is handled by InvokeCommandAction.

此示例展示了怎样让视图和视图模型共同工作,当视图模型需要和用户交互式时。视图模型不需要知道视图。第一个场景是用InteractionRequestTriggers 处理交互。第二个场景使用InvokeCommandAction 处理交互。

Step 3: Compile and Run QuickStarts, Reference Implementation, or Prism Library Source Code 第三步:编译和运行快速入门,参考实现,或者Prism源代码

In order to build and run the reference implementation and the QuickStarts, select the appropriate shortcut file and press F5 to build and run.

为了构建和运行参考实现和快速入门,需要选择对应的快捷文件并按F5编译运行。

The reference implementation and QuickStarts use NuGet references to the Prism library assemblies so you can compile and run each solution directly.

参考实现和快速入门中的Prism程序集是用的NuGet引用,所有你可以直接编译并运行它们。

Adding Prism Library Source Projects to Solutions 添加Prism库源项目到解决方案

As part of shipping the Prism Library as NuGet packages, the Prism Library projects were removed from the solutions of all QuickStarts and reference implementation projects. If you are a developer accustomed to stepping through the Prism Library code as you build your application, there are a couple of options:

快速入门,参考实现,这些示例内都是用NuGet包来引用的Prism程序集,你要想使用Prism源代码,有以下选择:

  • Add the Prism Library Projects back in. To do this, right-click the solution, point to Add, and then click Existing project. Select the Prism Library projects. Then, to prevent inadvertently building these, click Configuration Manager on the Build menu, and then clear the Build check box for all Prism Library projects in both the debug and release configurations.
        添加Prism类库项目。右击解决方案,点击添加,然后点击现有项目。选择Prism项目。然后,为防止编译它,点击生成菜单下配置管理器,无论是debug还是release中都取消Prism项目的生成。(不解,为什么不让生成,求指教)
  • Set a breakpoint and step in. Set a break point in your application's bootstrapper, and then step in to a method within the base class (F11 is the typical C# keyboard shortcut for this). You may be asked to locate the Prism Library source code, but often, the full program database (PDB) file is available and the file will simply open. You may set breakpoints in any Prism Library project by opening the file and setting the breakpoint.
        设置断点单步调试。在bootstrapper中设置一个断点,然后单步调试。你可以访问到本地的Prism源代码。但通常情况下,完整的PDB文件时可用的,文件将简单的打开(这是要说什么?)。你可以在Prism项目中设置断点来方便调试。

Related Downloads 相关下载

Next Topic | Previous Topic | Home | Community
下篇 | 上篇 | 主页 | 社区

下载并安装Prism5.0库 Download and Setup Prism Library 5.0 for WPF(英汉对照版)的更多相关文章

  1. 2: 使用Prism初始化程序 Initializing Applications Using the Prism Library 5.0 for WPF(英汉对照版)

    This topic addresses what needs to happen to get a Prism for WPF application up and running. A Prism ...

  2. Prism5.0开发人员指南内容 Contents of the Developer's Guide to Prism Library 5.0 for WPF(英汉对照版)

    The Prism for WPF guide contains the following topics: Prism指南包含以下内容: Download and Setup Prism 下载并安装 ...

  3. Prism5.0新内容 What's New in Prism Library 5.0 for WPF(英汉对照版)

    Prism 5.0 includes guidance in several new areas, resulting in new code in the Prism Library for WPF ...

  4. Prism开发人员指南5-WPF开发 Developer's Guide to Microsoft Prism Library 5.0 for WPF (英汉对照版)

    April 2014 2014四月   Prism provides guidance in the form of samples and documentation that help you e ...

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

  6. 4: 模块化应用程序开发 Modular Application Development Using Prism Library 5.0 for WPF (英汉对照版)

    A modular application is an application that is divided into a set of loosely coupled functional uni ...

  7. 3: 组件间的依赖管理 Managing Dependencies Between Components Using the Prism Library 5.0 for WPF(英汉对照版)

    Applications based on the Prism Library are composite applications that potentially consist of many ...

  8. 下载并安装Prism5.0库(纯汉语版)

    Prism5.0中包含了文档,WPF代码示例,程序集.本篇告诉你从哪里获取程序集和代码示例,还有NuGet包的内容. 对于新功能,资产,和API的更改信息,请看Prism5.0新内容. 文档 Pris ...

  9. 【Python基础】安装python第三方库

    pip命令行安装(推荐) 打开cmd命令行 安装需要的第三方库如:pip install numpy 在安装python的相关模块和库时,我们一般使用“pip install  模块名”或者“pyth ...

随机推荐

  1. Linux学习笔记(11)linux网络管理与配置之一——配置路由与默认网关,双网卡绑定(5-6)

    Linux学习笔记(11)linux网络管理与配置之一——配置路由与默认网关,双网卡绑定(5-6) 大纲目录 0.常用linux基础网络命令 1.配置主机名 2.配置网卡信息与IP地址 3.配置DNS ...

  2. Thymeleaf添加页面模板

    在页面编辑中,有一些公共的页面部分(比如header,footer等)可以抽取出来放到模板中,其他页面使用的时候可以调取该模板,这样的好处是如果修改这些公共部分,只修改模板中的代码即可. 为了做到这一 ...

  3. HTML中的SEO和HTML语义化

    SEO 1) <title>网站SEO标题</title>, 百度搜索出来的记录, 其标题基本就提取至网站的title, 标签, 因此标题起的好, 不论对点击率还是SEO都至关 ...

  4. Delphi 正则表达式之TPerlRegEx 类的属性与方法(4): Replace

    Delphi 正则表达式之TPerlRegEx 类的属性与方法(4): Replace // Replace var   reg: TPerlRegEx; begin   reg := TPerlRe ...

  5. ReportView 添加自动增长序号

    在显示序号的列中输入相关的值: 在此表达式的后面是Nothing,不是null,不要搞错.

  6. service 需要注意的地方

    @service标记的class,只能用于标记了@controller的类,用于其他的会出错 mybatis查询查询到返回记录,查询不到返回null

  7. 杭电1024Max Sum Plus Plus

    地址:http://acm.hdu.edu.cn/showproblem.php?pid=1024 题目: Problem Description Now I think you have got a ...

  8. CodeForces - 987E Petr and Permutations (思维+逆序对)

    题意:初始有一个序列[1,2,...N],一次操作可以将任意两个位置的值互换,Petr做3*n次操作:Alxe做7*n+1次操作.给出最后生成的新序列,问是由谁操作得到的. 分析:一个序列的状态可以归 ...

  9. IDEA MAVEN Project 显示问题

    今天正常打开idea,却发现maven窗口找不到了:试了这些方法 首先idea自带了maven控件,不像Eclipse还需要下载控件,如果你以前有maven在右边,出于某种原因,消失找不到 了,你可以 ...

  10. Android 电池关机充电

    android 电池(一):锂电池基本原理篇 android 电池(二):android关机充电流程.充电画面显示 android 电池(三):android电池系统 android电池(四):电池 ...