Home  separator  Fundamentals  separator  XAML
Bookmark and Share Share...    Subscribe to this feed Feed   About Christian Moser  


Introduction to XAML

XAML stands for Extensible Application Markup Language. Its a simple language based on XML to create and initialize .NET objects with hierarchical relations. Altough it was originally invented for WPF it can by used to create any kind of object trees.

Today XAML is used to create user interfaces in WPF, Silverlight, declare workflows in WF and for electronic paper in the XPS standard.

All classes in WPF have parameterless constructors and make excessive usage of properties. That is done to make it perfectly fit for XML languages like XAML.

Advantages of XAML

All you can do in XAML can also be done in code. XAML ist just another way to create and initialize objects. You can use WPF without using XAML. It's up to you if you want to declare it in XAML or write it in code. Declare your UI in XAML has some advantages:

  • XAML code is short and clear to read
  • Separation of designer code and logic
  • Graphical design tools like Expression Blend require XAML as source.
  • The separation of XAML and UI logic allows it to clearly separate the roles of designer and developer.

XAML vs. Code

As an example we build a simple StackPanel with a textblock and a button in XAML and compare it to the same code in C#.

 
<StackPanel>
    <TextBlock Margin="20">Welcome to the World of XAML</TextBlock>
    <Button Margin="10" HorizontalAlignment="Right">OK</Button>
</StackPanel>
 
 

The same expressed in C# will look like this:

 
// Create the StackPanel
StackPanel stackPanel = new StackPanel();
this.Content = stackPanel;
 
// Create the TextBlock
TextBlock textBlock = new TextBlock();
textBlock.Margin = new Thickness(10);
textBlock.Text = "Welcome to the World of XAML";
stackPanel.Children.Add(textBlock);
 
// Create the Button
Button button = new Button();
button.Margin= new Thickness(20);
button.Content = "OK";
stackPanel.Children.Add(button);
 
 

As you can see is the XAML version much shorter and clearer to read. And that's the power of XAMLs expressiveness.

Properties as Elements

Properties are normally written inline as known from XML <Button Content="OK" />. But what if we want to put a more complex object as content like an image that has properties itself or maybe a whole grid panel? To do that we can use the property element syntax. This allows us to extract the property as an own child element.

 
<Button>
  <Button.Content>
     <Image Source="Images/OK.png" Width="50" Height="50" />
  </Button.Content>
</Button>
 
 

Implicit Type conversion

A very powerful construct of WPF are implicit type converters. They do their work silently in the background. When you declare a BorderBrush, the word "Blue" is only a string. The implicit BrushConverter makes a System.Windows.Media.Brushes.Blue out of it. The same regards to the border thickness that is beeing converted implicit into a Thickness object. WPF includes a lot of type converters for built-in classes, but you can also write type converters for your own classses.

 
<Border BorderBrush="Blue" BorderThickness="0,10">
</Border>
 
 

Markup Extensions

Markup extensions are dynamic placeholders for attribute values in XAML. They resolve the value of a property at runtime. Markup extensions are surrouded by curly braces (Example: Background="{StaticResource NormalBackgroundBrush}"). WPF has some built-in markup extensions, but you can write your own, by deriving from MarkupExtension. These are the built-in markup extensions:

  • Binding
    To bind the values of two properties together.
  • StaticResource
    One time lookup of a resource entry
  • DynamicResource
    Auto updating lookup of a resource entry
  • TemplateBinding
    To bind a property of a control template to a dependency property of the control
  • x:Static
    Resolve the value of a static property.
  • x:Null
    Return null
The first identifier within a pair of curly braces is the name of the extension. All preciding identifiers are named parameters in the form of Property=Value. The following example shows a label whose Content is bound to the Text of the textbox. When you type a text into the text box, the text property changes and the binding markup extension automatically updates the content of the label.

 
<TextBox x:Name="textBox"/>
<Label Content="{Binding Text, ElementName=textBox}"/>
 
 

Namespaces

At the beginning of every XAML file you need to include two namespaces.
The first is http://schemas.microsoft.com/winfx/2006/xaml/presentation. It is mapped to all wpf controls in System.Windows.Controls.
The second is http://schemas.microsoft.com/winfx/2006/xaml it is mapped to System.Windows.Markup that defines the XAML keywords.
The mapping between an XML namespace and a CLR namespace is done by the XmlnsDefinition attribute at assembly level. You can also directly include a CLR namespace in XAML by using the clr-namespace: prefix.

 
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</Window>
 
 




Last modified: 2013-12-13 09:08:46
Copyright (c) by Christian Moser, 2011.

 Comments on this article

Show all comments
Karthikeyan
Commented on 29.October 2008
Hi, This is very nice and very useful for the beginers of WPF.

Thanks a log..
Anandakumar M
Commented on 7.November 2008
This looks very simple and easy to understand the concepts.
Sandip Barot
Commented on 11.November 2008
Is WPF only for Windows application? Can we implement same in web?
Christian Moser
Commented on 13.November 2008
Hi Sandip.
Applications built on WPF run only on Windows operating systems and require .NET 3.0 or higher to be installed. You can run your WPF applications in the browser (XBAP) but this is more an intranet scenario. If you want to create web applications with XAML you have to use Microsoft Silverlight, the little brother of WPF. Silverlight is available for IE, Safari and FireFox and it runs on multiple plattforms (Windows, Mac and Linux (called Moonlight)).
quasak
Commented on 29.November 2008
Very nice and useful for the beginners in WPF
Naveen S M
Commented on 12.December 2008
This is one of the finest article in WPF for beginners
mbe
Commented on 16.December 2008
again, very useful article. thanks a lot!
Moo
Commented on 19.December 2008
Also, for the "Properties as Elements" section, you could add and explain the following example, which is also valid:

<Button>
<ContentElement>
<Image Source="Images/OK.png" Width="50" Height="50" />
</ContentElement>
</Button>

I've not yet chosen my preferred method, since the second one is a bit longer to type, but can be pasted to any other element without having to change the container name.

Thank you for this article!
Moo
Commented on 19.December 2008
Sorry, my last element displayed instead of showing code.
Dave
Commented on 4.January 2009
Very helpful: you show a control nested in another control by using XAML
Go
Commented on 27.February 2009
When I tried C# code in XAML vs CODE. I got this error message
'StackPanel' is a 'namespace' but is used like a 'type'
Christian Moser
Commented on 27.February 2009
Probably you gave your example project the name "StackPanel" so the namespance of the project conflicts with the name of a class. If so, rename your namespace and try it again.
Go
Commented on 27.February 2009
Thanks for your reply. Yeah I did what you said. My problem is solved
Olivier P.
Commented on 2.March 2009
As nice and clear as WPF can be... very useful and understandable for all, thanks to share this with us.
Olivier P.
Commented on 2.March 2009
As nice and clear as WPF can be... very useful and understandable for all, thanks to share this with us.
prabu
Commented on 3.March 2009
Very usefull for begineers ..
Guest
Commented on 5.March 2009
Nice artical... good to know few new things...........
Odomae
Commented on 5.March 2009
I need to design an on-screen keyboard in 'c'. Can I use WPF for the UI?
Sara
Commented on 7.March 2009
The TextBlock class does not seem to have a Content property as depicted in the code snippet here. I tried replacing it here with the Ext property and it works fine. Probably you would want to correct it for other's sake.
Sara
Commented on 7.March 2009
**I am sorry, I meant the 'Text' property.
Sara
Commented on 10.March 2009
Hi Sara, thank you for your feedback. I corrected it. Christian
Navaneeth
Commented on 13.March 2009
Its awesome !! and easy to understand for the beginners..
Jay
Commented on 25.March 2009
Quality Introduction to WPF... Hurray
Kallu
Commented on 1.April 2009
Impressive....
Austin
Commented on 2.April 2009
Is WPF accessible to assistive technology e.g. screen readers or braille displays?
Christian moser
Commented on 17.April 2009
Hi Austin,
WPF supports Accessability over the UI Automation Framework. This allows it to give every element of the screen a descriptive Name and a HelpText. WPF also supports High Contrast color schemes for people with a low seight. Its worth to read the article about accessability on MSDN: http://msdn.microsoft.com/en-gb/library/ms753388.aspx.

I hope this helps
Greetings
Christian
xxx
Commented on 4.May 2009
Interesting, but you changed order in c#(button then text) and xaml(text then button).
Christian Moser
Commented on 4.May 2009
Thanks xxx. I corrected it.
Loganath
Commented on 6.May 2009
Very nice......
Jatin Sehgal
Commented on 11.May 2009
Hi I want to use WPF in my web application. Can you suggest a method to do the same.
Mahesh
Commented on 21.May 2009
Hi Jatin, You can achieve simlar stuff in web using Silverlight !
halby
Commented on 23.May 2009
thank u very much.... nice tutorials.
Ram
Commented on 3.June 2009
Very useful...will appreciate if next & prev page links are also given in this tutorial
Praseetha
Commented on 5.June 2009
Simple and good for beginners
Bhisham
Commented on 16.June 2009
Nice Tutorial.
Cai Zonghe
Commented on 2.July 2009
Very nice site to get my WPF feet wet. I tried something like
<TextBox x:Name="textBox"/>
<Label Content="{Binding Text, ElementName=textBox}" FontSize="{Binding Text, ElementName=textBox}"/>. Really cool!
Doudy
Commented on 21.July 2009
Thanks so much, this material helps me alot to understand the concept of WPF.
I hope you can complete this material as soon as you can.
sd
Commented on 24.July 2009
nice dude....
pp
Commented on 27.July 2009
thank you so much for this tutorial
but how can i get contentform Passwordbox instead of using textbox in a label???
contenttable
Commented on 5.August 2009
If you were thin once with lots of energy you can be that way again no matter what age you are.;
Madhuri
Commented on 6.August 2009
Thanks very useful.
Sergeminator
Commented on 9.August 2009
Your tutorials are really good, they are presented in a way that its really easy to understand. I noticed a few spelling mistakes though, like in this tutorial on the Markup section it says: "deriving von MarkupExtension." No biggie, but just thought you might want to change that.
Christian Moser
Commented on 9.August 2009
Hi Sergeminator,
thanks for your feedback. That was a german word in my sentence :-) I correted it.
channa abeetha
Commented on 11.August 2009
excellent guidance to WPF
jitendra morya
Commented on 14.August 2009
very nice tutorial
Vipul Vyas
Commented on 17.August 2009
Cool 4 beginners
Joel
Commented on 18.August 2009
"All preciding [sic] identifiers..."

