Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Interviews Author
Wed, 30-Jul-2014 Authors
All Time Authors
Vishal@Neeraj
28480
Rajkatie
20600
Bharathi Cherukuri
18040

Latest members | More ...


(Statistics delayed by 5 minutes)

Which are the different namespaces and classes in WPF?

Posted on 9/19/2009 | Category: WPF Interview questions | Views: 3968





There are ten important namespaces / classes in WPF.

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.
 


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.
 


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.
 



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.

System.Windows.Shapes.Shape

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

System.Windows.Controls.Control

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

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.

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.
 

Asked In: Many Interviews Alert Moderator 

Found interesting? Add this to:




Latest Interview Questions

    Comments or Responses

    Login to post response