WPF

WPF Examples

WPF

WPF Projects

WPF Project

WCF Interview Questions And Answers

More interview questions and answers

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. 

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. 

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.


What are dependency properties?

These dependency properties belong to one class but can be used in another.

Consider the below code snippet:-

<Rectangle Height=\"72\" Width=\"131\" Canvas.Left=\"74\" Canvas.Top=\"77\" />

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. 

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.


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.

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. 

Which namespace is used to work with 3D in WPF.

System.Windows.Media.Medi3D namespace is used for working with 3D.

What is the use of System.Windows.Navigation namespace in WPF?

This namespace contains different classes for navigation between windows.

How to define a button USING XAML?

To define a button in WPF using XAML, Syntax is given below-

<Button Name=\"btnName\">btnCaption</Button>

Example:-

<Button Name=\"btnClick\">Click Me</Button>

Here the <Button> element specifies the use of the Button class.

What are the core WPF assemblies?

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, data binding suport and other WPF services.

Besides these three libraries WPF also uses an unmanaged binary called milcore.dll which acts as a bridge between WPF assemblies and DirectX runtime layer.

What is the use of System.Windows.Media namespace?

This is the root namespace of several other media related namespaces. It provides different types to work with animations like 3D rendering, text rendering and other multimedia services.

What is Path animation?

Path animation in which the object moves along the path specified by the Path geometry. As the animation progresses, it reads the X-axis, Y-axis and angle information from the path geometry and generates the output. These are useful when an object has to be animated along a complex path. 

What is a Freezable?

A freezable object is one that has a mechanism that allows you to \"Freeze\" it. This locks downs all the state and makes the object immutable. This makes the object more performant to use and safer to share between threads.

WCF Interview Questions And Answers