Blue Theme Orange Theme Green Theme Red Theme
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Home | Forums | Videos | Photos | Blogs | Beginners | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Nevron Gauge for SharePoint
Search :       Advanced Search »
Home » WPF » A guided tour to XAML

A guided tour to XAML

What is XAML? How to use XAML? How we can make UI with XAML? How XAML work with WPF?

Author Rank :
Page Views : 5726
Downloads : 0
Rating :
 Rate it
Level : Beginner
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
Nevron Gauge for SharePoint
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

XAML:

 

XAML Stands for Extensible application Markup Language.

 

To design user interfaces for windows, XAML provide the new way to do this. Here in designing user interfaces, XAML has so many exciting features.  Basically we use XAML with Window Presentation Foundation (WAP). In .NET Framework 3.0 there are four  new technologies, where XAML works with these technologies like as, in Windows Presentation Foundation (WPF) where it is used as a user interface markup language to define UI elements, data binding, eventing, and other features, and in Windows Workflow Foundation, in which workflows themselves can be defined using XAML.

 

Sometimes XAML files compiled into .baml binary files, which may be inserted as a resource into a .NET Framework assembly. When it run then, the framework engine extracts the, .baml file from assembly resources, parses it, and creates a corresponding WPF workflow. Being of parsed, here the possibility that a single UI definition can be used on different platforms.

 

When used in WPF, XAML is used to describe graphically rich visual user interfaces, such as those created by AdoveFlash. XUL and UIML are other examples of XML based user interface languages When used in Windows Workflow Foundation (WF) contexts, XAML is used to describe potentially long-running declarative logic, such as those created by process modeling tools and rules systems. RuleML and BPEL are other examples of XML-based declarative logic languages.

 

Anything that is created or implemented in XAML can be expressed using a more traditional .NET language, such as C# or Visual Basic.NET. However, a key aspect of the technology is to reduced complexity needed for tools to process XAML, because it is simply XML. As a result, a variety of products are emerging, particularly in the WPF space, which create XAML-based applications. As XAML is simply based on XML, developers and designers are able to share and edit content freely amongst themselves without requiring compilation. XAML syntax describes objects, properties and their relationships to one another.


Some features Of XAML at a glance:

  • Sometimes, XAML and WPF are used interchangeably. While XAML is a type of XML-based markup. WPF is a graphics API.
  • XAML supports things like 3D and controls, which SVG does not.
  • With the use of XAML we can do design and development separate, which improve efficiency and collaboration between designers and software developers. When designer design UI with the help of XAML, then the designer's exact layout can be saved without affecting the development process.
  • User can edit Presentation layer with requiring the development tools or programming knowledge.
  • XAML files are XML files that generally have the .xaml extension.

To run an XAML application we need:

  • Microsoft .NET Framework 3.0
  • Visual Studio 2005
  • Good machine with 1GB RAM. (At least it so for good and fast result)

Let see how work XAML with WPF (Window Presentation Foundation).Firstly open the visual studio 2005 and click on File-New-Project. From here a window will open as shown in figure. 

 

Figure 1:

 

After selecting this Windows Application (WPF) we can create a WPF application.

After this process we see a new window like as.

 

  

 

 

Figure 2:

 

Here we see some new tab like this here two option GUI design and XAML code we can put any one above and any one down by using arrow tab.

 

Figure 3:

 

Here two types of files generate, one is window1.xaml (which shows our presentation, mean look of our Form) second one is window1.xaml.cs (where we do coding).

 

This is Xaml markup to describe User interface. Named as window1.xaml.

 

 

Figure 4: 

 

By doing this the window will become like as.



Figure 5:

 

And .NET code file (Here I used C#):

 

 

Figure 6:

 

Summary:

 

This is the way how we use XAML to design our application. With the help of XAML we can design our application more interactive. We can do many more with XAML like as animation. In future, the use of XAML will make the application highly powerful and interactive.

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Rahul Kumar Saxena
Rahul shows great interests in working with Microsoft technologies. He specializes in the implementation of DataBase & Graphics. His area of expertise includes: C#, ASP.NET,ADO.NET,Windows Forms & Web Services. He hails from background , Master's in Computer Application. With programming he loves photography, traveling and reading books.
(Talabpur*)
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Comments
6 Months Free & No Setup Fees ASP.NET Hosting!
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.