<InigoMontoya>You keep using that word. I do not think it means what you THINK it means.</InigoMontoya>

Other than that nitpick, great job!
aubsy
Commented on 20.August 2009
hi nice article.
If i want to use wpf content in my mfc application how I use XAML in MFC?
Ashish
Commented on 22.August 2009
Really good for beginners
Janet
Commented on 25.August 2009
This artical is useful for beginners
Vishal Bhatt
Commented on 26.August 2009
Great place to learn WPF, great job dude.
Prakash...
Commented on 9.September 2009
Great stuff for beginners.............
Appreciate your work.
Great
Commented on 22.September 2009
Great stuff for beginners.............
Appreciate your work.
Ankit Joshi
Commented on 23.September 2009
Great,it helps me lot
Thanks
Abin
Commented on 23.September 2009
Greatly helpful. Thanks!
Rudolf
Commented on 29.September 2009
It is very kind what you are doing for those people that start out (just like me). Und when you (no distinction between Sie and du, but let's spice up the English laguage) brauchen a German word, geen problème (just to mix up a few languages). BTW XAML and the code isn't the same. Look at the margin.
JOSE...
Commented on 29.September 2009
very good for beginners like me
Rajesh
Commented on 30.September 2009
Very simple and clear for the beginners
Suresh...
Commented on 1.October 2009
Nice tutorial for beginers. Can we expect same kind of stuff for WCF and Silverlight.

Advance Thanks
Christian Moser
Commented on 2.October 2009
Hi Suresh,
I have plans to do the same kind of tutorial for Silverlight within the next months. But WCF is not really my field. My passion is in user interface technologies.

Greetings
Christian
dileep
Commented on 6.October 2009
Nice one for beginners..Thanks
vijay
Commented on 16.October 2009
hi Suresh,
Nice one beginnings...thanks
mahesh patel
Commented on 20.October 2009
Thanks No word for this presantation
Juan Camaney
Commented on 21.October 2009
Christian,

Nice tutorial and easy to follow. Thanks.
Mahesh
Commented on 27.October 2009
Thanks very much for this great tutorial series.
james popielarz
Commented on 27.October 2009
great job !!!! this is great stuff !!!!!
jp
Commented on 3.November 2009
u r comparing xaml to c# code when u should be comparing it to html for creating controls - your comparison is not valid
Gokulan
Commented on 6.November 2009
Good work, My Team take your site as reference . I have one Doubt in wpf application
I have Get bellow Error when I run the application

Cannot create instance of 'MainWindow' defined in assembly 'WpfApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1bf0907b26041934'. Exception has been thrown by the target of an invocation. Error in markup file 'MainWindow.xaml' Line 1 Position 7

can you guide me please
swazendo
Commented on 9.November 2009
As I understand it:

Graphic (GUI) designer creates a GUI that is represented in XMAL.
Developer has to implement all events generated foiund in the XMAL.

How does the XMAL from the graphic designer get imported into the developer’s project for event implementation?

I tried creating one project with a command button (this generated an XMAL file) and imported the XMAL file into a second project that was to implement it – could probably hack it to get it to work (got simple compile errors) but specifically, how do you do “Separation of designer code and logicâ€Â?

Can you give an example of this?

Thank you.


Christian Moser
Commented on 10.November 2009
Hi swazendo,
like you had the designer file (Form1.designer.cs) and the codebehind file (Form1.cs) in WinForms, you now have the XAML and the codebehind. Where the designer file was also in C# under WinForms, it's now in an XML language. When you compile your project, the XAML code gets converted into a fast and compact binary format, called BAML. This stream is included as a resource in your project. When you load a Window in WPF, it creates the empty window and loads this binary BAML stream. From this stream it creates a graph of WPF elements.

Designer and developer work on the same solution. You don't have to import the XAML into the developers solution. It's just the idea, that the designer can work with a graphical editor that is made for designers (Expression Blend) and the developer can work in Visual Studio, and they both use the same file - the XAML file.

I hope this clarifies it a bit.

Greetings
Christian
Sherwin
Commented on 12.November 2009
Hi When I tried the code
<TextBox Height="31" HorizontalAlignment="Left" Margin="42,77,0,0" Name="txtInput" VerticalAlignment="Top" Width="154" />
<Label Content="{Binding Text,ElementName=txtInput}" />

The designer was not able to reload, and trhow an System.NullReferenceException

Although, I can still run it! Anyway thanks for this tutorial!
citra
Commented on 16.November 2009
hi .. this article is really useful for beginners ..actullay i am searching bacic knowledge of xaml .. no one can post .. but this articlethey given ... thank u
regards
citra
Sourav
Commented on 20.November 2009
hi.. i would like to know how XAML and Code behind(C# code)interact together. Suppose a control is added in XAML and we are able to access that control in code behind. how does it work?? please give me a clear idea..

thanks in advance,
Sourav
Raju
Commented on 21.November 2009
Very simple and clear for beginners
raju
Commented on 21.November 2009
thanks Mr.Christian Moser
Hobby Jose
Commented on 27.November 2009
Very easy to learn. Great work!
Hi
Commented on 1.December 2009
trying
Pat
Commented on 1.December 2009
I like your tutorial so far, nice work. There is an error though in your Label binding example. The XAML for the Label should be this instead:

<Label Content="{Binding ElementName=textBox, Path=Text}" />

Trying it the way you posted is causing a compiler error.
melvin
Commented on 1.December 2009
<Label Content="{Binding Text, ElementName=textBox} />

Works for me..

Very nice site.. Thank you...
A. Razzaque
Commented on 1.December 2009
Its really very good and helpfull
Dipal Bhavsar
Commented on 11.December 2009
Very easy to understand, I am expecting the same for WCF and Silverlight
RAJIB BANERJEE
Commented on 15.December 2009
I was looking for a site to start learning WPF and landed here. Instantly got hooked up, installing..... Visual Studion 2008 with C# express edition, learnt about Expression line of products, knew a bit of XAML....and the learning goes on...Good Job Christian. Also, the site is designed nicely.
wgzly
Commented on 25.December 2009
It's a very good example for me.
Ravi kiran
Commented on 28.December 2009
Hi Christian,

Can you provide more examples for each markup extentsions.....


<Grid>
<TextBox Height="23" Margin="77,36,67,0" Name="textBox1" VerticalAlignment="Top" />
<Label Height="28" Margin="77,86,67,0" Name="label1" VerticalAlignment="Top" Content="{Binding Text, ElementName=textBox1}"/>
</Grid>

--This really works.

--Regards
Ravi kiran
pooja
Commented on 4.January 2010
<Label Content="{Binding Text, ElementName=textBox} />

works for me...
the other one didn't give errors but ..
didn't give the output also..
Ajith
Commented on 9.January 2010
Hi Cristian
Really good tutorial for beginners . Carry on it
Raz
Commented on 10.January 2010
Thank you very much for very easy to understand tutorial.
indian
Commented on 11.January 2010
GREAT , I DONT KNOW HOW TO APPRICATE YOUR WORK ,SIMPLY I CANT SAY THANKS.
krishna raj
Commented on 12.January 2010
Very Nice article.Thanks for Information
KingIsulgard
Commented on 14.January 2010
I don't see your xaml using any xml, the real reason why it is used.
Darsana
Commented on 27.January 2010
Very Good Work.. Thank you very much
ccanan
Commented on 30.January 2010
really great work, appreciate your excellent work.
Aunt KK
Commented on 31.January 2010
Great explanation. There were some excellent details that clarified things I just accepted before, but never knew why or what they really meant. Thanks!
Craig
Commented on 3.February 2010
<Label Content="{Binding Text, ElementName=textBox} /> does not seem to work in VS 2010 Beta.
sathya
Commented on 10.February 2010
Nice work.....I need material for WCF and Silverlight, could make it please.
parikshit
Commented on 12.February 2010
can you give me some link of similar type of example .
parikshit
Commented on 12.February 2010
same here as said by Craig :
parikshit
Commented on 12.February 2010
www.c-sharpcorner.com/UploadFile/mahesh/SilverlightLabel12132008105302AM/SilverlightLabel.aspx
this link is useful for label binding but this s not mine
InvisibleArt
Commented on 15.February 2010
Nice content but you need an editor. For example, "Altough it was originally invented for WPF it can by used to create any kind of object trees." This has two typos. Running it through Microsoft Word should catch some of the mistakes.
Manny
Commented on 17.February 2010
Very good content. Don't mind the typos...get a life.
Arvind S...
Commented on 25.February 2010
Its really amazing stuff
Santosh Thube
Commented on 27.February 2010
Very nice article for WPF beginners.
Cnu
Commented on 1.March 2010
Very useful
Srikanth
Commented on 3.March 2010
Nice Code. this is very good for beginners.
Sandeep
Commented on 6.March 2010
Nice! It is so easy to understand.
Rick O'shay
Commented on 7.March 2010
The XML comparison is missing some lines:

<!-- Create the StackPanel -->
<!-- Create the TextBlock -->
<!-- Create the Button -->

Also, what if I want FancyTextBox instead of TextBox, do you simply replace TextBox with FancyTextBox in the XML? How do I compute the string if that's needed?

The list of advantages given was not overstated (they are real, important and materially significant) but it's important to know there are trade-offs.

(OT: every article here are saturated with information-free 'at-a-boy comments)
anish eapen
Commented on 11.March 2010
Chiristian... why not provide some links to external / msdn pages... so that we could look at other examples too.
Sagar
Commented on 14.March 2010
Hi Christian,
These articles are very useful. You could give 'Next' and 'Previous' buttons at the end of each article of this tutorial so that we can go to the next part of the tutorial easily.
Muthtu
Commented on 15.March 2010
This is very Useful for beginners crisp and clear
SHOAIB JAMADAR
Commented on 18.March 2010
A fantastic technology given by microsoft to build such a large application with 2d,3d graphical animations & which reduces the coding burden of developers.....
Krish
Commented on 19.March 2010
Crystal clear...
Benji
Commented on 23.March 2010
Thanks a lot for this article! :) Very good tutorials.
Merci beaucoup pour cet article! :) Très bon tutoriel.
Alok
Commented on 25.March 2010
It very nice . it is very helpful for beginner..
Thanks a lot....................
bal
Commented on 25.March 2010
nice one
Rajiv
Commented on 25.March 2010
Gr8 Post. Thanks!! Keep up the good work.
Bala
Commented on 25.March 2010
Easy to read.. Nice work!
Govind
Commented on 26.March 2010
really good!!!!!!!!
jitendra
Commented on 30.March 2010
Gr8 work , really looking for such tutorials, keep it up
Satish N
Commented on 2.April 2010
nice, useful for beginners
please add next and previous links to all pages
rich
Commented on 7.April 2010
How do we know what variable name the XAML file gave to the textBox or button object? How do we assign one?
wullxz
Commented on 8.April 2010
Look at the Porperties. It's above all properties or you can see it in the XAML-Tag
Indoguy
Commented on 8.April 2010
Good Demostration :)
Neo
Commented on 8.April 2010
Nice one.. Keep it up Good work..
Gangadhar
Commented on 9.April 2010
Simply superb..Thank you very much for the great stuff..Keep good work going..
Shweta Jain
Commented on 12.April 2010
Nice work. Content is understandable
Rakesh
Commented on 15.April 2010
Really excellent..it's a biscuit for u
aashish harneja
Commented on 15.April 2010
how can we create a word processing application with silverlight and xaml??
could u plz help me on this??
maes
Commented on 16.April 2010
very nice website ;)
Hosein
Commented on 20.April 2010
thank you was very useful for begginers like me
reddy
Commented on 20.April 2010
For crystal clear understanding, please provide some real time sample application with MVVM pattern.
Vasanth
Commented on 22.April 2010
We need Some application examples
Muthu
Commented on 23.April 2010
Good for Beginners
gb
Commented on 27.April 2010
WTF, do we have nothing better to do than to develop yet another way of doing things. Sounds more like business marketing and making money than really solving problems. At this point, microsoft is creating the problems they are solving, so how is that making things better for developers
mmmm
Commented on 28.April 2010
hiii
sreedhar k
Commented on 2.May 2010
Good tutorial website ....
saurabh agrawal
Commented on 4.May 2010
Good for starting ...
Marie
Commented on 4.May 2010
Very good tutorial, thanks a lot!!!
Zed
Commented on 5.May 2010
Awesome... next and previous links on pages would make it even better :)
fs
Commented on 8.May 2010
sefe
fs
Commented on 8.May 2010
sefe
mahesh dhaduk
Commented on 8.May 2010
good one.............
priya
Commented on 10.May 2010
Good but need examples...
sri
Commented on 10.May 2010
Nice examples very clear to understand
Me
Commented on 18.May 2010
Arn't the margin values backwards in the XAML vs. C# example?
Ehsan
Commented on 20.May 2010
Great for beginners...
kannan
Commented on 26.May 2010
Its Ok...
kanann
Commented on 26.May 2010
paravailai
Krunal Trivedi
Commented on 26.May 2010
Sweet and Short...thanks Christian
Ben
Commented on 28.May 2010
You have mixed up the margin values for the Button and the TextBlock in the "XAML vs. code" - section. Not really worth mentioning but a mistake nevertheless. ^^
aeternam
Commented on 30.May 2010
Thanks again. I've been struggling to really understand these topics.
Now I do! :)
Ravi Shankar
Commented on 1.June 2010
very easy and understanding way of explanation...nice website...
Swapnil
Commented on 2.June 2010
Very nice web site............really cool..............and efficient..............
Bijay
Commented on 15.June 2010
very easy and understanding way of explanation..
Vic
Commented on 16.June 2010
Very nice site and clear explanation. Great work all around.
tushar
Commented on 23.June 2010
very easy and understanding way of explanation..
Amit Jain
Commented on 24.June 2010
can u please convert this tutorial in simple language
Chris
Commented on 26.June 2010
I can read the C# code as easily as I can read the XAML. I don't care if it is more lines than XAML because the designer generates this code for me when I set the properties in design mode. So in my opinion readability is not a benefit here.
cindyzqt
Commented on 28.June 2010
@gd, i totally agree with u, coz i am having the same question too~
周æÂÂ...
Commented on 28.June 2010
哥们,写的ä¸Âé”™ï¼Âï¼Âï¼Âï¼Â
sampada
Commented on 29.June 2010
It is really very nice and helpful :)
terence
Commented on 30.June 2010
thanks for your tutorial,it is very usefully.
terror
Commented on 4.July 2010
realy super...........
Vijayasekaran
Commented on 7.July 2010
Its easy to understantable as a fresher in WPF.Thanks
Nagarajan
Commented on 9.July 2010
good can u explain architecture of wpf little bit in deep
Rajni Padhiyar
Commented on 12.July 2010
superb article,

