下載並安裝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. Additionally find out where to get the library and sample source code and the library NuGet packages.ios

    Prism5.0中包含了文檔,WPF代碼示例,程序集。本篇告訴你從哪裏獲取程序集和代碼示例,還有NuGet包的內容。express

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

    對於新功能,資產,和API的更改信息,請看Prism5.0新內容.架構

Documentation 文檔

    Prism includes the following documentation:app

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

下表顯示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.
Gg405471.note(en-us,PandP.40).gifNote:注意
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庫源代碼,放到你選擇存放的文件夾中。

Gg405471.note(en-us,PandP.40).gifNote:注意
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
下篇 | 上篇 | 主頁 | 社區
相關文章
相關標籤/搜索