Skip Navigation LinksHome > Articles > WPF > Introduction to WPF

Introduction to WPF

It explains what is WPF and XMAL.

By Pankaj   On   Thursday, 10 July 2008

Page Views : 961   |   Technologies : WPF

Rating : Rated :
0

Introduction to WPF:

Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences. With WPF, you can create a wide range of both standalone and browser-hosted applications. 

The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware. WPF extends the core with a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and 3-D graphics, animation, styles, templates, documents, media, text, and typography. WPF is included in the Microsoft .NET Framework, so you can build applications that incorporate other elements of the .NET Framework class library.

WPF exists as a subset of .NET Framework types that are for the most part located in the System.Windows namespace. If you have previously built applications with .NET Framework using managed technologies like ASP.NET and Windows Forms, the fundamental WPF programming experience should be familiar; you instantiate classes, set properties, call methods, and handle events, all using your favorite .NET Framework programming language, such as C# or Visual Basic.

 

Markup and code behind:

WPF offers additional programming enhancements for Windows client application development. One obvious enhancement is the ability to develop an application using both markup and code-behind, an experience that ASP.NET developers should be familiar with. You generally use Extensible Application Markup Language (XAML) markup to implement the appearance of an application while using managed programming languages (code-behind) to implement its behavior. This separation of appearance and behavior has the following benefits:

 

  • Development and maintenance costs are reduced because appearance-specific markup is not tightly coupled with behavior-specific code.
  • Development is more efficient because designers can implement an application's appearance simultaneously with developers who are implementing the application's behavior.
  • Multiple design tools can be used to implement and share XAML markup, to target the requirements of the application development contributors; Microsoft Expression Blend provides an experience that suits designers, while Visual Studio 2005 targets developers.
  • Globalization and localization for WPF applications is greatly simplified.
  • A Common Technology for Windows and Web Browser User Interfaces.

 

 

XAML:

XAML is used extensively in .NET Framework 3.0 technologies, particularly in Windows Presentation Foundation (WPF) . In WPF, XAML is used as a user interface markup language to define UI elements, data binding, eventing, and other features. In WF, workflows can be defined using XAML.

XAML elements map directly to common language runtime object instances, while XAML attributes map to Common Language Runtime properties and events on those objects. XAML files can be created and edited with visual design tools such as Microsoft Expression Blend, Microsoft Visual Studio, and the hostable Windows Workflow Foundation visual designer. They can also be created and edited with a standard text editor, a code editor such as XAMLPad, or a graphical editor such as Vectropy.

e.g.

<StackPanel>

  <Button Content="Click Me"/>

</StackPanel>

In the above XAML code element StackPanel is a class and it contains Button class. Content property of Button class has been set to “Click Me”.

 


Keywords :
Tags :
Rate This Article :

Comments :
Write a Comment / Question / Feedback ...


User Login
Username :
Password :
Register Login

Forgot Password


Related Articles