70+ WPF Interview Questions and Answers 2020

70+ WPF Interview Questions and Answers 2020

Here are WPF interview questions and answers below:

  1. What is WPF?

WPF is the latest presentation API from Microsoft Windows. It is a 2D and 3D graphic engine. Its capabilities include:-

  • All the common user controls. For example, buttons, checkboxes, sliders, etc.
  • All the functionality of Flash and HTML
  • Supports flow and fix format documents
  • Data binding
  • Animation
  • Multimedia
  1. What are the types of documents supported by WPF?

There are two types of documents supported by the Windows Presentation Foundation (WPF) are the Flow format and fixed Format document. Flow format document alters the content to fit the screen size while fixed-format document presents content irrespective of the screen size.

  1. Name the namespace required for working with 3D.

The namespace required for working in 3D is System.Windows.Media.Medi3D.

  1. Is it right to say that WPF has replaced DirectX?

No, WPF can never replace DirectX. WPF cannot be used to create games with stunning graphics. WPF is meant to be a replacement for windows form, not DirectX.

  1. What are dependency properties?

Properties that belong to a specific class but can be used for another are called the dependency properties.

  1. How can the size of the Status Bar be increased proportionally?

By overruling the Items Panel attribute of Status Bar with a grid. The grid’s columns can be appropriately configured to get the desired result.

  1. What are Freezable objects in WPF?

An object, which has its state locked down, so that it becomes unchangeable, is known as a freezable object. Such objects perform better. It is also safer if they are required to be shared between threads.

  1. Why should WPF be preferred over Adobe Flash?

WPF is a more recent technology and thus has the latest development tools. It supports a broader range of programming languages and has robust control reuse.

  1. How is Silverlight different from the WPF browser application?

One of the major differences is that the .NET framework is required for running WPF browser applications on the client machine. But Silverlight runs using only the plug-in. Another point of difference is that applications made in WPF depend on the OS as .NET Framework only runs on Windows. On the other hand, the Silverlight plug-in can be installed on those OSs also, which are not Windows.

  1. Name the methods present in the Dependency Object.

It has three objects, namely:

  • ClearValue
  • SetValue
  • GetValue
  1. Write about PRISM.

PRISM is a framework for creating complex applications for WPF, Silverlight or Windows Phone. PRISM utilizes MVVM, IC, Command Patterns, DI and Separation of Concerns to get loose coupling.

  1. Is it possible to use Windows Forms in a WPF application?

Yes, Windows form can be used in WPF. Windows form can appear as a WPF pop. The controls of this Window form can be placed besides WPF controls in a WPF page by utilizing the functions of the WindowsFormsHost control that comes preinstalled.

  1. Describe Custom Control briefly.

Custom Control helps to widens the functions of existing controls. It consists of a default style in Themes/Generic.xaml and a code file. It is the best way to make a control library and can also be styled or template.

  1. Name the common assemblies used in WPF?
  • Presentation Foundation
  • Windows Base
  • Presentation Core
  1. Define Path animations in WPF

Path animation: this is a type of animation in which the animated object follows a path set by the Path geometry.

  1. Can WPF applications be made without XAML?

Yes WPF applications can be created without XAML as using XAML in WPF is a matter of choice.

  1. What are the types of windows in WPF?

WPF has three types of windows:

  • Normal Window
  • Navigate Window
  • Page Window
  1. How can elements in a List Box be sorted?

Sorting can be done by using the property of the Items Collection object. Items Collection contains an attribute, Sort Descriptions, which holds the System. Component Model. Sort Description instances. Each word describes how to develop things and shows if it is coming or moving.

  1. How is MVVM different from MVC?

MVC stands for Model-View Controller and MVVM stands for Model-View View Model.

In MVVM, the View Model is used instead of a controller. This View Model is present beneath the UI layer. It explains what they are asked and what information you need. It works as a trunk box from which the viewpoint receives services and information.

  1. Explain Routed events in WPF.

An event, which can invoke handlers on more than one listeners present in an element tree, instead of the single object which called the event, is known as a Routed event.

  1. How is System.Windows.Media.Visual dll utilized in WPF?

