WPF

  Home  Applications Programs  WPF


“WPF Interview Questions and Answers will guide us now that Windows Presentation Foundation (WPF) is a graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as Avalon, was initially released as part of .NET Framework 3.0. Designed to remove dependencies on the aging GDI subsystem, so learn more about WPF with the help of this WPF Interview Questions with Answers guide”



57 WPF Questions And Answers

41⟩ Tell me 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.

 210 views

42⟩ From where the execution start in 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 ApplicationDefinition to the XAML file. This results in the auto generation of a Main method.

 196 views

44⟩ Why ListBox made to scroll smoothly?

ListBox is configured to scroll on an item-by-item basis by default. This is dependent on the height of each element and the scrolling action, thus, giving a rough feeling. Better way is to configure scrolling action so that it shifts items by a few pixels irrespective of their height. This is done by setting the ScrollViewer.CanContentScroll property to "false". This will, however, make the ListBox lose the virtualization property.

 204 views

45⟩ Define XBAP?

XBAP is the abbreviated form of XAML Browser Application. It 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, such applications can also be created, which run directly in the browser. These applications are called XBAP.

 197 views

46⟩ Define adorner?

They are a special kind of FrameworkElement that provide 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 AdornerLayer. Adorners are mostly placed relatively to the bounded element.

 218 views

50⟩ Describe 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.

 210 views

51⟩ What is BAML 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.

 212 views

53⟩ Define INotifyPropertyChanged Interface?

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

 206 views

55⟩ What is UserControl?

UserControl wraps existing controls into a single reusable group. It contains a XAML file and a code. UserControl cannot be styled or templated.

 202 views

56⟩ Why layout panels are needed 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.

 199 views