dotnetspider.com


 


TutorialsForumResourcesReviewsJobsInterviewVideosCommunitiesProjectsTraining

Subscribe to Subscribers


Online MembersSunitha
Prasad kulkarni
Prabu Thangavelu
chaminda
sravan
cloud
Shesh Kumar Mishra
Gajanan
pavan
More...




Resources » Articles » .NET Framework


XAML in .net : A Step Ahead Series


Posted Date:     Category: .NET Framework    Rating: 4 out of 54 out of 54 out of 54 out of 5
Author: Member Level: Gold    Points: 19


XAML : stands for eXtensible Application Markup Language and pronounced as zammel.

XAML : combined with the next-gen Windows graphics kernel (code-named Avalon) is an all-in-one markup language for hypertext (HTML), vector graphics (SVG), animations (Flash,SMIL), print documents (PDF,XSL-FO), forms (XForms,XUL), and much more.

The best of both worlds: In the XAML world there's no longer a difference between a web application and a windows application. Windows is the browser kernel and Internet Explorer is just a shell.

The best of all worlds: A single programming model for media, documents and applications.

A typical XAML example:


<Window Text="Xul Challenge 2004">
<FlowPanel>
<SimpleText>Counter Sample</SimpleText>
<TextBox ID="ValueTextBox" HorizontalAlignment="Center" IsReadOnly="True"/>
<FlowPanel HorizontalAlignment="Center" Width="100%">
<Button Click="Dec">Dec (-)</Button>
<Button Click="Clear">Clear</Button>
<Button Click="Inc">Inc (+)</Button>
</FlowPanel>
</FlowPanel>
</Window>


C# vs. XAML

1. XAML-Example
<TextPanel
Background="BlanchedAlmond"
FontFamily="Comic sans MS"
FontSize="36pt"
HorizontalAlignment="Center">
Hello, world!
</TextPanel>

2. C#-Example

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

class HelloWorldApp : Application
{
static void Main()
{
HelloWorldApp app = new HelloWorldApp();
app.Run();
}

protected override void OnStartingUp( StartingUpCancelEventArgs args )
{
Window win = new Window();
TextPanel tp = new TextPanel();

tp.Background = Brushes.BlanchedAlmond;
tp.FontFamily = "Comic sans MS";
tp.FontSize = new FontSize( 36f, FontSizeType.Point);
tp.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
tp.TextRange.Text = "Hello, world";

win.Children.Add(tp);
win.Show();
}
}




For more details, please refer to:

1. http://msdn.microsoft.com/en-us/library/ms752059.aspx
2. http://xaml.sourceforge.net/talk/dotnet-dec-2004/slides.html
3. http://www.msdotnetheaven.com/?p=397
4. http://stuff4mdesktop.blogspot.com/2009/01/xaml-in-net-step-ahead-series.html


Did you like this resource? Share it with your friends and show your love!





Responses to "XAML in .net : A Step Ahead Series"

No responses found. Be the first to respond...

Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Software Architecture Interview Questions Part 1
    Previous Resource: Master Pages
    Return to Resources
    Post New Resource
    Category: .NET Framework


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    XAML in .net : A Step Ahead Series  .  

    My Profile

    Active Members
    TodayLast 7 Daysmore...


    Awards & Gifts


    Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds



    About Us    Trademark Disclaimer    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.