WPF Caliburn Study Notes (3) Application Model

Source: Internet
Author: User
ArticleDirectory
    • Configuration 1:
    • Configuration 2:
Caliburnapplication configuration 1:

When we configure the Caliburn container, the following section is added in APP. XAML. CS.Code:

 
Caliburnframework. configurecore (). withpresentationframework (). Start ();
Configuration 2:
 
There is also a configuration that uses the Caliburn base class for configuration, where app. XAML. CS and App. XAML are to be modified.
 
Public partial class app: caliburnapplication {public app () {initializecomponent ();}}
 
<CAL: caliburnapplication X: class = "yourprojectname. app" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml" xmlns: Cal = "http://www.caliburnproject.org"> </CAL: caliburnapplication>
 
This effect is equivalent to the first configuration.
The configuration of the Caliburn base class ensures that we can run it correctly. However, if we want to implement custom configuration. You may need to rewrite the following methods:

Createcontainer

Allows developers to specify their own IOC containers and make proper configurations.

Selectassemblies

Allow developers to tell Caliburn which to chooseProgramSet components, views, commands, etc.

Configurepresentationframework

Allows developers to customize Common Framework Services.

Configurecaliburn

Allows developers to use their own configuration components of the container Caliburn. This is only necessary if container adapter iconfigurator is not implemented.

Caliburn interfaces:

The ipresenter component model page describes some interfaces and classes that implement these interfaces.

Class of the role interface implementation Interface

Screen activator | ipresenter | presenter

Screen conductor (screen navigation) | ipresentermanager, inavigator | presentermanager, Navigator

Screen collection | ipresenterhost | multipresentermanager, multipresenter

Application controller (Application container) | ipresenterhost, ipresentermanager, inavigator | presentermanager, Navigator, multipresentermanager, multipresenter

Incomplete

There are many interfaces and Policy modes in the Caliburn application model, which can be combined with the instance lob samples.

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.