Thanks
Rajni Padhiyar
jiturcm
Commented on 14.July 2010
thats very good
Sunil Arora
Commented on 14.July 2010
Good but need to me more explanatory with examples...
Chintan
Commented on 15.July 2010
Good
shankar
Commented on 22.July 2010
its easy understand clearly ....very nice website...
Ripen
Commented on 23.July 2010
Good One
Ioan Bucur
Commented on 27.July 2010
yat... yet another thanks :) A short and clear description of XAML basics and terms.
manohar
Commented on 28.July 2010
Thanks,Its easy to understantable as a fresher in WPF, need to me more explanatory with examples...
surendramarri
Commented on 3.August 2010
If u dont main can u send the any WPF pdfs
bindu
Commented on 5.August 2010
hi nice article but pls provide some more examples for Namespaces and Markup Extensions
Biswasagar
Commented on 5.August 2010
Thanks
Balasim
Commented on 6.August 2010
Very nice introduction
Saffi
Commented on 8.August 2010
Very Good Explanation, Thanks......
najme
Commented on 14.August 2010
DynamicReport in xaml without table
Bhasker Reddy
Commented on 17.August 2010
good source for wpf and great explanation...

Thanks & Regards,
Bhasker Reddy
Kamal
Commented on 18.August 2010
easy to understand
thilak
Commented on 18.August 2010
wonderful...
COPYRIGHT LAWS
Commented on 23.August 2010
COPYRIGHT INFRINGEMENT AT ITS FINEST!!!!!!!!!

