Rob Relyea

xaml:Blog

Short Video showing basic XAML and Databinding

David Betz posts a nice video demo of some basic Databinding in XAML.

Few notes that I took about the demo:

1) The color capture of the video didn't make the gradient look very good.  Very banded.  Yes, it wasn't going to look much prettier...but at least the gradient will look a bit smoother.

2) David was using a build previous to the Feb CTP...one major difference in Feb CTP would be that you wouldn't need the Mapping PI that he used...instead you would just use:

   xmlns:nwcollection="clr-namespace:Northwind.DAL.CollectionClasses;assembly=Northwind.DAL"

3) David hacks on his object to make it available declaratively.  He adds a property.  (note, he could have used attribute syntax for that property...instead of Property Element syntax like he does).  In order to make an object be expressable in XAML, do the following:

   a) make it have a default constructor.
   b) make its state settable via properties only.

 

For more on WPF databinding, I can recommend:

Namita Gupta's PDC talk (September 2005)
Beatriz Costa - a WPF team member blogging on Databinding.

Enjoy!

Posted on Mar 26 2006, 08:21 PM by rrelyea
Filed under:
PostTypeIcon
5,671 Views

Comments

    No Comments