Framework design based on WPF system (6) Integrated MVVM Framework (Prism)

Source: Internet
Author: User

Our basic framework has been set up, now the integration of MVVM framework prism, in ViewModel do some logical processing, the interface design really separate.

This facilitates our system development and division of service, while improving system maintainability and flexibility.

Specific Prism installation and Microsoft.Practices.Prism.dll access in this URL: http://compositewpf.codeplex.com/

The same primitive pattern as WinForm:

(1) Now look at the previous design of the View:MainWindow.XAML source code:

(2) MainWindow.xaml.cs Source:

Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Using System.Windows;
Using System.Windows.Controls;
Using System.Windows.Data;
Using System.Windows.Documents;
Using System.Windows.Input;
Using System.Windows.Media;
Using System.Windows.Media.Imaging;
Using System.Windows.Navigation;
Using System.Windows.Shapes;
Using Fluent;
    
Using Xceed.Wpf.AvalonDock.Layout; namespace TLAgent.SecurityManager.WPF {///<summary>///interaction logic for MainWindow.xaml///< /summary> public partial class Mainwindow:ribbonwindow {public MainWindow () {in
        Itializecomponent (); } private void Onexitsystem (object sender, RoutedEventArgs e) {messageboxresult result = Mess
            Agebox.show ("Are you sure you want to exit the system?", "confirmation message", Messageboxbutton.okcancel, messageboximage.question);
  if (result = = Messageboxresult.ok) {Application.Current.Shutdown ();          }
        }
    }
} 

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.