Monday, May 26, 2014

WPF Interview Questions & Answers



Question: 1What is WPF? 
Ans:
 Windows Presentation Foundation (WPF) is the presentation subsystem feature of the .NET Framework3.0,that provide good design and advance controls. Silverlight is the Subset of WPF. Through WPF wecan create Windows and WebBrowser Application.


Question: 2What is XAML extensible markup language?
Ans:
 XAML is an extensible markup language based on XML. XAML can be thought of as a declarative scriptfor creating .NET 3.0 UI. It is particularly used in WPF as a user interface markup language to define UIelements, data binding, eventing and other features. It is also used in Windows Workflow Foundation(WF), in which the workflows themselves can be defined in XAML code.

Question:3What is a Routed event?
 Ans:
 In WPF application it contains many elements. These elements exist in an element tree relationship witheach other. A routed event is a type of event that can invoke handlers on multiple listeners in anelement tree, rather than just on the object that raised the event.

Question: 4Can you explain how we can separate code and XAML?
 Ans:
 This is one of the most important features of WPF, separating the XAML from the code to be handled.So designers can independently work on the presentation of the application and developers can actuallywrite the code logic independent of how the presentation is.

Question: 5What are the core WPF assemblies?
Ans:
 The core WPF assemblies are,WindowsBase.dll:- This is the core types constituting the infrastructure of WPF API.PresentationCore.dll:- It defines numerous types constituting foundation of WPF GUI layer.PresentationFoundation.dll:- It defines WPF control types, animation & multimedia support, databinding suport and other WPF services.Besides these three libraries WPF also uses an unmanaged binary called milcore.dll which acts as abridge between WPF assemblies and DirectX runtime layer.

Question: 6What is XBAP?
Ans:
 XBAP means XAML Browser Application. XBAP allows for WPF applications to be used inside a browser.For this .NET framework is required to be installed on the client system and hosted applications run in apartial trust sandbox environment.

Question: 7What is a Freezable?
 Ans:
 A freezable object is one that has a mechanism that allows you to "Freeze" it. This locks downs all thestate and makes the object immutable. This makes the object more performant to use and safer toshare between threads.

Question:8What is Path animation?
 Ans:
 Path animation in which the object moves along the path specified by the Path geometry. As theanimation progresses, it reads the X-axis, Y-axis and angle information from the path geometry andgenerates the output. These are useful when an object has to be animated along a complex path.


Question: 9What is the use of System.Windows.Media namespace?
 Ans:
 This is the root namespace of several other media related namespaces. It provides different types towork with animations like 3D rendering, text rendering and other multimedia services.

Question: 10How to define a button USING XAML?
Ans:
 To define a button in WPF using XAML, Syntax is given below-Example:-Here the

Question: 11What is the use of System.Windows.Navigation namespace in WPF?
 Ans:
 This namespace contains different classes for navigation between windows.

Question: 12Which namespace is used to work with 3D in WPF.
 Ans:
 System.Windows.Media.Medi3D namespace is used for working with 3D.
 

No comments:

Post a Comment