It is used whenever needed to create custom user design. It is a drawing object, which gives instructions for making an object. These instructions include opacity etc. of the drawing. The Visual class also bridges the functionalities of WPF managed classes and the MilCore.dll.

  1. What are the various layout panels in WPF?

They are:

  • Grid Panel
  • Canvas Panel
  • Wrap Panel
  • Dock Panel
  • Stack Panel
  1. Name the important subsystems in WPF.

There are 7 major subsystems:

  1. DependancyObject
  2. FrameworkElement
  3. Object
  4. DispatcherObject
  5. Media.Visuals
  6. Controls.Control
  7. UIElements
  8. What does BAML mean in WPF?

BAML is the abbreviation for Binary Application Markup Language. It is nothing but XAML that has been tokenized, parsed and changed into binary form. BAML is a compressed declarative language, which gets loaded and parsed quicker than XAML.

  1. What is the Difference between Page and Window Controls in WPF?

The basic difference is that Window Control presides over Windows Application while Page Control presides over the hosted Browser Applications. Also, Window control may contain Page Control, but the reverse cannot happen.

  1. What are Attached Properties in WPF?

Attached features are basically Dependency Properties that allows the attachment of a value to any random object.

  1. What is the INotifyPropertyChanged Interface?

The InotifyPropertyChanged notifies clients, generally those who are binding, if the value of a property gets changed. It has an event, called Property Changed, which gets raised every time a property of Model object is changed.

  1. What is the basic difference between Events and Commands in the MVVM Model?

Commands are more powerful and are advantageous to use instead of events. Actions are deeply connected with the event’s source and, therefore, the events cannot be reused easily. But the instructions make it possible to keep the correct settings in one place and then re-use them as we need.

  1. What is the method to force close a ToolTip, which is currently visible?

It can be closed by setting the tooltip’s open property to false.

  1. Write the differences between Dynamic Resource and Static Resource.

The most basic difference is that Static Resource evaluates the resource one time only, but Dynamic Resource evaluates it every time the resource is required. And due to this reason, Dynamic Resource is heavy on the system but it makes pages or windows load faster

  1. Explain MVVM pattern.

MVVM pattern divides the UI code into 3 basic parts:

  • View – It is the code that agrees with the visual representation of the data.
  • Model – It represents a set of classes, which contain data received from databases.
  • View Model – It is the layer that binds View and Model together. It presents this data in a manner, which is easy to understand. It also controls how View interacts with the application.
  1. Why is layout panels needed for in WPF?

Layout Panels are needed so that the controls fit screens of different sizes or having different font sizes. If we arrange controls on fixed pixel coordinates, then this model will fail when moved to a different environment. For this reason, Layout panels are necessary.

  1. Write about User Control in brief.

User Control wraps existing controls into a single reusable group. It contains a XAML file and a code. User Control cannot be styled or template.

  1. What is the way to determine if a Freezable object is frozen?

“Is Frozen” property of the object can be used to determine if the freezable object is frozen.

  1. What is the unit of measurement in WPF?

All measurements are made in device-independent pixels, or logical pixels. One pixel is 1/96th part of an inch. These logical pixels are always mentioned as double, this enables them to have a fractional value too.

  1. What is an adorner?

They are a special kind of Framework Element that provides visual clues to the user. They are also used to add handles to elements and give information about the state of a control. Adorners are bound to the UIElement and are rendered on a surface that lies above the element, which is adorned. This surface is called an Adorner Layer. Adorners are mostly placed relatively to the bounded element.

  1. Explain Serialization?

It is the process of converting the state of an object to stream of bytes.

  1. Is MDI supported in WPF?

MDI is not supported in WPF. User Control can be used to give the same functionality as MDI.

  1. What is XBAP?

XBAP is the abbreviated form of XAML Browser Application. This allows WPF applications to run inside web browsers. Installation of .NET framework on the client machine is a prerequisite for running WPF applications. But hosted applications are not given full admission to the client’s machine and are executed in a sandbox environment. Using WPF, These applications can be created, which runs directly into the browser. These applications are called XBAP.

  1. In what sense are WPF and Silverlight similar?

Silverlight and WPF are similar in the sense that they both use XAML and share the same code, syntax and libraries.

  1. How to make a ToolTip appear while hovering over a disabled element?

