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新內容.架構
Prism includes the following documentation:app
Prism包含如下文檔:框架
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 |
This section describes how to install Prism. It involves the following three steps:
此節描述了怎樣安裝Prism。分三步:
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庫以前,下面兩項必須安裝:
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:
可選的,你能夠考慮安裝這個:
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動手實驗室 |
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快速入門 |
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 |
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快速入門 |
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 |
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 |
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 處理交互。 |
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引用,全部你能夠直接編譯並運行它們。
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源代碼,有如下選擇: