Welcome to MSDN Blogs Sign in | Join | Help

Data See, Data Do

Mike Hillberg's Blog on Wpf and Silverlight

Syndication

News

All postings are provided "As Is" with no warranties, and confers no rights. Opinions and views expressed here are not necessarily those of Microsoft Corporation.


Browse by Tags

All Tags » Xaml   (RSS)
A Custom Storyboard Component in Xaml
In WPF & Silverlight, a Storyboard is a collection of animations running in parallel. Not everyone likes the name “Storyboard” though. The idea behind the name was that that list of timelines running in parallel are like a list of plot lines in the Read More...

Posted Friday, November 20, 2009 3:19 PM by MikeHillberg | 0 Comments

Simple way to create a gradient brush in Xaml
Rob , Nikhil & I were talking today about the early days of Xaml when you could create linear gradient brushes as an attribute value. E.g. (borrowing from Rob’s post on this subject) instead of creating a LinearGradientBrush for the fill of a rectangle Read More...

Posted Thursday, April 24, 2008 11:06 PM by MikeHillberg | 1 Comments

Filed under: ,

Building read-only objects in Xaml
We often use Xaml to instantiate and initialize objects. For example, given “<Foo Bar=’1’/>”, a Xaml loader creates a Foo object, and sets the Bar property to 1. That works when the Bar property is settable, but what can you do if it isn’t? An example Read More...

Posted Monday, July 02, 2007 10:32 AM by MikeHillberg | 1 Comments

Filed under: ,

Namespaces in Xaml
If you’re really into Xml conformance, and you’ve really wondered how Xaml uses Xml namespaces, read on; I can cover the most relevant details in 1160 words or less … Namespaces on tags (I’m using the term “tag” here instead of the more correct term “element”, Read More...

Posted Wednesday, May 16, 2007 9:51 AM by MikeHillberg | 1 Comments

Filed under: ,

Expandos in xaml
This post has a couple of suggestions on ways to accomplish expandos in Xaml. F irst some background … On an HTML page you can define your own new “expando” properties on the fly, such as in this example: < HTML > < BODY onload = ' paragraph1.innerText Read More...

Posted Monday, May 14, 2007 5:36 PM by MikeHillberg | 1 Comments

Tip: Using XamlWriter and XamlReader to clone an object
There are multiple ways to clone objects, and multiple definitions of what “clone” should even mean. The main issue is usually about cloning “deep” vs. “shallow”. For example, if you have a Customer object that points to an Address object, and you clone Read More...

Posted Tuesday, May 01, 2007 1:35 PM by MikeHillberg | 2 Comments

Filed under: ,

Limited generics support in Xaml
Xaml doesn't generally support generic types. But this post provides some code that allows generic collections, lists, and dictionaries to be created from Xaml using markup extensions. Read More...

Posted Friday, October 06, 2006 9:04 AM by MikeHillberg | 10 Comments

Filed under: ,

Attachment(s): GenericsAndXamlTypeResolver.zip

Xaml Inspired Markup
A lot has been written about how Xaml maps tags and attributes to objects and properties. But it’s not necessary that Xaml actually be used to create .Net objects. Maybe you don’t plan to for your markup to be mapped to objects, at least not today. But if you already work with Xaml, following the same syntax conventions as Xaml for your other markup provides some nice consistency and readability, and a possible future path to intuitive code manipulation. Read More...

Posted Wednesday, September 27, 2006 6:16 PM by MikeHillberg | 1 Comments

Filed under: ,

Attachment(s): OrgChart.JPG

Being written by XamlWriter
A big part of WPF (Avalon) is the Xaml format for creating object trees. You can also go in the other direction – take an object tree and write it out to Xaml – with the XamlWriter class. That mostly just works, but there are cases where XamlWriter needs some help from you to write your class correctly. This post describes what you need to do. Read More...

Posted Saturday, September 16, 2006 12:41 AM by MikeHillberg | 5 Comments

Filed under: ,

Page view tracker