For this purpose, the Show On Disabled property can be used. It belongs to the Tool Tip Service class.

  1. How can List Box be made to scroll smoothly?

List Box is configured to scroll on an item-by-item basis by default. This depends on the height of any part of the movement, so, not a bad feeling. The best way to adjust control measures is to change the content by some pixels regardless of the height. We did this by installing a Home Monitor. Can Content Scroll property to “false”. This will, however, make the List Box lose the virtualization property.

  1. Where does the execution start in a WPF application?

WPF applications created in Visual Studio run without a Main method. This is because the applications are special-cased when they are compiled from XAML. That means, Visual Studio attaches a Build Action of Application Definition to the XAML file. This results in the auto generation of a Main method.

  1. Can Windows Service be created Using WPF?

No, Windows Services cannot be created using WPF. WPF is a presentation language. Windows services need specific permissions to execute some GUI related functions. Therefore, if it does not get the required permissions, it gives errors.

  1. What are the different kinds of Routed events in WPF?

There are three types of Routed events in WPF. They are:

  1. Tunneling – This event is first raised by the element in which it was originated and then it gets raised by each consecutive container in the visual tree.
  2. Direct – This event can only be raised by the element in which it was originated.
  3. Bubbling – This event is first raised by the uppermost container in the visual tree and then gets raised by each consecutive container lying below the uppermost one, till it reaches the element it where it was originated.
  4. Why is it better to wrap items in ComboBoxItem?

It has some important properties like Is Selected and Is Highlighted and also some necessary events like Selected and Unselected. ComboBoxItem is a content control and is thus very useful for adding simple strings to a ComboBox.

  1. How to get Automation IDs of items in a Items Control?

The best way to do this is by setting it Name property as it is utilized for automation purposes by default. But if you require giving an ID to an element, other than its name, then the Automation Properties. Automation ID property can be set as per need.

  1. How can command-line arguments be retrieved in a WPF application?

The most preferred method for this is to call System. Environment.GetCommandLineArgs at any random point in the application.

  1. State the name of the classes, which contain arbitrary content.

Content Control

  • Headed Content Control
  • Headed Items Control
  • Items Control
  1. Which Name Space has ‘Popup’ and ‘Thumb’ controls?

The namespace system.windows.controls.primitives has ‘Popup’ and ‘Thumb’ controls.

  1. Explain what is XAML?  What is the difference between XML and XAML?

XAML stands for extensible Application Markup Language. It is the language used to instantiate.NET objects.  This is a language developed by Microsoft incorporation to write user interface for next generation applications.

XML was designed to store data or to work with the stored data, whereas XAML is the extended version of XML used for.NET programming.

  1. Mention the advantage of using XAML?

The advantage of using XAML is

  • Separation of designer code and logic
  • XAML code is clear to read, and they are short
  • It clearly separates the roles of designer and developer
  • Tools like expression blend used for graphical design require XAML as source
  1. How can you code to display “Hello World” in XAML?

Displaying “Hello World.”

<page xmlns= ‘’ ‘’>
Hello, World!
  1. In XAML how graphic components are specified?

In XAML, the graphic components are specified with by open or closed tags with attributes.

For example,

Tag with contents




Tag without contents

< Button/>

  1. What is Attribute Syntax in XAML?

In XAML, attribute syntax sets a value for a property or names the event handler for an event, by declaring an attribute on an element.  The attribute value should be enclosed within two quotation marks (“).


< Button Background = “Black” Foreground “Red” Content = “This is an operating button”/>


  1. Explain Content Properties XAML?

XAML represents a language feature whereby a class can allot exactly one of its properties as XAML property

  1. Explain what is Markup extension in XAML?

A markup extension is the placeholder in XAML that are used to resolve property at runtime. A markup extension allows user to extend XAML and using attribute syntax users can also set any property that can be set in XAML. The purpose of the mark up extension is to process a string and return an object. Some of the standard markup extensions are x: Array, xNull, Dynamic Resource and Static Resource.

  1. What are the four general kinds of XAML elements?

The four general kind of XAML elements are

  • Control Elements
  • Panel Elements
  • Geometric Elements
  • Root Elements
  1. What X: prefix indicates in XAML?

