Monday, September 10, 2012

WPF Interview Questions Answers


Q1. What is WPF?
WPF stands for Windows Presentation Foundation. It is an application programming Interface for developing rich UI on Windows. WPF is introduced in .NET 3.0. By the use of WPF we can create two and three dimensional graphics,animations etc.

Q2. What is XAML and how it is related to WPF?
XAML is a new mark up language which is used for defining UI elements and its relationships with other UI elements. The XAML is introduced by WPF in .NET 3.0 WPF uses XAML for UI design.

Q3. Does XAML file compiled or Parsed?

By default XAML files are compiled ,But we do have options to let it be parsed.

Q4. What is the root namespace used for Animations and 3D rendering in WPF?
System.Windows.Media namespace.

Q5. What are the names of main asseblies used by WPF?
a)WindowsBase
b)PresentationCore
c)PresentationFoundation

Q6. What operating systems support WPF?
Following are the operating systems that support WPF
a)Windows7
b)Windows Vista
c)Windows XP Service Pack 2 or later

Q7. Describe the types of documents supported by WPF?
There are two kinds of document supported by WPF
a)Flow format:Flow format document adjusts as per screen size and resolution
b)Fixed Format:Fixed Format document does not adjust as per screen size and resolution

Q8. What namespaces are needed to host a WPF control in Windows form application?
The following namespaces needs to be referenced :
a)PresentationCore.dll
b)PresentationFramework.dll
c)UIAutomationProvider.dll
d)UIAutomationTypes.dll
e)WindowsBase.dll


Q9. What is Dependency Property In WPF?
Windows Presentation Foundation (WPF) has a set of services that is used to extend the functionality of a common language runtime property. These services are referred as the WPF property system. A property that is backed by the WPF property system is known as a dependency property

Q10.What is routed event in WPF?
A WPF user interface is constructed in a layered approach, where one visual element can have zero or more child elements. so we can visualise the elements tree for the full page. Routed events are a new feature provided by WPF which allows events to travel down the elements tree to the target element, or bubble up the elements tree to the root element. When an event is raised, it "travels" up or down the elements tree invoking handlers for that event on any element subscribed to that event it encounters en route.This tree traversal does not cover the entire elements tree, only the ancestral element chain between the root element and the element which is the target of the event.

No comments:

Post a Comment