Data See, Data Do

Mike Hillberg's Blog on Wpf and Silverlight

Browse by Tags

Tagged Content List
  • Blog Post: 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 plan for a movie. In any case, just...
  • Blog Post: 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 with this Xaml: < Rectangle Width ="300...
  • Blog Post: 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 of this scenario in .Net today shows...
  • Blog Post: 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”, so that I don’t get confused with WPF element...
  • Blog Post: 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 = paragraph1.testing ' >...
  • Blog Post: 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 the Customer object, does the Address object...
  • Blog Post: Limited generics support in Xaml

    In a post to the WPF forum, Zhou Yong had the idea to use a MarkupExtension to make it possible to create a generic dictionary (Dictionary<K,V>) from Xaml. It’s a cool idea, so I played with it a bit, with the result shown below. The end result is that you can do the following, for example, where...
  • Blog Post: Xaml Inspired Markup

    A lot has been written about how Xaml maps tags and attributes to objects and properties. (Here’s a standard Xaml overview .) But it’s not necessary that Xaml actually be used to create .Net objects. For example, XPS is markup that can be treated like Xaml and used to create/initialize objects, but it...
  • Blog Post: 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. It’s frequently easy for XamlWriter to convert an object into a good Xaml representation. Sometimes, though...
Page 1 of 1 (9 items)