MOSER IS GREASY AS HELL
carolyne
Commented on 24.August 2010
really gud
Ramana
Commented on 27.August 2010
nice article and easy to undersatnd betweenwindows forms and wpf
anuradha...
Commented on 30.August 2010
GOOD ONE
Annu
Commented on 31.August 2010
ya its perfect article for beginners.thanks
Jonathan B
Commented on 5.September 2010
Wow thx for this great article! keep the good work coming :D
minee
Commented on 6.September 2010
So thank you!
I can easily understand your english article. And your instruction is very detailed.
I appreciate your perfect article! I will continue WPF study, it's be helpful.
Preetinder...
Commented on 10.September 2010
Its a good and simple article. I like it. Thanks. Keep it up.
Vijay Joshi
Commented on 14.September 2010
nice article and easy to undersatnd betweenwindows forms and wpf
ss
Commented on 15.September 2010
2714345
 ...
Commented on 17.September 2010
 
makka
Commented on 20.September 2010
good !
TIENTA
Commented on 21.September 2010
good
Alok Kumar
Commented on 22.September 2010
Very nice for fresher
pank
Commented on 25.September 2010
easi to get for fresher but need more example with good desciption
Jisha
Commented on 27.September 2010
great explanation...
matsolof
Commented on 30.September 2010
Very helpful. Especially the comparison of XAML and C# code. I'm now leaning even more towards using WPF instead of Windows forms. I'm still asking myself this question, though: Are there things you can do with Windows forms that you can't do with WPF?
Gav
Commented on 5.October 2010
If anyone is interested I've decided to sell XAML.com. Go to xaml.com for more info. cheers
CGG
Commented on 6.October 2010
Thank You!
Balaji Birajdar
Commented on 7.October 2010
Nice tutorial . Thanks
Upendra Gupta
Commented on 7.October 2010
Thank you nice explanation....
ravi kore
Commented on 8.October 2010
nice articles !
Abhishek...
Commented on 10.October 2010
Nice one to begin with
Sathish Kannan
Commented on 12.October 2010
Can anyone give the code to allign the controls in 'Zigzag' manner??!!
Abishek
Commented on 12.October 2010
Nice Article! gud one :)
Maheswar Reddy
Commented on 13.October 2010
It is Good To Learn for Beginners.
Anna
Commented on 14.October 2010
Excellent explanation!
yael
Commented on 19.October 2010
You are big!!!!!!!!!!!
manoj
Commented on 20.October 2010
very good for fresher
manoj Kumar...
Commented on 20.October 2010
very good for fresher
A
Commented on 20.October 2010
are all the comments baised or from the same group who are promiting the site?
manoj
Commented on 20.October 2010
very good for fresher
sathya
Commented on 22.October 2010
good work.easy to untersatand.
mathhoang
Commented on 22.October 2010
Good introduction for newbiew
Malandite
Commented on 2.November 2010
Good article can this be ported on any platform ? I mean can i run such application on Linux without changes ?
JMM
Commented on 3.November 2010
Very good
Rahul Reddy
Commented on 4.November 2010
Take u r fred hand n close all fingers and open the middle one...nw u wil understand hw the article wil be...F O...
fdhhhgf
Commented on 4.November 2010
good one..
DENNERTITE
Commented on 4.November 2010
VERY INFORMATIVE BUDDY.
Ankit Jaiswal
Commented on 9.November 2010
A nice way to explore new thing...Really too good
Siva
Commented on 9.November 2010
Thanks helped me to understand xaml
kaleem ahmad
Commented on 10.November 2010
Nice
Cuong Bui
Commented on 11.November 2010
How to validate XAML which is coming in string variable without raising any exception?
Gajender
Commented on 13.November 2010
Good information help me to understand xaml
Chandy
Commented on 16.November 2010
Good one..good to start!!
Ravi Krishna
Commented on 20.November 2010
Thank you, nice to remove my doubts
Akhilesh
Commented on 24.November 2010
Very good article
syam
Commented on 25.November 2010
Thank you for help me to understand XAML
Om
Commented on 26.November 2010
Thank you very much for such a nice article. It is really helpful for me.
ddddddddd
Commented on 3.December 2010
dd
Nouf
Commented on 3.December 2010
Very good introduction to XAML !
arvind
Commented on 4.December 2010
nice good introduction
Gopi
Commented on 6.December 2010
It's quite interesting and really good
Suryaa
Commented on 8.December 2010
Excellent Work out...
sandeep
Commented on 10.December 2010
good one
abc
Commented on 11.December 2010
Good Article
Niels Heurlin
Commented on 12.December 2010
Very nice, thank you!
Dasthagiri...
Commented on 15.December 2010
Simply Superb...It is really help to all.
deva
Commented on 16.December 2010
Very Nice Intraduction....!
Rashmi gupta
Commented on 16.December 2010
it is very nice to understand and take an overview of XAML
Avinash
Commented on 17.December 2010
Complicated example, try to elaborate it and try to make it understandable.
Seshu
Commented on 20.December 2010
Its Very good article to understand XAML.
Subrat
Commented on 29.December 2010
Really Nice..One...How to Download it..
Jack
Commented on 30.December 2010
Very Nice Artical
JR Bishnoi
Commented on 30.December 2010
Nice article
Swami
Commented on 10.January 2011
Very nice and bulls eye
Suman
Commented on 11.January 2011
Good Start for undestanding XAML, thanks.
ravi
Commented on 12.January 2011
Thank you for the inforamtion about XAML
Satish Kumar...
Commented on 12.January 2011
Very nice article for beginners... Explained each and every concept deeply...
Mohanavel
Commented on 13.January 2011
Simple and powerful
Gopal
Commented on 14.January 2011
Good one.
Sush....Soft..
Commented on 18.January 2011
Nice help me for development of project
Devesh Kumar
Commented on 20.January 2011
Nice Article.
Ranjeesh
Commented on 22.January 2011
Superb...Simple explanation that makes anyone to understand WPF..Thanks a ton!
SivaNomula
Commented on 24.January 2011
Simple and short,
makes me turn more pages
colteiv
Commented on 24.January 2011
Thanks. :)
saran
Commented on 25.January 2011
nice for beginners
Nonbeliever
Commented on 27.January 2011
Did you write these comments yourself?
Nonbeliever
Commented on 27.January 2011
Oh I see! You didn't write them yourself, you just censor them. But, to be constructive: I know next to nothing about WPF (I've never written a WPF application before), but none of your articles contain anything I didn't know before. You what would be a great idea? Write something like "WPF for Window Forms programmes" - article or a series of articles that would show people how Windows Forms concepts map onto WPF.
suma
Commented on 27.January 2011
nice article for beginners to get the idea of xaml
mani9sh
Commented on 27.January 2011
veeer goog yar
Shailendra...
Commented on 29.January 2011
kk
Webee
Commented on 2.February 2011
Nice
tu
Commented on 2.February 2011
yiuou
asaf
Commented on 2.February 2011
thanks a lot
very very nice
Chen
Commented on 2.February 2011
XAML vs. Code
Where to put the C# code. the following line code has problem.
"this.Content = stackPanel;"
oliver
Commented on 7.February 2011
where can i find all the type of panel, button etc.. ? is there a controls panel like the toolbox ?
sujit
Commented on 9.February 2011
Nice examples.
this is very useful for freshers.
thank u very much chris.
vinothkumar
Commented on 10.February 2011
nice article
Shweta Patel
Commented on 11.February 2011
This is really nice doc to understand. Thanks.
Sergey
Commented on 18.February 2011
Good articles! Useful site! Thank you! I'm upgrading from WinForms to WPF for desktop application and it is good place to start!
Venkat...
Commented on 22.February 2011
Windows,grid and other controls are the hierarchal pattern ?
Nilesh Patil
Commented on 23.February 2011
Very nice & easy to understand.Thanks
Nilesh Patil
Commented on 23.February 2011
Very nice & easy to understand.Thanks
Juandy
Commented on 25.February 2011
Wow amazing Tutorial,I plan to build my first wpf app using C# and this XAML introduction is just perfect. You explain your points sharply and in an easy to understand way.
Isha
Commented on 4.March 2011
Mazaa agya
ZGTR
Commented on 4.March 2011
Thank man :)
Kshitija
Commented on 14.March 2011
awesome article ! really simple !!! love it !!!!
Girish
Commented on 17.March 2011
Nice Article
harinath...
Commented on 18.March 2011
it is very use full to a bigginer
kishorchandra
Commented on 18.March 2011
Nice tutorial..Good work.
Simple and easily understandable.
Sanjay Patolia
Commented on 24.March 2011
Very good fundamental of Markup Extensions
rohit
Commented on 24.March 2011
thanks ur tutorial helps me alot.plz post me some examples on dependency properties
serkan
Commented on 25.March 2011
thanks your tutorials wery clear thx
Rizwan
Commented on 26.March 2011
Nice.. As simple as eating icecream.. thanks chris
Sandeep Ravi
Commented on 30.March 2011
Its realy very nice.............. Now WPF look quite friendly.
tbqh511
Commented on 8.April 2011
This is useful workshop :))
Dave
Commented on 11.April 2011
Thanks for the help...I prefer to write in VB so I am not sure what to change from the tutorial to my code but I'll keep trying.
sanjeeb
Commented on 16.April 2011
very nice.comprehensive.
manoj
Commented on 19.April 2011
cool...fantastic...nice to see a stuffed article...waiting for more....
Senthilkumar.S
Commented on 26.April 2011
This article is really simple and easy to understand, Thanks....
gola
Commented on 4.May 2011
mast hai mast
Rajesh
Commented on 4.May 2011
Good
Uditha
Commented on 10.May 2011
Nice...
Minna
Commented on 17.May 2011
Good Arrticle
nandini
Commented on 19.May 2011
yes it is very easy to learn
Shailesh Bhatt
Commented on 19.May 2011
great work... very helpfull for those who r thinking to start learning this new tec.
Bassam
Commented on 20.May 2011
many thanks to you for your great effort :)
KPB
Commented on 25.May 2011
Really good article and very much descriptive
Hunter
Commented on 1.June 2011
Nice. I also found this site (http;//brezerd.net/) which has XAML functionality. Can XAML create standalone applications (i.e. exe's)?
Pratigya
Commented on 3.June 2011
nice and easy article
Ashish
Commented on 4.June 2011
its good n really v easy to understand...good stuff..
BreakHead
Commented on 7.June 2011
Jiyo Guru Jiyo!!! Amazing....
Ankit
Commented on 10.June 2011
Maza Ayegi...
Mustafa SA
Commented on 13.June 2011
very good , my friend.
Thanks
dilip
Commented on 26.June 2011
good one and understandble .... :) hope can u provide a tutorial in WCF
Vijayalakshmi
Commented on 30.June 2011
Good Article
narendra jarad
Commented on 4.July 2011
nice one...thanks ..
narendra jarad
Commented on 4.July 2011
nice one...thanks ..
Carl Johansson
Commented on 5.July 2011
Just started reading this tutorial, and it seems very promising. A dedicated, easy to follow site on WPF is a really brilliant idea.

