What is XAML in WPF and also explain the types of XAML?

Open 1 Answers 23 Views Education
What is XAML in WPF and also explain the types of XAML?

1 Answer

Extensible Application Markup Language and pronounced "zammel" is a markup language used to instantiate .NET objects. Although XAML is a technology that can be applied to many different problem domains, its primary role in life is to construct WPF user interfaces.
Important task XAML performs as as follows,
  • Wiring up an event handler: Attaching event handler in the most cases, for example Click on Button is easy to do in Visual Studio. However once we understand how events are wired up in XAML,we'll be able create more sophisticated connections.
  • Defining resources: Resources are the object which once we define in XAML can be re-used in the various places inside markup. Resources allow us to centralize and standardize formatting, and create nonvisual objects such as templates and animations.
  • Defining control template: WPF controls are designed to be lookless, which means we can substitute our custom visuals in place of the standard appearance. To do so, we must create our own control template, which is nothing more than a block of XAML markup.
Type of XAML
  • WPF XAML: Encompasses the elements that describe WPF content, such as vector graphics, controls, and documents.
  • XPS XAML: It is the part of WPF XAML that defines an XML representation for formatted electronic documents.
  • Silverlight XAML: A subset of WPF XAML that's intended for Silverlight applications. Silverlight is a cross-platform browser plug-in that allows us to create rich web content.
  • WF XAML: Encompasses the elements that describe Windows Workflow Foundation.
by (280k points)