Prism4 document translation (Chapter 1 Part 2)

Source: Internet
Author: User
Tags visual studio 2010

The prism4 document does not have a Simplified Chinese version. Let me see it is really cool. Please take a moment to translate it and share it with you. I do not guarantee the correctness or ambiguity of the translation. Because of the limited time, we have to translate at 1.1. Change the title because it is not translated from the first section introduced in chapter 1. The previous sections are true .. Forget it.

This section describes how to install prism and update prism. Chapter 1 introduces the design objectives and important concepts of prism. The design goal has been translated!

You can find the original article in the following locations:

Http://compositewpf.codeplex.com/releases/view/55580

1. Prepare to start Prism: 1.1 prerequisites:

To use Prism, you need to develop a WPF or Silverlight application.ProgramExperience. In this way, you will be familiar with the important concepts that are widely used in prism. They include:

L XAML, a language used to describe and initialize the user interfaces of WPF and Silverlight applications.

L Data Binding: the means by which the WPF and Silverlight applications can connect the UI elements and components with data.

L methods for creating and managing styles, data templates, and control templates for resources, WPF and Silverlight applications.

L command to connect user gestures and inputs to the control (Note: User gestures translation is not clear ).

L user control, which is a component that provides custom behavior and display.

L Dependency Property, which is extended from the property system of CLR, will allow attribute setting and monitor data binding, routing commands and events.

L behavior: behavior is a series of functional human-computer interaction actions that are easily applied to the UI.

1.2 install prism

This section describes how to install prism. There are several steps:

1. environment required for installation;

2. decompress the prism source code, binary files, and documents;

3. Register prism.

Step 1: install the system environment

Prism can run on Windows 7/Vista/Server 2008. This version has passed the smoke test on Windows XP Professional Edition and Windows Server 2003, but does not complete the test. Using this wizard to create a WPF program requires the. NET Framework 4.0 platform, while the Silverlight program requires Silverlight 4.

Before using the prism 4 library, you need to install the following software:

L Microsoft. NET Framework 4.0 (installed with Visual Studio 2010)

L Visual Studio 2010 Professional Edition, Pro edition or flagship Edition

[Note]: Visual Studio 2010 trial versions cannot be programmed using the prism library.

If you need to develop a Silverlight application, you must install:

L Microsoft Silverlight 4 tool for Visual Studio 2010 (meeting Silverlight development needs, including Silverlight runtime)

[Note]: Although Silverlight tool for Visual Studio 2010 is not required to be installed, however, it is recommended that all developers who develop WPF and Silverlight applications download and use the latest Silverlight tool for Visual Studio 2010.

Both WPF and Silverlight developers should upgrade the runtime and SDK of Silverlight developers. We fix bugs and add new features in the form of patches.

Step 2: Decompress the prism source code, binary files, and documents

To install prism, right-click the prism 4.exe file and clickRun as Administrator. In this way, the system willSource codeDecompress binary files and documents to the specified folder.

Step 3: Register prism

Registering a prism is not necessary, but it makes it easier for your project to reference the prism assembly. If you choose to register prism, they will appear in the Visual StudioAdd referenceDialog box. Otherwise, you need to manually reference the prism library file to the project. The prism executable library is in the following directory:

L {prism} \ bin \ Desktop

L {prism} \ bin \ phone

L {prism} \ bin \ Silverlight

If you choose to register the prism executable library, run registerprismbinaries in the installation directory. bat batch file, which will create a temporary directory containing the development desktop program, the mobile phone program and the Silverlight program must reference the file. reg file to complete the registration process. However, because modifying the registry is a process that requires permission, UAC will prompt you to complete the operation. For more information about UAC, refer to msdn.

[Note]: Only one prism will be registered. If you copy multiple prism copies, the last one you registered will take effect.

2. explore what the prism version has updated

This version of Prism has been upgraded to WPF 4.0 and Silverlight 4. The following content is worth noting for this upgrade:

L MEF: prism now adds a guide for using MEF to manage attributes (Note: is it a wizard ?), To maintain loose coupling between components. These functions are described in detail in chapter 3.

L mvvm mode: The previous version of prism provides a lot of guidance on the separation of performance modes. Now all the content has been upgraded to the mvvm-oriented mode. The fifth chapter describes the mvvm mode and how to use it. The sixth chapter describes more scenarios where mvvm advanced applications can be used.

L navigation: This version of prism provides methods for developing the WPF and Silverlight navigation. The content includes the status-based navigation used to modify the visual status of a view and the view switching navigation that switches between views. These contents are described in detail in chapter 8 "navigation.

Prism now supports using the prism binary library signature to conveniently apply prism to your specific application without modification. In particular, all Visual Studio projects have been migrated to Visual Studio 2010 and Silverlight 4.

For more new functions or API changes, see the previous chapter.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.