The X: prefix is used to map the XAML namespace in templates.

  1. What are the various X: prefix used in XAML language?
  • x: Class It specifies the CLR ( Common Language Runtime) namespace and class name for the class that provides code
  • X: Key sets a unique key for each resource in a Resource Dictionary
  • x: Name à It specifies a run-time object name for the instance that exist in run time code after an object element is processed
  • x: Type à It constructs a Type reference based on the type name.
  • x: Static à It enables a reference that returns a static value which otherwise an XAML compatible property.
  1. How can you set a property attribute as a literal string and not a markup extension?

To avoid markup extension you have to use an empty pair of curly braces like


Content = “{} {This is not a markup extension}”/>

  1. What are the types of children does object element can have in XAML?

Three types of children an object element can have

  • Collection Items
  • The value that can be type-converted to the object element
  • A value for the content property.
  1. Explain what is Type Converter?

The type converter is helpful to convert a string into the appropriate value type where there is no markup extension usage.  Type Converter defines four members for converting to and from string for xaml purposes.

  • CanConvertFrom
  • ConvertFrom
  • ConvertTo
  • CanConvertTo
  1. Explain Object Element Syntax in XAML?

To instantiate a CLR class or structure by declaring an XML element, an XAML markup syntax is used.  This syntax is referred as Object Element Syntax.

  1. What are the ways you can declare objects in XAML?
  • Directly, using object element syntax: This syntax is used to declare root objects or nested objects that set property values
  • To declare objects in XAML, there are three ways
  • Indirectly by using attribute syntax: This syntax uses an inline string value which has an instruction on how to create an object. To set the value of the property to a newly created reference, the XAML parser uses this string
  • Using a markup extension.
  1. What should a root element of an XAML document contain?

In XAML documents, the root element consists of only certain elements, and these elements are Window, a Canvas or panels.

  1. What is data binding with XAML?

The Data binding provides a simple way to display and interact with data. An example will show how you can do data binding in XAML. Binding in XAML is done by using {binding….} syntax.

  1. Explain how you can display different data at run time and design time?
  • One way of displaying data at run time and design time is to declare your data in XAML.
  • Another way of doing it is by declaring it in XAML by using various data attributes from the designer XML namespace. With a d: prefix, this namespace is typically declared.

xmlns: d= http://schemas.microsoft.com/expression/blend/2008

  1. Explain what the function is x: Key directive in XAML?

X: Key uniquely identifies elements that are created and referenced in an XAML defined dictionary. By adding an x: Key value to an XAML object element a resource in the resource dictionary can be identified and is the most common way to identify.

  1. Explain what is the use of property element syntax?

With the help of property element syntax, user can add children element with a name in the form of parent.propertyName.

  1. How custom classes used in XAML can be defined?

Custom classes are used in two ways

  • In a separate assembly as a class, such as an executable or DLL used as a class library.
  • With the code that produces the Primary Windows Presentation Foundation (WPF) application or within the code behind.
  1. What is Xaml Namespace?

Namespace is said to be an environment or an abstract container used to hold a logical grouping of unique identifiers or a symbol.

