Creating new project with WPF,loads some namespaces and classes by default.Before working with those, we must know about those, that we use in our applications.
Before going to the classes and namespaces , we must know about the assemblies that provide classes and interfaces.
Assemblies of WPF:
WPF have three base assemblies. Those are as follows.
1. WindowsBase.dll : Defines the base infrastructure of WPF , including dependency properties.
2.PresentationCore.dll : Defines numerous types that constitute the foundation of the WPF GUI(graphical user interface) layer.
3.PresentationFoundation.dll : Defines WPF control types,animations and multimedia ,data binding support .It also specifies some other functionality.
The above three are managed libraries.Besides these WPF uses an unmanaged libraryi.e. milcore.dll. This library is responsible to work with DirectX Layer.Means, this library acts as a bridge between WPF managed libraries and DirectX Layer.
Classes of WPF:
Have a look at the below figure for class's functionality.

All the above assemblies provides a number of new namespaces and hundreds of new .NET types(classes, interfaces, structures, enumerations and delegates) to work with WPF.
Dispatcher Object:It is an abstract base class for classes that are bound to one thread. Classes that are derived from Dispatcher Object have an associated Dispatcher object that can be used to switch the threads.
Application:In every WPF application, one instance of Application class is created. This class implements a singleton pattern for access to the window of application, resources and properties.
Dependency Object:It is the base class for all the classes that supports Dependency property.
Visual:This is the base class for all the visual elements of WPF. It also includes features of transformation.
UI Element:It is the abstract base class for all WPF elements that need basic presentation feature. This class provides events such as mouse over, drag and drop, click, etc.
Framework Element:It is derived from base class UIElements and implements the default behavior of the methods defined by the base class.
Shape:Shape is the base class for all the shape elements such as, line, rectangle, ellipse, polygon.
Control:It is derived from Framework Element and is the base class for all the user-interactive elements.
Panel:As the name suggest it is the abstract base class for all the panels and is derived from Framework Element. Panel class has a Children property for all the UI-Element that is inside a panel and defines methods for arranging the child controls. Panel defines different classes to define the behavior of child controls such as, WrapPanel, StackPanel, Grid and Canvas.
Content Control:It is the base class for all the controls that have a single content such as, Buttons, Labels, CheckBox, RadioButton, etc.
Namespaces of WPF:
System.Windows:
Before going to the classes and namespaces , we must know about the assemblies that provide classes and interfaces.
Assemblies of WPF:
WPF have three base assemblies. Those are as follows.
1. WindowsBase.dll : Defines the base infrastructure of WPF , including dependency properties.
2.PresentationCore.dll : Defines numerous types that constitute the foundation of the WPF GUI(graphical user interface) layer.
3.PresentationFoundation.dll : Defines WPF control types,animations and multimedia ,data binding support .It also specifies some other functionality.
The above three are managed libraries.Besides these WPF uses an unmanaged libraryi.e. milcore.dll. This library is responsible to work with DirectX Layer.Means, this library acts as a bridge between WPF managed libraries and DirectX Layer.
Classes of WPF:
Have a look at the below figure for class's functionality.

All the above assemblies provides a number of new namespaces and hundreds of new .NET types(classes, interfaces, structures, enumerations and delegates) to work with WPF.
Dispatcher Object:It is an abstract base class for classes that are bound to one thread. Classes that are derived from Dispatcher Object have an associated Dispatcher object that can be used to switch the threads.
Application:In every WPF application, one instance of Application class is created. This class implements a singleton pattern for access to the window of application, resources and properties.
Dependency Object:It is the base class for all the classes that supports Dependency property.
Visual:This is the base class for all the visual elements of WPF. It also includes features of transformation.
UI Element:It is the abstract base class for all WPF elements that need basic presentation feature. This class provides events such as mouse over, drag and drop, click, etc.
Framework Element:It is derived from base class UIElements and implements the default behavior of the methods defined by the base class.
Shape:Shape is the base class for all the shape elements such as, line, rectangle, ellipse, polygon.
Control:It is derived from Framework Element and is the base class for all the user-interactive elements.
Panel:As the name suggest it is the abstract base class for all the panels and is derived from Framework Element. Panel class has a Children property for all the UI-Element that is inside a panel and defines methods for arranging the child controls. Panel defines different classes to define the behavior of child controls such as, WrapPanel, StackPanel, Grid and Canvas.
Content Control:It is the base class for all the controls that have a single content such as, Buttons, Labels, CheckBox, RadioButton, etc.
Namespaces of WPF:
System.Windows:
It is the core namespace of WPF. You will find all the base classes such as, Application, DependencyObject , DependencyProperty and FrameworkElement here.
System.Windows.Controls:
This namespaces contains all the controls of WPF. We can also find classes to work with complex controls such as Pop-up, ScrollBar, StatusBar, TabPanel, etc. as well as all the basic controls.
System.Windows.Data:
This namespace is used by WPF for Data Binding.
System.Windows.Input:
This namespace provides several classes for command handling, keyboard input, etc.
System.Windows.Markup:
This namespace helper classes for XAML markup code.
System.Windows.Media:
This namespace is responsible to work with images, audio, and multimedia.
System.Windows.Shapes:This namespace provides core classes for UI such as Line, Rectangle, Ellipse, etc.
System.Windows.Threading:
This namespace provides classes to work with multiple threads.
System.Windows.Navigation:
This namespace provides classes for navigation between WPF pages particularly when working with Web Applications.
No comments:
Post a Comment