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.