Friday, January 28, 2011

WPF Interview Questions important namespaces / classes in WPF(.NET)

1.System.Threading.DispatcherObject

All WPF objects derive from the DispatcherObject. WPF works on STA model i.e. Single Threading Apartment Model. The main duty of this object is to handle concurrency and threading. When any message like mouse clicks, button clicks etc are initiated they are sent to the DispatcherObject who verifies whether code is running on the correct thread. In the coming section we will look in to detail how WPF threading works.

2.System.Windows.DependencyObject

When WPF was designed property based architecture was considered. In other words rather than using methods, functions and events object behavior will interact using properties. For now we will only restrict ourselves to this definition. In the coming section we have dedicated question for the same.

3.System.Windows.Media.Visual


Visual class is a drawing object which abstracts drawing instructions, how drawing should be drawn like clipping, opacity and other functionalities. Visual class also acts like a bridge between unmanaged MilCore.dll and WPF managed classes. When any class derived from visual it can be displayed on windows. If you want to create your own customized user interface then you can program using visual objects.

4.System.Windows.UIElement

UIElement handled three important aspects layout, input and events.

System.Windows.FrameworkElement

FrameWorkElement uses the foundation set by UIElement. It adds key properties like HorizontalAlignment , VerticalAlignment , margins etc.

5.System.Windows.Shapes.Shape


This class helps us to create basic shapes such as Rectangle, Polygon, Ellipse, Line, and Path.

6.System.Windows.Controls.Control

This class has controls like TextBox,Button,ListBox etc. It adds some extra properties like font,foreground and background colors.

7.System.Windows.Controls.ContentControl

It holds a single piece of content. This can start from a simple label and go down to a unit level of string in a layout panel using shapes.

System.Windows.Controls.ItemsControl

This is the base class for all controls that show a collection of items, such as the ListBox and TreeView.

8.System.Windows.Controls.Panel


This class is used for all layout containers—elements that can contain one or more children and arrange them as per specific layout rules. These containers are the foundation of the WPF layout system, and using them is the key to arranging your content in the most attractive, flexible way possible.

No comments:

Post a Comment

Thermal conductivity calculations, experiments, molecular simulations

Nowadays various experimental procedures are there to calculate the thermal conductivity of various materials using various techniques. Th...

About Me

COTACT: studymaterialforall@gmail.com