InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Architecture of WPF |
|
Answer» Below figure shows the full ARCHITECTURE of WPF which has three major SECTIONS:- |
|
| 2. |
How can we set ControlTemplate in WPF |
|
Answer» Below is the simplest CODE to set controltemplate in wpf without too much effort- |
|
| 3. |
Wha is BAML in WPF |
|
Answer» BAML(Binary APPLICATION Markup Language) is SIMPLY XAML which has been parsed, tokenized, and converted into binary form. Although any chunk of XAML can be represented by procedural code, the XAML-to-BAML compilation process does not generate procedural source code. So we can say that BAML is not like Microsoft intermediate language and it is a compressed declarative format that is faster to load and parse (and smaller in size) than plain XAML. BAML is just an implementation DETAIL of the XAML compilation process without any direct public EXPOSURE, so it could be replaced with something DIFFERENT in the future. Nevertheless, it s interesting to be awaare of its existence. |
|
| 4. |
Name different pre-defined document formats in WPF |
|
Answer» Name DIFFERENT pre-defined document FORMATS in WPF |
|
| 5. |
What do you think WPF replace DirectX |
|
Answer» No we cannot say that WPF replace DirectX. DirectX will still be still NEEDED to make cutting edge GAMES. The video performance of directX is still many TIMES higher than WPF API. So when it comes to game development the preference will be always DirectX and not WPF. WPF is not a optimum solution to make games, oh yes you can make a TIC TAC TOE game but not high ACTION animation games. |
|
| 6. |
WPF new features |
|
Answer» As all of US know WPF is a next generation UI framework to build RICH user application. And it is part of .NET framework 3.0 and higher version.WPF combines application UIs, 2D graphics, 3D graphics, documents and MULTIMEDIA into one single framework. Its vector based rendering engine uses hardware acceleration of modern GRAPHIC cards. This makes the UI faster, scalable and resolution independent.Below figure will help you to understand wpf features- |
|
| 7. |
Operating systems support by WPF |
|
Answer» Below are the operating SYSTEMS that support WPF:- |
|
| 8. |
working with hardware acceleration in wpf |
|
Answer» As all of us hardware ACCELERATION is the process where we use hardware to perform some functions rather than performing those functions USING the software which is running in the CPU. WPF exploits hardware acceleration in a two tier MANNER. Below figure will CLEAR all the doubt:- |
|
| 9. |
Can we set Textbox multiple lines for TextBox |
|
Answer» Setting AcceptsReturn to true allows users to press the Enter key to create a NEW line of text. NOTE that TextBox always SUPPORTS multiple lines of text programmatically. If its Text is set to a string containing NewLine CHARACTERS, it DISPLAYS the multiple lines regardless of the value of AcceptsReturn. Also, the multiline support is completely independent from text wrapping. Text wrapping only applies to individual lines of text that are wider than the TextBox. |
|
| 10. |
Different WPF controls by there Function |
|
Answer» (1)Buttons:-Button and RepeatButton. |
|
| 11. |
Does XAML file compiled or Parsed |
|
Answer» By DEFAULT XAML files are COMPILED and we also have options to LET it be PARSED. |
|
| 12. |
Types of windows in WPF |
|
Answer» Below are the THREE TYPES of windows in WPF- |
|
| 13. |
Code to Find Child of Control in WPF |
|
Answer» Code to Find Child of Control in WPF |
|
| 14. |
Can we say WPF is alternate of DirectX? |
|
Answer» Can we SAY WPF is alternate of DirectX? |
|
| 15. |
What is a Routed event in WPF |
|
Answer» When we talk about a TYPICAL WPF APPLICATION which 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. |
|
| 16. |
What is BAML |
|
Answer» BAML stands for Binary APPLICATION Markup Language, is simply XAML that has been PARSED, tokenized, and converted into binary form. Although any chunk of XAML can be represented by procedural code, the XAML-to-BAML compilation process does not GENERATE procedural source code. So, BAML is not like Microsoft intermediate language (MSIL); it is a compressed declarative format that is faster to LOAD and parse (and smaller in size) than plain XAML. BAML is just an implementation DETAIL of the XAML compilation process without any direct public exposure, so it could be replaced with something different in the future. Nevertheless, it s interesting to be aware of its existence. |
|
| 17. |
Use of relay command in WPF? |
|
Answer» USE of relay COMMAND in WPF? In WPF relay command is mainly used to bind and INTEGRATE commands directly to the PROPERTIES of ViewModel. |
|
| 18. |
What are Freezable objects in WPF and states? |
|
Answer» What are FREEZABLE objects in WPF and states? |
|
| 19. |
Name the different triggers in WPF? |
|
Answer» Name the different triggers in WPF? |
|
| 20. |
Can we create WPF application without XAML and what is the use of XAML |
|
Answer» Can we create WPF application WITHOUT XAML and what is the use of XAML |
|
| 21. |
How to access XAML objects in behind code |
|
Answer» To get access to XAML objects in behind code we NEED to DEFINE with same name as GIVEN in XAML document. For instance in the below code snippet we named the OBJECT as objtext and the object is defined with the same name in the behind code. |
|
| 22. |
How can I sort items in a ListBox in WPF |
|
Answer» SORTING can be done VIA a mechanism on the ItemsCollection object, so it applies equally to all ItemsControls. ItemsCollection has a SortDescriptions property that can hold any number of System.ComponentModel.SortDescription instances. Each SortDescription describes which property of the items should be used for sorting and whether the sort is ascending or DESCENDING. For example, the following code SORTS a bunch of ContentControl items BASED on their Content property: // Clear any existing sorting first myItemsControl.Items.SortDescriptions.Clear(); // Sort by the Content property myItemsControl.Items.SortDescriptions.Add( new SortDescription( Content , ListSortDirection.Ascending)); |
|
| 23. |
Features and why to use WPF |
|
Answer» Below are the some features of WPF:- |
|
| 24. |
What is PRISM its advantage and components |
|
Answer» Prism is a Framework for DEVELOPING Composite or Complex applications specific to WPF or Silverlight or Windows Phone.It uses modularity; It allows to break application into pieces can be called as Modules.It uses design patterns like MVVM, Command Patterns, Dependency Injection (DI), and Inversion of Control (IC), Separation of Concerns to achieve loosely coupling. |
|
| 25. |
What are the dependency properties |
|
Answer» These dependency properties belong to one class but can be used in another . And the CODE is as below :- |
|
| 26. |
Methods in DependencyObject in WPF |
|
Answer» Below are the 3 methods in DEPENDENCYOBJECT in WPF:- |
|
| 27. |
Types of controls in WPF |
|
Answer» Below are the 3 controls in WPF:- |
|
| 28. |
How to apply tooltip over a disabled element |
|
Answer» We have to use the ShowOnDisabled attached PROPERTY of the ToolTipService CLASS From |
|
| 29. |
Routed events in WPF |
|
Answer» When we talk about Routed event in WPF .We take an example of typical WPF APPLICATION, which 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. |
|
| 30. |
Use of System.Windows.Media.Visual dll |
|
Answer» Visual class is a drawing object which abstracts drawing instructions, how drawing should be drawn like CLIPPING, opacity and other functionalities. Visual class also acts like a bridge between UNMANAGED MilCore.dll and WPF MANAGED classes. When any class derived from visual it can be displayed on windows. If you want to CREATE your own customized user interface then you can program USING visual objects. |
|
| 31. |
can we unable spell checking in WPF TextBox |
|
Answer» Yes we can UNABLE spell check in textbox by just |
|
| 32. |
Name the different layout panel of WPF |
|
Answer» These are the five most LAYOUT panels of WPF:- |
|
| 33. |
Namespace needed to host wpf control on window application |
|
Answer» Below are the FIVE namespaces NEEDED to host WPF control in WINDOW application |
|
| 34. |
What are the major subsystem of WPF |
|
Answer» Below are the MAJOR subsytem of WPF |
|
| 35. |
difference between custom and user control in WPF |
|
Answer» Below is the difference between custom and user control in wpf both are USED in wpf and asp.net both way |
|