Create the first WPF application instance based on the prism framework (including source code download)

Source: Internet
Author: User
Component Model, view, and viewmodel

View: Ui

Viewmodel: it is the abstract of the view. It is responsible for converting the information between the view and the model and transmitting the view command to the model;

Model: Data Model Layer

The following method can be used to connect view and viewmodule:

Binding data: Data Transmission

Command: Call the operation.

Attachbehavior: Implements operations during control loading.

View does not have a lot of code logic. This is the result of using the mvvm design mode, rather than our deliberate purpose. Combined with the WPF and Silverlight binding mechanisms, MVP evolved into mvvm, making full use of the advantages of WPF and Silverlight to switch a large amount of code logic and status to viewmodel, mvvm is specially designed for WPF and Silverlight.

The view is bound to the viewmodel, and some commands are executed to request an action from it. In turn, viewmodel communicates with the model and tells it to update to respond to the UI. This makes it easy to build the UI for the application. The easier it is to paste an interface to an application, the easier it is for the designer to use blend to create a beautiful interface. At the same time, when the UI and functions become increasingly loosely coupled, the functional testability is getting stronger and stronger.


The instance source code works as follows:

Source code: http://download.csdn.net/detail/taomanman/4991722

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.