<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Unni's Blog : Databinding</title><link>http://blogs.msdn.com/unnir/archive/tags/Databinding/default.aspx</link><description>Tags: Databinding</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Introducing sample data for Developers</title><link>http://blogs.msdn.com/unnir/archive/2009/07/12/introducing-sample-data-for-developers.aspx</link><pubDate>Sun, 12 Jul 2009 22:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9830529</guid><dc:creator>unnir</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/unnir/comments/9830529.aspx</comments><wfw:commentRss>http://blogs.msdn.com/unnir/commentrss.aspx?PostID=9830529</wfw:commentRss><description>&lt;P mce_keep="true"&gt;&lt;FONT size=3 face=Calibri&gt;Blend 3 brings to the table really sophisticated support for sample data, enabiling better designability of your applications. In my previous &lt;A href="http://blogs.msdn.com/unnir/archive/2009/03/18/introducing-sample-data-support-in-blend-3.aspx" mce_href="http://blogs.msdn.com/unnir/archive/2009/03/18/introducing-sample-data-support-in-blend-3.aspx"&gt;post&lt;/A&gt;, I demonstrated how designers could leverage this feature to prototype data connected applications inside Blend . However, for really sophisticated applications, richer support&amp;nbsp;might be&amp;nbsp;desirable - for example, you might want to use your own custom types for sample data in the cases where you cannot re-create the schema from scratch using the primitives that we provide.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT size=3 face=Calibri&gt;Here is a small example that will help you get started on a feature that we just introduced in recently available Blend 3 build – we call this feature “design data”. This feature allows developers to enable designers to be more productive inside Blend for practical LOB applications where there is a clear separation between model and view, and where you can’t use the Blend sample data feature as your UI might depend on your custom business objects (for example, think typed data templates in WPF).&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;&lt;A href="http://cid-99b45ff02d12b84d.skydrive.live.com/self.aspx/Public/Downloads/DesignDataSample.zip" mce_href="http://cid-99b45ff02d12b84d.skydrive.live.com/self.aspx/Public/Downloads/DesignDataSample.zip"&gt;Design Data Sample&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Let us take a quick tour of this example, and see how things work behind the covers:&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;ShoppingCart.cs defines a data structure that we are trying to visualize in ShoppingCartView.xaml. The type ShoppingCart does not have a public constructor, neither does ShoppingCartItem. Similarly, ShoppingCart has a read-only property ItemsCount. These kinds of limitations are extremely common in real-world data structures (and is being demonstrated here to show how our system handles these limitations just fine, without requiring your to make changes to your run-time code)&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;The sample data for ShoppingCartView.xaml is defined in ShoppingCartSampleData.xaml, which is included with a special build item type in the project file: &amp;lt;DesignData Include="ShoppingCartSampleData.xaml" /&amp;gt;. This ensures that you&lt;FONT color=#1f497d&gt; don't &lt;/FONT&gt;pay any&amp;nbsp;run-time penalties for enabling this design-time only feature.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;BR&gt;&lt;FONT size=3 face=Calibri&gt;The contents of ShoppingCartSampleData.xaml look like following:&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;local&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;ShoppingCart&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt;local&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="clr-namespace:DesignDataSample;assembly=DesignDataSample"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"&gt; &lt;FONT color=#ff0000&gt;ItemCount&lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="22"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;local&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;ShoppingCart.Items&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;local&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;ShoppingCartItem&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt; ItemName&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="Book Name 1"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt; ItemDescription&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="A very nice book!"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt; ItemImage&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="/DesignDataSample;component/MySampleDataImages/Tree.jpg"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;local&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;ShoppingCart.Items&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;local&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;ShoppingCart&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;There are a few things to note about the contents of this file:&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraph&gt;&lt;SPAN style="mso-fareast-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3 face=Calibri&gt;a)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3 face=Calibri&gt;While the format is XAML, we have relaxed the specification quite a bit. You are allowed to specify a value for the read only property (ShoppingCart.ItemCount, ShoppingCartItem.ItemName), as well as initialize objects that don’t have public constructors (ShoppingCart, ShoppingCartItem). Blend creates on the fly types which look like user types. You could choose to prevent reflection (in which case, what you can specify in XAML is severely restricted) by specifyin&lt;SPAN style="COLOR: #1f497d"&gt;g&lt;/SPAN&gt; &amp;lt;IsDesignTimeCreatable&amp;gt;true&amp;lt;/IsDesignTimeCreatable&amp;gt; in the project file for the sample data XAML item.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraph&gt;&lt;SPAN style="mso-fareast-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3 face=Calibri&gt;b)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3 face=Calibri&gt;You can specify any platform type like Brushes, ImageSource, Uri, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraph&gt;&lt;SPAN style="mso-fareast-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3 face=Calibri&gt;c)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3 face=Calibri&gt;You get full intellisense in Blend for typing this XAML.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;In ShoppingCartView.xaml, we then hookup the sample data like so:&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;Grid&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt; x&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="LayoutRoot"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt; &lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;&lt;STRONG&gt;d&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: red; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;DataContext&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;="{&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: #a31515; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;d&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: #a31515; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;DesignData&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: red; FONT-SIZE: 10pt; mso-highlight: yellow"&gt; Source&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;=ShoppingCartSampleData.xaml}"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt; Background&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="#FFB2B2B2"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;For WPF projects, if your XAML was using typed data templates, you need to add the following attribute to those typed data templates to get picked up automatically, if you were using the reflection based sample data types and you wanted a good design experience.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt"&gt;DataTemplate &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt;x&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: red; FONT-SIZE: 10pt"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;="{local:Foo}"&lt;/SPAN&gt; &lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000 size=2 face="Courier New"&gt;d&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: red; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;IsDesignTimeCreatable&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt; mso-highlight: yellow"&gt;="False"&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;This particular sample data feature will also be supported in VS 2010. As always, please don't hesitate to ask for further clarifications, and I really value your feedback on how we could make this feature more useful for you.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9830529" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/unnir/archive/tags/Blend+3/default.aspx">Blend 3</category><category domain="http://blogs.msdn.com/unnir/archive/tags/Databinding/default.aspx">Databinding</category><category domain="http://blogs.msdn.com/unnir/archive/tags/Sample+Data/default.aspx">Sample Data</category></item><item><title>DataGrid support in Blend 3</title><link>http://blogs.msdn.com/unnir/archive/2009/03/19/datagrid-support-in-blend-3.aspx</link><pubDate>Thu, 19 Mar 2009 22:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9490994</guid><dc:creator>unnir</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/unnir/comments/9490994.aspx</comments><wfw:commentRss>http://blogs.msdn.com/unnir/commentrss.aspx?PostID=9490994</wfw:commentRss><description>&lt;P&gt;Blend 3 adds really cool support for the DataGrid control&amp;nbsp;(for both Silverlight 3 and &lt;A class="" href="http://www.codeplex.com/wpf" mce_href="http://www.codeplex.com/wpf"&gt;WPF Toolkit&lt;/A&gt;). Here is a quick demo to help you get started. Enjoy!&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a new Silverlight 3 application&lt;/LI&gt;
&lt;LI&gt;Search and instantiate the DataGrid control from the asset library. (As a side, this also demonstrates the newly added support for having custom controls in the Blend asset library - instantiating a custom control adds the necessary assembly references to the project, in this case System.Windows.Controls.Data.dll for Silverlight)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid1.jpg" mce_src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid1.jpg"&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a data source that has a collection, with one or more properties. (You can easily do this using the new &lt;A class="" href="http://blogs.msdn.com/unnir/archive/2009/03/18/introducing-sample-data-support-in-blend-3.aspx" mce_href="http://blogs.msdn.com/unnir/archive/2009/03/18/introducing-sample-data-support-in-blend-3.aspx"&gt;sample data features&lt;/A&gt; in Blend).&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid2.jpg" mce_src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid2.jpg"&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Drag and drop the collection onto the DataGrid - its that simple! Blend will automatically generate the right kind of columns for the various properties in the collection. (&lt;STRONG&gt;TIP&lt;/STRONG&gt;: You can select indiviual properties using Shift+Select if you did not want a column for each property in the collection. You can even add the columns individually by dragging and dropping each property onto the DataGrid. Your can right click on the DataGrid to add new columns if you wanted to go that route.)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid3.jpg" mce_src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid3.jpg"&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Select a DataGrid column (the one that corresponds to the Image column), right click on the column, and edit the CellTemplate. You can now edit this template just like you would any other template. (&lt;STRONG&gt;TIP&lt;/STRONG&gt;: The properties of the DataGrid columns are also available for manipulation via the property grid).&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid4.jpg" mce_src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid4.jpg"&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid5.jpg" mce_src="http://home.comcast.net/~unnir/images/DataGrid/DataGrid5.jpg"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9490994" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/unnir/archive/tags/Blend+3/default.aspx">Blend 3</category><category domain="http://blogs.msdn.com/unnir/archive/tags/Databinding/default.aspx">Databinding</category></item><item><title>Introducing sample data support in Blend 3</title><link>http://blogs.msdn.com/unnir/archive/2009/03/18/introducing-sample-data-support-in-blend-3.aspx</link><pubDate>Thu, 19 Mar 2009 04:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9488742</guid><dc:creator>unnir</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/unnir/comments/9488742.aspx</comments><wfw:commentRss>http://blogs.msdn.com/unnir/commentrss.aspx?PostID=9488742</wfw:commentRss><description>&lt;P&gt;To help you walk thru some of support we have added for sample data inside Blend 3, I wrote a hands-on-lab that takes you thru the basic&amp;nbsp;experience of building a simple&amp;nbsp;master/detail visualization. While there are a lot more scenarios that are possible&amp;nbsp;with the&amp;nbsp;support for sample data&amp;nbsp;in Blend 3 (some of which are not available in the public preview build, and I will in write in detail about over the next few days), you can get a first-hand experience here for the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A schema designer that allows you to quickly mockup a data source and supply values for the data&lt;/LI&gt;
&lt;LI&gt;Improved drag/drop experience to create bindings&lt;/LI&gt;
&lt;LI&gt;Master/Detail support in Blend 3&lt;/LI&gt;
&lt;LI&gt;Sample data that can be enabled/disabled when the application is running&lt;/LI&gt;
&lt;LI&gt;Optionally, if you are developer and are interested in knowing more about how things work behind the covers&amp;nbsp;so you could&amp;nbsp;adapt this for your scenarios, this can be a good starting point.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Download the hands-on-lab document &lt;A class="" href="http://home.comcast.net/~unnir/samples/SampleData.docx" mce_href="http://home.comcast.net/~unnir/samples/SampleData.docx"&gt;here&lt;/A&gt;&amp;nbsp;(because of the ISP that I use for hosting these files, you will have to rename this .zip file to .docx), and the starting project (to save you some time with the graphics, styling, and layout) &lt;A class="" href="http://home.comcast.net/~unnir/samples/AlbumsView_Start.zip" mce_href="http://home.comcast.net/~unnir/samples/AlbumsView_Start.zip"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://home.comcast.net/~unnir/images/SampleData.jpg" mce_src="http://home.comcast.net/~unnir/images/SampleData.jpg"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9488742" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/unnir/archive/tags/Blend+3/default.aspx">Blend 3</category><category domain="http://blogs.msdn.com/unnir/archive/tags/Databinding/default.aspx">Databinding</category></item></channel></rss>