At first I was a bit puzzled as the C# code under &quot;XAML vs. Code&quot; didn't produce identical results with the XAML code (tried it in VS 2010). However, a few simple changes to the C# code corrected for the deviation.

// Create the StackPanel
StackPanel stackPanel = new StackPanel();
this.Content = stackPanel;

// Create the TextBlock
TextBlock textBlock = new TextBlock();
textBlock.Margin = new Thickness(20); // Changed from 10 to 20
textBlock.Text = &quot;Welcome to the World of XAML&quot;;
stackPanel.Children.Add(textBlock);

// Create the Button
Button button = new Button();
button.Margin = new Thickness(10); // Changed from 20 to 10.
// Added the next statement. Guess &quot;Stretch&quot; is the default.
button.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
button.Content = &quot;OK&quot;;
stackPanel.Children.Add(button);

If you wish to reach me, write to a domain named kvarnskogen.st prefixed by hakan at that domain.
Vijay
Commented on 6.July 2011
Thanks a lot..!!
notfed
Commented on 11.July 2011
correction: chlild -&gt; child
Vijay Dashora
Commented on 15.July 2011
Very simple for novices programmers to understand what is XAML..... Thanks
Ganesh
Commented on 15.July 2011
Nice...
batham
Commented on 18.July 2011
good content for beginners.
Safoura
Commented on 20.July 2011
its very comprehensive . thanks alot
batham
Commented on 21.July 2011
good content for beginners.
AT
Commented on 22.July 2011
nice
Rahul
Commented on 1.August 2011
Very Helpful!! I liked it!!

