Monday 21 May 2012

WPF Architecture


Hi Friends,
Today I would  like to discuss some  core part of WPF architecutre. in  WPF ,Presentation Framework, Core Presentation and Media Integration Layer (milcore) Are The Three Major components of WPF architecture. These Are the Major portions of the WPF code. Milcore is cash en Unmanaged Code in order to enable tight integration with DirectX. DirectX engine is responsible for all display in WPF, allowing for efficient hardware and software rendering. CLR Provides fine control over the memory and execution. The composition engine in milcore is Extremely sensitive performance, and required giving up Many advantages of the CLR to gain performance.
Details


To know more about the WPF, one must have a clear idea about the architecture of WPF. The architecture of WPF is Actually multilayered architecture. It spans across Three layers - Managed Code and Unmanaged Code Core operating system, we can call thesis set of layers have built up assemblies That The Entire framework. The major components of WPF are illustrated in Figure below

Managed Layer: - The public API is only Exposed via this layer. Majority of WPF is in managed code.
1)   PresentationFramework.dll: - It Holds the top level WPF elements, Including Those That Represents Windows, panels, controls, styles etc.. It implements the aussi end-user presentation features Including time-dependent, story-based animations and data binding.
2)   PresentationCore.dll: - Presentation Core Provides a managed wrapper for MIL and implements the core services for WPF UI Element Such as visual and from Which all shapes and controls derived inPresentationFramework.dll.
3)   WindowsBase.dll: - Holds more basic Elements Which are able To Be Reused outside environment like the WPF Dispatcher Dependency objects and objects.
Unmanaged Layer
1)   milCore.dll: - While the Majority of WPF is managed in layer, the composition engine Which renders the WPF implementation is a native component. It Is Called as Media Integration Layer (MIL) and Resides InmilCore.dll. The purpose of the milcore Directly interface is to provide statement with DirectX and basic medium for 2D and 3D surface. It is the hand of WPF rendering engine and interface is Between DirectX and CLR.
2)   WindowsCodecs.dll: - WindowsCodecs is Another low level API Which is Used For imaging medium in WPF applications like image processing, image displaying and scaling etc.. It comprised of a number of codecs Which encode / decoded image vector graphics Into That Would Be Into WPF rendered screen.
Core Operating System Layer (kernel):
1)   DirectX - DirectX is the low level API-through Which WPF renders all graphics.
2)   User32: - It the primary core Every Which API implementation uses.Actually user32 memory marriages and separation process.

All WPF applications start with Two threads - one for managing the UI and Another background thread for handling the rendering and repainting.Rendering and repainting is managed by WPF and so it does not require Any developer intervention.