LA.NET [EN]
Ramblings about C#, .NET and Programming
Browse by Tags
All Tags
»
XAML
(
RSS
)
Silverlight
Markup extensions
Mon, Nov 23 2009 12:26
Markup extensions allows you to extend the expressibility of XAML. You use markup extensions to escape the general treatment that attribute values get (by default, we’ve seen that they are treated as strings or that a type converter is used to convert them to the adequate type). Markup extension expressions are always delimited by the pair { }. Currently, the...
Read More...
XAML: what about events?
Thu, Nov 19 2009 12:54
A friend of mine asked me about events and XAML: can we setup event handlers in XAML? And the answer is, yes, you can. Here’s a quick example of how you can handle the click event of a button: < Button Click = "Button_Click" ></ Button > And yes, you must define the Button_Click method in your code-behind file (note that you could do it...
Read More...
How to build types that can be consumed from XAML
Thu, Nov 19 2009 10:32
Now that you know how to use custom types in XAML, you might be wondering if there are any thing you should keep in mind when designing new types that should be consumed from XAML. I’ve already said before that collection properties need to have a getter that return a valid instance of an object. But there’s more. Here are a few things you should consider when...
Read More...
Associating XAML namespaces to CLR namespaces
Thu, Nov 19 2009 10:10
Take a look at the following (simple) XAML: < UserControl x : Class = "SilverlightApplication1.MainPage" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns : x = "http://schemas.microsoft.com/winfx/2006/xaml" > < Canvas x : Name = "myCanvas" > </ Canvas > </ UserControl > When...
Read More...
XAML languages features
Wed, Nov 18 2009 15:15
As I’ve said before, Silverlight supports only a subset of the existing XAML keywords you can use in WPF. Here’s the list of keywords you can use in your Silverlight: x:Class: you can apply this attribute to the root element of the XAML file (or object tree) that is going to be “compiled”. When you apply this attribute, you’ll end up creating a partial class...
Read More...
XAML and collections
Wed, Nov 18 2009 12:13
We’ve already talked about several features related to XAML. In this post, we’ll keep going and we’ll see how to specify collections in XAML. There are two basic types of collections you can use in XAML: lists and dictionaries. Before going on, it’s important to understand that you’re not really creating new collections in XAML; instead, we’re adding items to...
Read More...
Type converter on Silverlight
Wed, Nov 18 2009 11:09
Today we’ll talk a little bit about the role played by type converters in “transforming” XAML into C# objects. Here’s a quick example: < Button xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns : x = "http://schemas.microsoft.com/winfx/2006/xaml" x : Name = "bt" Click = "bt_Click" Width = "100"...
Read More...
XAML: using content properties
Tue, Nov 17 2009 12:06
In the previous post , we’ve seen that we can use one of two approaches for setting the value of a property: we can use the property element or the attribute syntax (and, as we’ve seen in the previous post , you can’t use them both interchangeably). In this post , we’ll keep going and we’ll see how content properties simplify even more the markup we need to write...
Read More...
XAML and property elements
Tue, Nov 17 2009 10:20
In the previous post , we’ve started looking at same basic XAML. At the time, we’ve defined a simple button by using the following syntax: < Button xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns : x = "http://schemas.microsoft.com/winfx/2006/xaml" x : Name = "bt" Content = "Say hi" Click =...
Read More...
Search
Go
This Blog
Home
Contact
About
Tags
Architecture
ASP.NET
Basics
Books
C#
Design by Contract
Gadgets
HTML 5
Javascript
JQuery
MS AJAX
Multithreading
MVC
NHibernate
PowerShell
S#arp
Silverlight
Tools
Trivia
VS
VS 2010
WCF
Windows 7
WPF
XAML
Community
Home
Blogs
Media
Groups
Archives
March 2011 (1)
January 2011 (4)
December 2010 (1)
November 2010 (5)
October 2010 (5)
September 2010 (23)
August 2010 (2)
July 2010 (9)
June 2010 (3)
May 2010 (1)
April 2010 (15)
March 2010 (6)
February 2010 (1)
January 2010 (16)
December 2009 (7)
November 2009 (45)
October 2009 (70)
September 2009 (35)
August 2009 (52)
July 2009 (48)
June 2009 (48)
May 2009 (44)
April 2009 (39)
March 2009 (39)
February 2009 (23)
January 2009 (22)
December 2008 (18)
November 2008 (20)
October 2008 (22)
September 2008 (31)
August 2008 (3)
July 2008 (25)
June 2008 (26)
May 2008 (30)
April 2008 (5)
March 2008 (11)
February 2008 (9)
January 2008 (15)
December 2007 (10)
November 2007 (20)
October 2007 (19)
September 2007 (29)
August 2007 (12)
July 2007 (20)
June 2007 (33)
May 2007 (44)
April 2007 (28)
March 2007 (27)
February 2007 (21)
January 2007 (37)
December 2006 (8)
November 2006 (17)
October 2006 (14)
September 2006 (5)
August 2006 (7)
July 2006 (4)
Syndication
RSS for Posts
Atom
RSS for Comments
Email Notifications
Go
News
My books