Thanks!
Ali
Commented on 4.August 2011
Very Good, thank you
Jack Shasha
Commented on 8.August 2011
When I can understand a new subject in a few minutes that means that it is &quot;clear and concise&quot; as I like it. I am a technical writer and always striving to achieve a similar effect. Thanks.
sai
Commented on 16.August 2011
Thanks a lot..!!! It is really very easy to understand
OSK
Commented on 18.August 2011
Screw the WPF chapt in my C#2010 for dummies, this is how a proper tutorial should be.
Ian
Commented on 23.August 2011
The code above is only longer because of the parameterless constructors. XAML allows a line to initialise an object. You need a line for each parameter in code because of the lack of constructors.
Ramya krishna
Commented on 24.August 2011
Thanks alot good one
Girish
Commented on 26.August 2011
Thank you for this short n precise tutorial..!
Mahesh
Commented on 26.August 2011
Good one and easily understandable.
Thank U
Mahesh
Commented on 26.August 2011
Good one and easily understandable.
Thank U
Jason
Commented on 6.September 2011
Very cool tutorial. Is there a way though that you could put forward and next buttons? Thanks.
bibin tv
Commented on 6.September 2011









Darpok
Commented on 9.September 2011
And i was thinking i would never learn XAML
Pharme195
Commented on 14.September 2011
Hello! kfedfaa interesting kfedfaa site! I'm really like it! Very, very kfedfaa good!
Pharmg537
Commented on 14.September 2011
Hello! fdkcgae interesting fdkcgae site! I'm really like it! Very, very fdkcgae good!
dk
Commented on 16.September 2011
very well said!!
Atif Hussain
Commented on 21.September 2011
Thanks. A very good and succint read. Waiting for more articles.
LampGlow...
Commented on 24.September 2011
Fantastic Notes
Baljinder
Commented on 24.September 2011
Thanks A Lot......
innocent...
Commented on 25.September 2011
great ..

Name
E-Mail (optional)
Comment