This Post Has 131 Comments

  1. Relationship to function in the normal and transplanted kidney safe cialis online Nonsteroidal antiinflammatory drugs Pain in OA patients is often not adequately controlled with pure analgesics, whereas NSAIDs in adequate dosage can provide significant clinical improvement

  2. Reading your article has greatly helped me, and I agree with you. But I still have some questions. Can you help me? I will pay attention to your answer. thank you.

  3. My coder is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using Movable-type
    on numerous websites for about a year and am worried about switching to another platform.
    I have heard great things about blogengine.net.
    Is there a way I can import all my wordpress posts into it?
    Any help would be greatly appreciated!

  4. See More Amazin News Website Daily Worldwide [url=https://sepornews.xyz]Daily Worldwide News[/url]

  5. Merhabalar sizelere bugün hayata geçirdiğim kendi tasarımım olan ücretsiz
    bir reklam değişim platformu yani nativereklam.com.tr
    den bahsedeceğim. Kısaca anlatmak gerekirse sitenize yerleştireceğiniz 2 adet kod sayesinde sitenizde göz
    zevkini bozmayan reklamlar çıkacak. Bu sayede kazaanacağınız puanlar
    sitenizin reklamını yapmanıza olacak sağlayacak.
    Ayrıca siteniz uygunsa ilerleyen zamanlarda ücretli
    verilen reklamlar sayesinde parada kazanabilirisiniz.
    Site hakkında gerekli bilgileri gerek görsel gereksede yazılı bir şekilde ayrıntılarına kadar
    alacaksınız. Şimdiden desreklarinizi bekliyor.
    Hem sizin hemde benim için faydalı bir proje olması dileği ile iyi çalışmalar.
    Siteye hızlı giriş için Buraya Tıklayın. Canlı desteğe başvurmaktan çekinmeyin.


  6. Selam arkadaşlar film sitemizi ziyaret ederek ve eğer izliyor iseniz sitemizde film
    izleyerek de bizi desteklemenizi rica ederiz. Teşekkürler

    Site: https://prestijfilm.com

  7. Thanks a lot! A lot of forum posts.
    [url=https://quality-essays.com/]can i pay someone to do my essay[/url] pay for writing papers [url=https://buyanessayscheaponline.com/]can i pay someone to do my essay[/url] pay for papers written

  8. I was very pleased to uncover this great site. I need to to thank you for ones time for this fantastic read!! I definitely appreciated every bit of it and I have you bookmarked to look at new information on your blog.

  9. New from HUDA BEAUTY, its Empowered Eyeshadow Palette is the sole definition of glam without paying more than $70 for a luxe eyeshadow set. I have been loving this palette throughout the autumn months, especially because there are so many looks you can create with it. Model No. :  Check the packaging for the icon that indicates how long a product is good for after opening. It’s usually 24 months for eyeshadow. Kerrin’s favorite eyeshadow palette for older women is the Viseart Eyeshadow Palette 01 Neutral Matte. Our eyeshadow is famous for a reason. Transform eyes with our eyeshadow lineup, including our #1 Best-Selling Naked Palettes and 24/7 Moondust vegan glitter eyeshadow singles. Sorry, this product is unavailable. Please choose a different combination.
    Keep pores and shine in check with this duo for only $18 ($23 value) Tu carrito está vacío This very affordable drugstore primer does a fantastic job of evening out the skin tone ever so slightly. It’s not full-coverage or anything, but it gives skin the “right” look for when you’re about to put on your next layer of makeup. As this product’s name promises, it offers a truly great amount of hydration, which is important in allowing skin to attain the softness that would make for a fantastic canvas upon which your makeup is placed. Also, unlike other hydrating primers we’ve come across, this one is just a little bit tacky, which tends to work in its favor because it allows a greater hold for makeup to last much longer than it perhaps normally would.

  10. Can you buy alpilean tablets in south africa
    Just wish to say your article is as astonishing.
    The clarity for your publish is just excellent and that i can suppose you’re
    a professional in this subject. Fine along with your
    permission let me to clutch your RSS feed to stay updated with imminent post.
    Thanks a million and please continue the enjoyable work.

  11. I never used to spend much time on myself. A friend gave me the Nudie Glow beauty roller + Gua Sha set and since … I keep spoiling myself with lovely massages – I get what the fuss is all about now. I work from home, so I just do it at my computer. It is the most relaxing ritual of all. Instant calm. I love it. Directions Looking to elevate your self-care routine? These facial massage tools are the perfect addition to help increase circulation, release muscle tension, smooth fine lines and wrinkles, decrease inflammation, and help deeper absorption of products into the skin. An elevated Gua Sha ritual for your face and body. This Gua Sha Discovery set is perfect for gifting a friend or yourself, whether you are a novice or expert. Each product is powerful on its own, but together they work synergistically to create a perfect canvas for the skin-changing benefits of facial gua sha. Whole-plant botanicals in the Empress Sweetfern Hydrasoothe Face Mist and Empress Balm of Gilead Barrier Repair Oil deliver hydrating, smoothing, and brightening effects while the Empress Stone sculpts facial contours by relaxing expression patterns, moving lymph, and encouraging myofascial release.
    50% Hyaluronic Acid Complex – Helps improve hydration and can attract and retain up to 1,000 times its weight in water from moisture in the air.Pentavitin – A potent hydrator that helps lock in hydration for up to 72 hours—even after cleansing.3% AcquaCell – Helps smooth the look of fine lines, wrinkles and crow’s feet. To really target the look of lines, 3% AcquaCell and a 2.6% Malachite Complex create a smoother, youthful-looking illusion. Invigorating your skin and lessening puffiness, Caffeine brings back the eye area’s vitality while Haloxyl™ hones in on darkness for a brighter, more radiant finish. Skin will feel soft and supple for long-lasting comfort. Peter Thomas Roth Peter Thomas Roth Water Drench Hyaluronic Cloud Hydrating Eye Gel is suitable for all skin types.

  12. One of the older games on this list, Eve Online has reached legendary status in the online gaming world. Set over 21,000 years in the future, the universe of EO is one where humanity has long forgotten its roots. If you are on the hunt for an entirely solo experience, MMORPGs simply may not be your cup of tea. But if you are concerned you will get stuck in a new MMORPG world without friends to guide you, then you’re in luck. Many MMORPGs are teeming with content that can be done on your own, and you’re likely to make a few in-game friends along the way! Lost Ark is quite a bit different from the rest of the MMOs on this list. Rather than being a traditional straightforward MMORPG, the gameplay of Lost Ark is more of a top-down ARPG experience similar to games such as Blizzard’s Diablo series. Developed by Tripod Studio and Smilegate RPG, Lost Ark made quite the impression initially upon launch, launching with upwards of 5 million players and growing to over 10 million. The South Korean MMORPG quickly became one of the most played MMOs ever.
    If you have a question for us that isn’t answered by reviewing the support section of the website, please contact us using the form below. The game does not allow ties for first place. In the case of a tie for first, the game will continue until there is a clear winner. This is true of both games ending at a point value and timed games. Long downloads and annoying updates are over. Without downloading or installing the game, you can play your favorite Spades Plus – Card Game in the cloud on your PC or mobile device. Instantly transform your old phone, PC, or any other device into a powerful gaming machine. How to get startedSpades is multiplayer! You can play with a total of 2-4 players. To get started, enter a name for yourself (ex: “player-1”) and a room name. The room name can be anything you like (ex: “Joan’s room” 1). If you’re playing with others, they can join your game by using the same room name.

  13. Бесплатная Доставка на заказы от 1000 грн Какие функции призван выполнять гель для бровей? Интернет-магазин VsalonShop – это всегда большой ассортимент товаров для вашей красоты. Известные производители, качественный товар, удобный формат продукта позволит выбрать моделирующее средство для бровей, идеально подходящее вашим запросам. г.Ангарск, 188 квартал, дом 16 Полностью натуральная основа на полисахаридах водорослей, которые обеспечивают увлажнение и питание. Не многим везет родиться с густыми и послушными бровями идеальной формы. Мало того, что приходится их периодически подкрашивать и проводить коррекцию, так еще и волоски постоянно стремятся “растрепаться” и лежат совсем не так, как хочется. Именно для того, чтобы эту проблему решить, и созданы гели-фиксаторы (или туши для бровей). Этот гель для бровей оттеночный. По своим свойствам он близок к помадке, мягкий, пластичный, с кремовой консистенцией. Отлично пигментирован, им можно не только уложить, но и «нарисовать» брови, заполнить пробелы.
    Если говорить про лучшие удлиняющие туши, то BME I’mEnough может составить конкуренцию большинству более разрекламированных продуктов. Она решает сразу несколько задач. Одновременно удлиняет ресницы, создает их мягкий изгиб, делая глаза похожими на кукольные. При этом, не создает искусственной маски, потому что часто расположенные щетинки убирают излишек туши с ресниц. Чтобы выбрать подходящую тушь для ресниц, сначала определитесь, какими вы хотите их видеть: длинными, густыми или с красивым изгибом. А может все и сразу? Профессиональные визажисты дают рекомендации по созданию ресниц своей мечты. Королева бюджетных тушей, Cabaret стала бестселлером от Vivienne Sabo. В отличие от предшественницы, версия Premiere имеет 5 оттенков (черный, коричневый, бирюзовый, фиолетовый, синий). Продукт дает заметное удлинение и объем, при этом тушь можно качественно наслаивать – тогда реально добиться заявленного производителем сценического объема. Кисточка небольшая, пластиковая, с короткой плотной щетинкой.

Leave a Reply

Close Menu