alert('Oh shit !!!! Javascript is disabled!!!! ');


Blog Archive

WPF Interview Question


WPF Interview Question and Answers


1. Ques: 1 What is WPF?
Windows Presentation Foundation (WPF) is the presentation subsystem feature of the .NET Framework 3.0,that provide good design and advance controls. Silverlight is the Subset of WPF. Through WPF we can create Windows and WebBrowser Application.
2. Ques: 2 What is XBAP?
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 a partial trust sandbox environment.
3. Ques: 3 What is XAML extensible markup language?
XAML is an extensible markup language based on XML. XAML can be thought of as a declarative script for creating .NET 3.0 UI. It is particularly used in WPF as a user interface markup language to define UI elements, 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.
4. Ques: 5 What are dependency properties?
These dependency properties belong to one class but can be used in another.
Consider the below code snippet:-

Height and Width are regular properties of the Rectangle. But Canvas. Top and Canvas. Left is dependency property as it belongs the canvas class. It is used by the Rectangle to specify its position within Canvas.
5. Ques: 6 What kind of documents are supported in WPF?
There are two kind of major document supported in WPF Fixed format documents and Flow format document. Fixed format documents look like PDF format.
They display content regardless of screen size and resolution. But flow format document adjust depending on screen size and resolution.
6. Ques: 7 Can you explain how we can separate code and XAML?
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 actually write the code logic independent of how the presentation is.
7. Ques: 8 What is a Routed event?
In WPF application it contains many elements. These elements exist in an element tree relationship with each other. A routed event is a type of event that can invoke handlers on multiple listeners in an element tree, rather than just on the object that raised the event.
8. Ques: 10 How to define a button USING XAML?
To define a button in WPF using XAML, Syntax is given below-



Example:-



Here the