<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Brandontruong's Weblog &#187; Silverlight</title>
	<atom:link href="http://brandontruong.wordpress.com/category/silverlight/feed/" rel="self" type="application/rss+xml" />
	<link>http://brandontruong.wordpress.com</link>
	<description>Brandon Truong, Web developer, Jquery, Ajax, Igniter, Silverlight</description>
	<lastBuildDate>Sun, 30 Aug 2009 11:49:28 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='brandontruong.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/ba260271a39f91bd7e7e5ef197471af6?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Brandontruong's Weblog &#187; Silverlight</title>
		<link>http://brandontruong.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://brandontruong.wordpress.com/osd.xml" title="Brandontruong&#8217;s Weblog" />
		<item>
		<title>Default Focus Behavior</title>
		<link>http://brandontruong.wordpress.com/2009/08/30/default-focus-behavior/</link>
		<comments>http://brandontruong.wordpress.com/2009/08/30/default-focus-behavior/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 11:27:35 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Behaviors]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/?p=78</guid>
		<description><![CDATA[I would love to share with you guys about Default Focus Behavior which I just created an hour ago because I thought this behavior would be very handy.
With this behavior, we would be able to set focus to any controls when we trigger any control events.
For example, whenever we click the button, we want to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=78&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I would love to share with you guys about Default Focus Behavior which I just created an hour ago because I thought this behavior would be very handy.</p>
<p>With this behavior, we would be able to set focus to any controls when we trigger any control events.</p>
<p>For example, <span style="color:#000000;"><span style="text-decoration:underline;"><strong>whenever </strong></span></span>we click the button, we want to textbox got focused, or when we select the Option 1 for the very <span style="color:#000000;"><span style="text-decoration:underline;"><strong>first time</strong></span></span>, the textbox will get focused as below image.</p>
<p><img style="border:0 initial initial;" title="defaultfocusbehavior_demo" src="http://brandontruong.files.wordpress.com/2009/08/defaultfocusbehavior_demo1.gif?w=315&#038;h=89" alt="defaultfocusbehavior_demo" width="315" height="89" /></p>
<p>To set the focus for a control only once, all we have to do is set</p>
<p><span style="color:#ff0000;">IsOnceOff </span><span style="color:#3366ff;">= &#8220;True&#8221;</span></p>
<p>Click the icon below for the source code, so you can have a play with it</p>
<p><a href="http://cid-a76b6cd2cfd87d30.skydrive.live.com/self.aspx/Public/DefaultFocusBehavior.zip"><img class="alignnone" title="Source Code Icon" src="http://msc.wlxrs.com/lQNgXBQYoayUK1wMOhAgVw/images/icons/Large/Zip.png" alt="" width="93" height="96" /></a></p>
<p>Hopes this helpful <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=78&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/08/30/default-focus-behavior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://brandontruong.files.wordpress.com/2009/08/defaultfocusbehavior_demo1.gif" medium="image">
			<media:title type="html">defaultfocusbehavior_demo</media:title>
		</media:content>

		<media:content url="http://msc.wlxrs.com/lQNgXBQYoayUK1wMOhAgVw/images/icons/Large/Zip.png" medium="image">
			<media:title type="html">Source Code Icon</media:title>
		</media:content>
	</item>
		<item>
		<title>TextWraping in Silverlight</title>
		<link>http://brandontruong.wordpress.com/2009/08/29/textwraping-in-silverlight/</link>
		<comments>http://brandontruong.wordpress.com/2009/08/29/textwraping-in-silverlight/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 00:00:41 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[TextBox]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/2009/08/29/textwraping-in-silverlight/</guid>
		<description><![CDATA[Just a little thing I came across when I am trying to set TextWraping property for a TextBox, but the text doesn&#8217;t seem to be wrapped. Then I realized if the TextBox is setting with TextWraping greater than 1, the text won&#8217;t be wrapped. Just a little thing to keep in mind  

  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=74&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just a little thing I came across when I am trying to set <span style="color:#ff0000;">TextWraping</span> property for a <span style="color:#000099;">TextBox</span>, but the text doesn&#8217;t seem to be wrapped. Then I realized if the <span style="color:#000099;">TextBox </span>is setting with <span style="color:#ff0000;">TextWraping </span>greater than 1, the text won&#8217;t be wrapped. Just a little thing to keep in mind <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=c6b044ac-b44a-81dd-bf65-f1018e71ee77" alt="" /></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=74&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/08/29/textwraping-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=c6b044ac-b44a-81dd-bf65-f1018e71ee77" medium="image" />
	</item>
		<item>
		<title>Datagrid Missing Binding Error</title>
		<link>http://brandontruong.wordpress.com/2009/08/20/datagrid-missing-binding-error/</link>
		<comments>http://brandontruong.wordpress.com/2009/08/20/datagrid-missing-binding-error/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 12:54:12 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/?p=68</guid>
		<description><![CDATA[I have run into this silly mistake, and it took me 2 hours to figure it out  
I  am writing it down here for my own reference, and if you ever ran into this problem, hope that this can help you fix your problem quickly.
The problem is I had a datagrid column with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=68&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have run into this silly mistake, and it took me 2 hours to figure it out <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I  am writing it down here for my own reference, and if you ever ran into this problem, hope that this can help you fix your problem quickly.</p>
<p>The problem is I had a datagrid column with the Header but not the Binding, for example</p>
<p><span style="color:#ff0000;">&lt;data:DataGridTextColumn Header=&#8221;MyProperty&#8221; /&gt;</span></p>
<p>This will cause the below error at <span class="zem_slink">runtime</span></p>
<p><img class="alignnone size-full wp-image-69" title="Datagrid Missing Binding Error" src="http://brandontruong.files.wordpress.com/2009/08/error.gif?w=634&#038;h=437" alt="Datagrid Missing Binding Error" width="634" height="437" /></p>
<p>To fix it, all I had to do is to put the Binding in it</p>
<p><span style="color:#ff0000;">&lt;data:DataGridTextColumn Header=&#8221;MyProperty&#8221; Binding={Binding MyProperty} /&gt;</span></p>
<p><span style="color:#ff0000;"> </span></p>
<p>Hope this helps</p>
<div class="zemanta-pixie" style="margin-top:10px;height:15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/acf386e2-110e-4d7d-bb6c-3b035a15b8aa/"><img class="zemanta-pixie-img" style="border:medium none;float:right;" src="http://img.zemanta.com/reblog_e.png?x-id=acf386e2-110e-4d7d-bb6c-3b035a15b8aa" alt="Reblog this post [with Zemanta]" /></a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=68&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/08/20/datagrid-missing-binding-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://brandontruong.files.wordpress.com/2009/08/error.gif" medium="image">
			<media:title type="html">Datagrid Missing Binding Error</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/reblog_e.png?x-id=acf386e2-110e-4d7d-bb6c-3b035a15b8aa" medium="image">
			<media:title type="html">Reblog this post [with Zemanta]</media:title>
		</media:content>
	</item>
		<item>
		<title>UpperCase Behavior</title>
		<link>http://brandontruong.wordpress.com/2009/08/17/uppercase-behavior/</link>
		<comments>http://brandontruong.wordpress.com/2009/08/17/uppercase-behavior/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 11:13:54 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/?p=63</guid>
		<description><![CDATA[I was asked to create a TextBox input which has only UpperCase letters. After a bit of research, I have found this article which has inspired me to come up with this solution. As we all know that Behavior is a cool stuff in Silverlight 3, so I decided to use the concept from that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=63&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was asked to create a TextBox input which has only UpperCase letters. After a bit of research, I have found <a href="http://janrep.blog.codeplant.net/Silverlight-UpperCase-TextBox-Control.aspx">this article</a> which has inspired me to come up with this solution. As we all know that Behavior is a cool stuff in Silverlight 3, so I decided to use the concept from that article and create a Behavior which detects all the key and uppercase it. Feel free to download the source code and have a play with it.</p>
<p><img style="max-width:800px;" src="http://brandontruong.site90.net/wp-content/uploads/2009/08/SCREENSHOT.gif" alt="" /></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=d4b5e574-23cc-8d2c-9202-e87c9fb4659d" alt="" /></div>
<div class="zemanta-pixie"><a href="http://cid-a76b6cd2cfd87d30.skydrive.live.com/self.aspx/Public/SilverlightApplication1.zip"><img class="zemanta-pixie-img" src="http://msc.wlxrs.com/lQNgXBQYoayUK1wMOhAgVw/images/icons/Large/Zip.png" alt="" /></a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=63&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/08/17/uppercase-behavior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://brandontruong.site90.net/wp-content/uploads/2009/08/SCREENSHOT.gif" medium="image" />

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=d4b5e574-23cc-8d2c-9202-e87c9fb4659d" medium="image" />

		<media:content url="http://msc.wlxrs.com/lQNgXBQYoayUK1wMOhAgVw/images/icons/Large/Zip.png" medium="image" />
	</item>
		<item>
		<title>FocusManager</title>
		<link>http://brandontruong.wordpress.com/2009/06/17/61/</link>
		<comments>http://brandontruong.wordpress.com/2009/06/17/61/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:11:25 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/2009/06/17/61/</guid>
		<description><![CDATA[I&#8217;ve read this article about FocusManager. I think it could come handy sometimes when you want to know what element has focus. FocusManager class which can be found in the System.Windows.Input namespace.   Below is the sample of how to use itThe FocusManager class has only one static method:
&#60;span class="kwrd"&#62;public&#60;/span&#62; &#60;span class="kwrd"&#62;static&#60;/span&#62; Object GetFocusedElement();
Using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=61&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>I&#8217;ve read this <a href="http://geekswithblogs.net/tkokke/archive/2009/06/16/silverbullet-3---system.windows.input.focusmanager.aspx">article</a> about <strong><span style="color:#800000;">FocusManager</span></strong>. I think it could come handy sometimes when you want to know what element has focus. <a href="http://msdn.microsoft.com/en-us/library/system.windows.input.focusmanager%28VS.95%29.aspx" target="_blank">FocusManager</a> class which can be found in the<strong><span style="color:#800000;"> System.Windows.Input</span></strong> namespace.   Below is the sample of how to use itThe <strong><span style="color:#800000;">FocusManager </span></strong>class has only one static method:</p>
<pre class="csharpcode">&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Object GetFocusedElement();</pre>
<p>Using the <strong><span style="color:#800000;">FocusManager</span></strong> is easy. Here’s a small example of a possible usage:</p>
<pre class="csharpcode"><span style="color:#0000ff;">var</span> focusedElement = <span style="color:#008080;">FocusManager</span>.GetFocusedElement() <span class="kwrd">as</span> <span style="color:#008080;">Control</span>;
<span class="kwrd">if</span> (focusedElement != <span class="kwrd">null</span>)
    Output.Text = focusedElement.Name;</pre>
<div>
<p>One last note: The <strong><span style="color:#800000;">FocusManager</span></strong> class is also available in the “normal” .NET Framework 3.0 or later.</div>
</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=61&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/06/17/61/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>
	</item>
		<item>
		<title>Binding for Converter Parameter</title>
		<link>http://brandontruong.wordpress.com/2009/06/09/binding-for-converter/</link>
		<comments>http://brandontruong.wordpress.com/2009/06/09/binding-for-converter/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 05:01:52 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/2009/06/09/binding-for-converter/</guid>
		<description><![CDATA[I have come across the situation where I need to do some Binding for ConverterParameter. Something like

I have done lots of research, and I found out that its impossible to do binding for ConverterParameter.
So I came up with the Solution. I created the Converter but inherited from FrameworkElement
public class ShowDeleteServiceConverter : FrameworkElement, IValueConverter
In the converter [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=57&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have come across the situation where I need to do some Binding for ConverterParameter. Something like<br />
<img style="max-width:800px;" src="http://brandontruong.files.wordpress.com/2009/06/1.gif" alt="" /></p>
<p>I have done lots of research, and I found out that its impossible to do binding for ConverterParameter.<br />
So I came up with the Solution. I created the Converter but inherited from FrameworkElement</p>
<p><strong><em>public class ShowDeleteServiceConverter : <span style="color:#ff0000;">FrameworkElement, </span>IValueConverter</em></strong></p>
<p><strong><em></em></strong>In the converter class, I created a dependency property</p>
<p><img style="max-width:800px;" src="http://brandontruong.files.wordpress.com/2009/06/2.gif" alt="" /></p>
<p>Now, I can do the Binding as usual<br />
<img style="max-width:800px;" src="http://brandontruong.files.wordpress.com/2009/06/32.gif" alt="" width="848" height="105" /><br />
And</p>
<p><img style="max-width:800px;" src="http://brandontruong.files.wordpress.com/2009/06/4.gif" alt="" /></p>
<p>It might not be the best solution, but it works for me so far. If you have any idea, feel free to drop me comments.</p>
<p>Cheers,</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=57&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/06/09/binding-for-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://brandontruong.files.wordpress.com/2009/06/1.gif" medium="image" />

		<media:content url="http://brandontruong.files.wordpress.com/2009/06/2.gif" medium="image" />

		<media:content url="http://brandontruong.files.wordpress.com/2009/06/32.gif" medium="image" />

		<media:content url="http://brandontruong.files.wordpress.com/2009/06/4.gif" medium="image" />
	</item>
		<item>
		<title>How to Change the Startup Class</title>
		<link>http://brandontruong.wordpress.com/2009/01/26/how-to-change-the-startup-class/</link>
		<comments>http://brandontruong.wordpress.com/2009/01/26/how-to-change-the-startup-class/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 00:24:27 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/2009/01/26/how-to-change-the-startup-class/</guid>
		<description><![CDATA[Another great tip from Mike Snow. Read the original article here
When a Silverlight application is launched the entry point is a class that inherits from System.Windows.Application. By default, when you create a new Silverlight application project, this would be your App class which gets defined in App.xaml.cs. You can, however, change which startup class you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=44&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Another great tip from Mike Snow. Read the original article <a href="http://silverlight.net/blogs/msnow/archive/2009/01/23/silverlight-tip-of-the-day-87-how-to-change-the-startup-class.aspx">here</a></p>
<p>When a Silverlight application is launched the entry point is a class that inherits from System.Windows.Application. By default, when you create a new Silverlight application project, this would be your App class which gets defined in App.xaml.cs. You can, however, change which startup class you want to use. In fact, if you do not plan to use XAML at all you can reduce the size of your application by deleting the Page and App classes including the XAML and code behind files.</p>
<p>To accomplish this follow these steps:</p>
<p><strong>Step 1.</strong> Create a new Silverlight application project adding a new ASP.net web project to host the Silverlight app.</p>
<p><strong>Step 2.</strong> Delete App.xaml and Page.xaml (the CS files will be deleted also).</p>
<p><strong>Step 3.</strong> Create a new class and call it StartupTest.cs</p>
<p><strong>Step 4.</strong> Modify your new class to inherit from Application as seen here:</p>
<div style="border:1px solid gray;overflow:auto;font-size:8pt;width:97.5%;cursor:text;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> StartupTest : Application</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">{</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    <span style="color:#0000ff;">public</span> StartupTest()</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    {</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    }</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">}</pre>
</div>
</div>
<p><strong>Step 5. </strong>Right click on your Silverlight application project in the Solution Explorer of VS. From the context menu choose Properties. This will bring up the Properties dialog. Click on the Silverlight tab at the top-left and change the Startup object to be your class as seen circled here:  <a href="http://silverlight.net/blogs/msnow/image_BPu5ZQ.png"><img style="border-width:0;" title="image" src="http://silverlight.net/blogs/msnow/image_thumb_Vw7zMw.png" border="0" alt="image" width="691" height="390" /></a></p>
<p><strong>Step 6.</strong> Go back to your StartupTest class. Add an event to monitor for when the application has started. You don’t want to do anything until after this event has started.</p>
<div style="border:1px solid gray;overflow:auto;font-size:8pt;width:97.5%;cursor:text;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> StartupTest : Application</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">{</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    <span style="color:#0000ff;">public</span> StartupTest()</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    {</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">        <span style="color:#0000ff;">this</span>.Startup += <span style="color:#0000ff;">new</span> StartupEventHandler(StartupTest_Startup);</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    }</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    <span style="color:#0000ff;">void</span> StartupTest_Startup(<span style="color:#0000ff;">object</span> sender, StartupEventArgs e)</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    {</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    }</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">}</pre>
</div>
</div>
<p><strong>Step 7.</strong> The Application.RootVisual is root pointer to the main application UI. You will need to create this object to point an object such as a Grid or Canvas control. Once created, you can add additional controls to the children as you see fit. In the example below, I have created a Canvas as the root and configured its background color to be black, its width to be 800 and height to be 600. Also, I have added a Textbox to the Canvas control.</p>
<div style="border:1px solid gray;overflow:auto;font-size:8pt;width:97.5%;cursor:text;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#0000ff;">void</span> StartupTest_Startup(<span style="color:#0000ff;">object</span> sender, StartupEventArgs e)</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">{</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    <span style="color:#0000ff;">this</span>.RootVisual = <span style="color:#0000ff;">new</span> Canvas();</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    ((Canvas)<span style="color:#0000ff;">this</span>.RootVisual).Width = 800;</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    ((Canvas)<span style="color:#0000ff;">this</span>.RootVisual).Height = 600;</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    ((Canvas)<span style="color:#0000ff;">this</span>.RootVisual).Background = <span style="color:#0000ff;">new</span> SolidColorBrush(Colors.Black);</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    TextBlock tb = <span style="color:#0000ff;">new</span> TextBlock();</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    tb.Foreground = <span style="color:#0000ff;">new</span> SolidColorBrush(Colors.White);</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">    tb.FontSize = 20;</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    tb.Text = <span style="color:#006080;">"NO XAML NEEDED!!!"</span>;</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;">    ((Canvas)<span style="color:#0000ff;">this</span>.RootVisual).Children.Add(tb);</pre>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,'Courier New',courier,monospace;background-color:white;border-style:none;margin:0;padding:0;">}</pre>
</div>
</div>
<p>Step 8. Run the application and you will see the following image rendered in your browser:  <a href="http://silverlight.net/blogs/msnow/image_kaH/ZQ.png"><img style="border:0 none;" title="image" src="http://silverlight.net/blogs/msnow/image_thumb_ta1/FA.png" border="0" alt="image" width="542" height="347" /></a> Technorati Tags: <a class="performancingtags" rel="tag" href="http://technorati.com/tag/Silverlight">Silverlight</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=44&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2009/01/26/how-to-change-the-startup-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/msnow/image_thumb_Vw7zMw.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/msnow/image_thumb_ta1/FA.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Using ReSharper with Silverlight</title>
		<link>http://brandontruong.wordpress.com/2008/12/02/using-resharper-with-silverlight/</link>
		<comments>http://brandontruong.wordpress.com/2008/12/02/using-resharper-with-silverlight/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 10:06:28 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/2008/12/02/using-resharper-with-silverlight/</guid>
		<description><![CDATA[I have found the article to show how to make use of ReSharper with Silverlight Apps. 
Click here to check out the original post. 
I have always known that the ReSharper is a great tool for developer productivity. But I have not got a chance to use it yet. If you haven&#8217;t already tried ReSharper, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=36&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div align="left">I have found the article to show how to make use of ReSharper with Silverlight Apps. </p>
<p>Click <a href="http://pagebrooks.com/archive/2008/12/01/using-resharper-with-silverlight.aspx">here</a> to check out the original post. </p>
<p>I have always known that the <a href="http://www.jetbrains.com/resharper" target="_blank">ReSharper</a> is a great tool for developer productivity. But I have not got a chance to use it yet. If you haven&#8217;t already tried ReSharper, you can download it <a href="http://www.jetbrains.com/resharper/download" target="_blank">here</a>. </p>
<p>Here is the main details of how to use ReSharper for Silverlight:</div>
<p>ReSharper has a great feature called Templates.&nbsp; Templates give you the ability to quickly generate code that you would generally need to write by hand.&nbsp; There are three different types of templates in ReSharper:</p>
<ul>
<li>Live Templates &#8211; Allow you to generate code within the context of an existing file. </li>
<li>Surround Templates &#8211; Allow you to &#8220;surround&#8221; selected code with a pre-defined template. </li>
<li>File Templates &#8211; Allow you to quickly generate an entire file from a pre-defined template. </li>
</ul>
<p>There are 4 templates that you can use in your Silverlight endeavors.&nbsp; Below you will find a short description of each:</p>
<p><strong>Dependency Property Generation</strong></p>
<p>As illustrated in the screen capture below, you simply type DependProp in the editor, supply a property name and type, then hit tab and you have a fully defined dependency property!</p>
<p>&nbsp;<img style="border-width:0;" alt="DependencyPropertyTemplate" src="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/DependencyPropertyTemplate.gif" border="0" height="692" width="676" /> </p>
<p><strong>Visual State Manager Block Template      <br /></strong>The Visual State Manager Block Template is similar in function to the Dependency Property template, but this template will build a VisualStateManager declaration within the context of an XAML file.&nbsp; To use the template, simply type <em>vsm</em> while editing an XML/XAML file.&nbsp; The usage for this template is very similar to the DependProp template.     </p>
<p><strong>Generic.xaml File Template      <br /></strong>As a Silverlight control developer, you may find it annoying to have to define the generic.xaml file over and over again.&nbsp; Using a File Template, we can quickly build standard declaration and ReSharper will help you fill out the rest. To generate a new Generic.xaml file, press ALT+R+N+G, enter a name for the template and then click OK.</p>
<p><img style="border-width:0;" alt="image" src="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/image.png" border="0" height="344" width="399" />&nbsp; </p>
<p><img style="border-width:0;" alt="image" src="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/image_3.png" border="0" height="113" width="326" />     </p>
<p><strong>Control File Template</strong>     <br />The Control File Template will construct a basic class that inherits from Control and includes the DefaultStyleKey in the constructor. The usage for this template is the same as the Generic.xaml file template above. </p>
<p><strong>Installing the Templates</strong>     <br />To import these templates, select the File Templates tab in the ReSharper Templates Explorer.&nbsp; Click the import button and select the SilverlightFileTemplates.xml file,then click ok.&nbsp; </p>
<p><img style="border-width:0;" alt="image" src="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/image_4.png" border="0" height="150" width="255" /> </p>
<p>Importing the Live Templates is very similar.&nbsp; Select the Live Templates tab in the ReSharper Templates Explorer.&nbsp; Click the import button select the SilverlightLiveTemplates.xml file, then click Ok.</p>
<p><strong></strong>You can download the templates here:     <br /><strong><a href="http://pagebrooks.com/files/source/silverlight/Silverlight_ReSharper_Templates.zip" target="_blank">Download Resharper Templates</a></strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=36&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2008/12/02/using-resharper-with-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/DependencyPropertyTemplate.gif" medium="image">
			<media:title type="html">DependencyPropertyTemplate</media:title>
		</media:content>

		<media:content url="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/image.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/image_3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://www.pagebrooks.com/images/UsingReSharperwithSilverlight_B68D/image_4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight Toolkit: Label</title>
		<link>http://brandontruong.wordpress.com/2008/11/01/silverlight-toolkit-label/</link>
		<comments>http://brandontruong.wordpress.com/2008/11/01/silverlight-toolkit-label/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 07:17:32 +0000</pubDate>
		<dc:creator>brandontruong</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://brandontruong.wordpress.com/2008/11/01/silverlight-toolkit-label/</guid>
		<description><![CDATA[Hi, I have found the awesome article from Justin-Josef Angel about LABEL the new silverlight control.
I guess that I could post it into my blog for my own reference and
might as well any one who has been reading my blogs by any chance.
Click here to see the original post from Justin-Josef Angel.
Thanks Justin for an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=34&subd=brandontruong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi, I have found the awesome article from <strong>Justin-Josef Angel</strong> about <strong>LABEL </strong>the new silverlight control.<br />
I guess that I could post it into my blog for my own reference and<br />
might as well any one who has been reading my blogs by any chance.</p>
<p>Click <a href="http://silverlight.net/blogs/justinangel/archive/2008/10/29/silverlight-toolkit-label.aspx" target="_blank">here </a>to see the original post from <strong>Justin-Josef Angel</strong>.</p>
<p>Thanks <strong>Justin </strong>for an awesome article <img class="wp-smiley" src="http://brandontruong.net23.net/wordpress/wp-includes/images/smilies/icon_smile.gif" alt=")" /></p>
<p><strong>Setup</strong></p>
<p>1. Create a new project.</p>
<p><img src="http://silverlight.net/blogs/justinangel/image_2DFFEF24.png" border="0" alt="image" width="508" height="334" /></p>
<p>2, Add a reference to the Silverlight Controls assembly (Microsoft.Windows.Controls.dll) which can be downloaded at <a href="http://codeplex.com/Silverlight">http://codeplex.com/Silverlight</a>.</p>
<p><img src="http://silverlight.net/blogs/justinangel/image_5C29C511.png" border="0" alt="image" width="297" height="439" /> <a href="http://silverlight.net/blogs/justinangel/image_4B621A63.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_480082BB.png" border="0" alt="image" width="571" height="431" /></a></p>
<p>3. Look under “Custom Controls” In the Blend Asset Library.</p>
<p><img src="http://silverlight.net/blogs/justinangel/image_00CAB6BC.png" border="0" alt="image" width="655" height="524" /></p>
<p>4. Add a Label to the Page.</p>
<p><img src="http://silverlight.net/blogs/justinangel/image_04C4DEC1.png" border="0" alt="image" width="607" height="180" /></p>
<p>And here’s the XAML we got:</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">UserControl</span></p>
<p style="margin:0;"><span style="color:red;"> xmlns</span><span style="color:blue;">=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”</span></p>
<p style="margin:0;"><span style="color:red;"> xmlns</span><span style="color:blue;">:</span><span style="color:red;">x</span><span style="color:blue;">=”http://schemas.microsoft.com/winfx/2006/xaml”</span></p>
<p style="margin:0;"><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Class</span><span style="color:blue;">=”SilverlightControlsNovember2008.Page”</span></p>
<p style="margin:0;"><span style="color:red;"> Width</span><span style="color:blue;">=”640″</span><span style="color:red;"> Height</span><span style="color:blue;">=”480″</span></p>
<p style="margin:0;"><span style="color:red;"> xmlns</span><span style="color:blue;">:</span><span style="color:red;">slctls</span><span style="color:blue;">=”clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls”&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Grid</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=”LayoutRoot”</span><span style="color:red;"> Background</span><span style="color:blue;">=”White”&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Left”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”98,179,0,220″</span><span style="color:red;"> Width</span><span style="color:blue;">=”148″</span><span style="color:red;"> Content</span><span style="color:blue;">=”Label”/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Grid</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">UserControl</span><span style="color:blue;">&gt;</span></p>
</div>
<p style="margin:0;">
</div>
<p><strong></strong></p>
<p><strong>Setting the content for Label</strong></p>
<p>One way of editing a Label’s content is double clicking on it.</p>
<p><img src="http://silverlight.net/blogs/justinangel/image_31D9CB8F.png" border="0" alt="image" width="569" height="397" /></p>
<p><img style="display:block;float:none;margin-left:auto;margin-right:auto;" src="http://silverlight.net/blogs/justinangel/image_2975F638.png" border="0" alt="image" width="156" height="109" /></p>
<p>And here’s the XAML we just got:</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Left”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”98,179,0,220″</span><span style="color:red;"> Width</span><span style="color:blue;">=”148″</span><span style="color:red;"> <strong>Content</strong></span><span style="color:blue;"><strong>=”Hello World!</strong>“/&gt;</span></p>
</div>
<div style="font-family:arial;">
<p>Another way is editing the <strong>Content</strong> property directly through the Blend Data pane:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_21EA86CB.png"><img style="display:inline;border-width:0;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_1C9BA01A.png" border="0" alt="image" width="571" height="368" /></a></div>
<p><strong>Changing the Label’s Border</strong></p>
<p>We can set the <strong>BorderBrush</strong> &amp; <strong>BorderThinckness</strong> properties for Label in order to change it’s border.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_1B57073B.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_171D09A9.png" border="0" alt="image" width="296" height="516" /></a></p>
<p>Let’s start by changing the <strong>BorderBrush</strong> to a SoliderColorBrush with a light grey color. Click on BorderBrush and select SolidColorBrush.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_67EB1E11.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_072DC4E5.png" border="0" alt="image" width="290" height="173" /></a> –&gt; <a href="http://silverlight.net/blogs/justinangel/image_545DBE70.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_5EAEE2D0.png" border="0" alt="image" width="281" height="173" /></a></p>
<p>Than we’ll select a light gray color.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_5DD67CE6.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_237B0705.png" border="0" alt="image" width="282" height="352" /></a></p>
<p>Next, we’ll change the <strong>BorderThickness</strong> to 1 on all sides.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_5B4D4B28.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_33A6CEFE.png" border="0" alt="image" width="281" height="128" /></a></p>
<p>And we can see our Label has a nice subtle light grey border around itself:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_67DAF844.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_527D42DC.png" border="0" alt="image" width="123" height="76" /></a></p>
<p>Here’s the XAML we just generated:</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Left”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”98,179,0,0″</span><span style="color:red;"> Width</span><span style="color:blue;">=”79″</span><span style="color:red;"> Content</span><span style="color:blue;">=”I am a Label!”</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Top”</span><span style="color:red;"> Height</span><span style="color:blue;">=”20″</span><span style="color:red;"> <strong>BorderBrush</strong></span><strong><span style="color:blue;">=”#FFC6C4C4″</span><span style="color:red;"> BorderThickness</span></strong><span style="color:blue;"><strong>=”1,1,1,1″</strong>/&gt;</span></p>
</div>
<p><strong>Changing Label’s Background and Foreground</strong></p>
<p>Let’s do what the title says!</p>
<p>In<br />
case you’re wondering TextBlock does not have a Background. So<br />
it’s a bit different than what we would have normally done with<br />
TextBlock.</p>
<p>We’ll select <strong>Background</strong> and set it to SolidColorBrush with the color Black.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_52110FE7.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_7153B6BA.png" border="0" alt="image" width="282" height="170" /></a> –&gt;<a href="http://silverlight.net/blogs/justinangel/image_10965D8E.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_2FD90461.png" border="0" alt="image" width="264" height="167" /></a></p>
<p><a href="http://silverlight.net/blogs/justinangel/image_43F220EA.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_62C894C8.png" border="0" alt="image" width="279" height="352" /></a></p>
<p>Next we’ll select the <strong>Foreground</strong> property and set it to SolidColorBrush with the color white.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_6CAD8633.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_675E9F82.png" border="0" alt="image" width="271" height="349" /></a> –&gt;<a href="http://silverlight.net/blogs/justinangel/image_0A3F6133.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_6FFEF80E.png" border="0" alt="image" width="270" height="344" /></a></p>
<p>here’s our Label:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_3CC2BEA5.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_3C568BB0.png" border="0" alt="image" width="99" height="40" /></a></p>
<p>And the xaml we generated:</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Left”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”98,179,0,0″</span><span style="color:red;"> Width</span><span style="color:blue;">=”79″</span><span style="color:red;"> Content</span><span style="color:blue;">=”I am a Label!”</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Top”</span><span style="color:red;"> Height</span><span style="color:blue;">=”20″</span><span style="color:red;"> BorderBrush</span><span style="color:blue;">=”#FFC6C4C4″</span><span style="color:red;"> BorderThickness</span><span style="color:blue;">=”1,1,1,1″</span><span style="color:red;"> <strong>Background</strong></span><strong><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> Foreground</span></strong><span style="color:blue;"><strong>=”#FFF5F3F3″/</strong>&gt;</span></p>
</div>
<p><strong>Changing the Label’s Template</strong></p>
<p>Let’s<br />
say we’re unhappy with the default border for out Text inside the<br />
Label. Through the power of templating we can change it.<br />
So let’s create a RadialLabelTemplate.</p>
<p>We’ll start of by adding a new label to form.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_02D37BB9.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_4D5AB993.png" border="0" alt="image" width="153" height="98" /></a></p>
<p>Than Right Click on it, select “Edit Control Parts(Template) –&gt; <strong>Create Empty…</strong>”.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_5AC0CC99.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_52C92A37.png" border="0" alt="image" width="354" height="419" /></a></p>
<p>We’ll change the Resource name to <em>RadialPanelTemplate</em>.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_63CD581A.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_10E244E9.png" border="0" alt="image" width="403" height="236" /></a></p>
<p>And here’s the drawing area of the new template:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_1DDC24FA.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_7C7C7F5D.png" border="0" alt="image" width="620" height="377" /></a></p>
<p>Let’s add the Ellipse for the radial background.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_4221097C.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_776A1BE1.png" border="0" alt="image" width="640" height="542" /></a></p>
<p align="center"><a href="http://silverlight.net/blogs/justinangel/image_15D45CCB.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_1C1B3359.png" border="0" alt="image" width="226" height="96" /></a></p>
<p>Now<br />
we want to add a TextBlock to display the content of the Label. Before<br />
we can do that, we’ll need to add a container that will contain<br />
both our Ellipse and our TextBlock. We’ll Group our Ellipse into<br />
a Canvas.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_5F8334BB.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_53151192.png" border="0" alt="image" width="574" height="400" /></a></p>
<p><a href="http://silverlight.net/blogs/justinangel/image_3CDEF640.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_5C219D13.png" border="0" alt="image" width="258" height="176" /></a></p>
<p>Finally we can add our TextBlock that has the Label Content.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_2951969F.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_55FA5078.png" border="0" alt="image" width="608" height="325" /></a></p>
<p align="center"><a href="http://silverlight.net/blogs/justinangel/image_6DB187DE.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_0CF42EB2.png" border="0" alt="image" width="285" height="139" /></a></p>
<p>We’ll<br />
use TemplateBinding to connect this TextBlock.Text to the Label.Content<br />
property. Click the “Advanced Options” next to the Text<br />
property.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_4532A5CA.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_4B0D4963.png" border="0" alt="image" width="579" height="288" /></a></p>
<p>Select “Custom Expression”.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_22FA9A44.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_500F8712.png" border="0" alt="image" width="280" height="328" /></a></p>
<p>And put in the correct TemplateBinding.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_6832F16D.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_6E79C7FB.png" border="0" alt="image" width="303" height="117" /></a></p>
<p>To preview our form we can go back to our form.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_31E1C95E.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_70671704.png" border="0" alt="image" width="468" height="459" /></a></p>
<p>And here it is:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_15F09466.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_1C376AF4.png" border="0" alt="image" width="303" height="180" /></a></p>
<p>Now we can we add 3 more label to our page and just apply this new template to them.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_7490EEC9.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_13D3959D.png" border="0" alt="image" width="300" height="270" /></a></p>
<p>We’ll<br />
select each of our new Labels, Right click, select “Edit Control<br />
Parts (Template) –&gt; Apply Resource –&gt; Radial Label<br />
Template”.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_33163C70.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_51ECB04E.png" border="0" alt="image" width="535" height="401" /></a> -</p>
<p>And here’s our new form:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_70C3242C.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_2D97A5FF.png" border="0" alt="image" width="659" height="435" /></a></p>
<p>Here’s the XAML we just generated for the RadialLabelTemplate:</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">UserControl.Resources</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span> <strong>&lt;</strong></span><strong><span style="color:#a31515;">ControlTemplate</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span>Key=”RadialLabelTemplate”</span></strong><span style="color:red;"> TargetType</span><span style="color:blue;">=”slctls:Label”&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Canvas</span><span style="color:red;"> Height</span><span style="color:blue;">=”Auto”</span><span style="color:red;"> Width</span><span style="color:blue;">=”Auto”&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Ellipse</span><span style="color:red;"> Height</span><span style="color:blue;">=”35″</span><span style="color:red;"> Width</span><span style="color:blue;">=”125″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">TextBlock</span><span style="color:red;"> Height</span><span style="color:blue;">=”20″</span><span style="color:red;"> Width</span><span style="color:blue;">=”82.667″</span><span style="color:red;"> Canvas.Left</span><span style="color:blue;">=”22.667″</span><span style="color:red;"> Canvas.Top</span><span style="color:blue;">=”7.333″</span><span style="color:red;"> <strong>Text</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">TemplateBinding</span><span style="color:red;"> Content</span><span style="color:blue;">}”</span></strong><span style="color:red;"> TextWrapping</span><span style="color:blue;">=”Wrap”/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Canvas</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">ControlTemplate</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">UserControl.Resources</span><span style="color:blue;">&gt;</span></p>
</div>
<p>And the Xaml for our labels:</p>
<p style="margin:0;">
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> <strong>Template</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> RadialLabelTemplate</span><span style="color:blue;">}” </span></strong><span style="color:red;">Content</span><span style="color:blue;">=”Radial Label!”</span><span style="color:red;"> Width</span><span style="color:blue;">=”124″</span><span style="color:red;"> </span><span style="color:red;"> Height</span><span style="color:blue;">=”34″/&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label <span style="color:red;"><strong>Template</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> RadialLabelTemplate</span></strong><span style="color:blue;"><strong>}”</strong></span></span><span style="color:red;"> Height</span><span style="color:blue;">=”19.333″</span><span style="color:red;"> Content</span><span style="color:blue;">=”Radial  == good”</span><span style="color:red;"> FontSize</span><span style="color:blue;">=”10″/&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label <span style="color:red;"><strong>Template</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> RadialLabelTemplate</span></strong><span style="color:blue;"><strong>}”</strong></span></span><span style="color:red;"> Height</span><span style="color:blue;">=”29.333″ </span><span style="color:red;">Width</span><span style="color:blue;">=”144″</span><span style="color:red;"> Content</span><span style="color:blue;">=”I R Radial”</span><span style="color:red;"> </span><span style="color:blue;">/&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label <span style="color:red;"><strong>Template</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> RadialLabelTemplate</span></strong><span style="color:blue;"><strong>}”</strong></span></span><span style="color:red;"> Height</span><span style="color:blue;">=”28.667″</span><span style="color:red;"> Width</span><span style="color:blue;">=”130.334″</span><span style="color:red;"> Content</span><span style="color:blue;">=”U R Radial”</span><span style="color:blue;">/&gt;</span></p>
</div>
<p><strong>Editing a Label’s ContentTemplate</strong></p>
<p>Templates<br />
are used with TemplateBindings that emanate for general Control<br />
properties. But we might do bind our Label to CLR property from any<br />
Data Source. like, Cows.</p>
<p align="center"><a href="http://silverlight.net/blogs/justinangel/image_79EF39A0.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_501B98E0.png" border="0" alt="image" width="451" height="318" /></a></p>
<p>We’ll create (in Visual studio) our Cow class that has Age and Name.</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Cow</span></p>
<p style="margin:0;">{</p>
<p style="margin:0;"><span style="color:blue;">public</span> Cow(<span style="color:blue;">string</span> Name, <span style="color:blue;">int</span> Age)</p>
<p style="margin:0;">{</p>
<p style="margin:0;">Name = Name;</p>
<p style="margin:0;">Age = Age;</p>
<p style="margin:0;">}</p>
<p style="margin:0;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">string</span> Name { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>;  }</p>
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">int</span> Age { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>;  }</p>
<p style="margin:0;">}</p>
</div>
<p>A very basic CLR class that has 2 properties: a numeric age and a string that represents the age of the cow.</p>
<p>Now let’s use this class and create a cow we’ll DataBind our label to.</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Page</span> : <span style="color:#2b91af;">UserControl</span></p>
<p style="margin:0;">{</p>
<p style="margin:0;"><span style="color:blue;">public</span> Page()</p>
<p style="margin:0;">{</p>
<p style="margin:0;"><span style="color:green;">// Required to initialize variables</span></p>
<p style="margin:0;">InitializeComponent();</p>
<p style="margin:0;"><span style="color:blue;">this</span>.Loaded += <span style="color:blue;">new</span> <span style="color:#2b91af;">RoutedEventHandler</span>(Page_Loaded);</p>
<p style="margin:0;">}</p>
<p style="margin:0;">
<p style="margin:0;"><span style="color:blue;">void</span> Page_Loaded(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">RoutedEventArgs</span> e)</p>
<p style="margin:0;">{</p>
<p style="margin:0;"><strong>myLabel.DataContext = <span style="color:blue;">new</span> <span style="color:#2b91af;">Cow</span>(<span style="color:#a31515;">“Betsy”</span>, 3);</strong></p>
<p style="margin:0;">}</p>
<p style="margin:0;">}</p>
</div>
<p>Eventually I’d like for us to see a Label that looks like this:</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_5917FE94.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_667E119A.png" border="0" alt="image" width="216" height="82" /></a></p>
<p>We’d like to change the thickness of the head line based on Cow.Age and change the text based on Cow.Name.</p>
<p>Let’s start by adding a new Label to the page and changing it’s name to myLabel.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_0CDFF4E6.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_6BEC823E.png" border="0" alt="image" width="541" height="160" /></a></p>
<p>We’d like to edit the <strong>ContentTemplate</strong><br />
of this label, so we’ll Right Click on the label select<br />
“Edit Other Templates –&gt; Edit Generated Content<br />
(ContentTemplate) –&gt; Create Empty…”</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_6B141C54.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_69CF8375.png" border="0" alt="image" width="597" height="470" /></a></p>
<p>We’ll call our new ContentTemplate – CowContentTemplate.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_73B474E0.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_72DC0EF6.png" border="0" alt="image" width="396" height="243" /></a></p>
<p>As always we start off with an empty ContentTemplate.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_7203A90C.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_3AF9A506.png" border="0" alt="image" width="598" height="498" /></a></p>
<p>I’ll spare you my third grade drawing skills and we’ll magiclly add some lines that are our cow.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_276C4565.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_27A8C89A.png" border="0" alt="image" width="706" height="493" /></a></p>
<p>Truly a masterpiece.</p>
<p align="center"><a href="http://silverlight.net/blogs/justinangel/image_20A91615.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="Single cow" src="http://silverlight.net/blogs/justinangel/image_thumb_59439A55.png" border="0" alt="Single cow" width="240" height="157" /></a><strong><em>If you squint really hard, they look alike</em></strong></p>
<p>Next we’d like to add the appropriate bindings.</p>
<p>We’ll select the TextBlock in the middle of the cow.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_4D7E2D56.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_7373DDAC.png" border="0" alt="image" width="577" height="290" /></a></p>
<p>Click “Advanced Options –&gt; Custom Expression”.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_6B7C3B4A.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_71C311D8.png" border="0" alt="image" width="273" height="138" /></a></p>
<p><a href="http://silverlight.net/blogs/justinangel/image_7809E866.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_7731827C.png" border="0" alt="image" width="282" height="317" /></a></p>
<p>And add a Binding to the Cow Name.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_76591C92.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_4EB2A068.png" border="0" alt="image" width="303" height="108" /></a></p>
<p>Next, we’ll select the Cow’s head.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_472730FB.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_2633BE54.png" border="0" alt="image" width="558" height="219" /></a></p>
<p>And set a <strong>StrokeThickness</strong> to a Custom expression that’s bound to the Cow’s age.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_332D9E65.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_2482F280.png" border="0" alt="image" width="300" height="134" /></a></p>
<p>One last thing we have to do before we can run the sample is set the Cow’s <strong>Content</strong> to it’s <strong>DataContext</strong>.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_15D8469B.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_28409750.png" border="0" alt="image" width="800" height="188" /></a></p>
<p>We’ll ad a Custom expression to the <strong>Content</strong> property of the label.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_3727C66A.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_5D89A9B5.png" border="0" alt="image" width="294" height="113" /></a></p>
<p>Finally we can run the sample.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_6EFA0A8D.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_43494091.png" border="0" alt="image" width="216" height="82" /></a></p>
<p>Let’s add a few more Labels with that <strong>ContentTemplate</strong> and with more Cows.</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Page</span> : <span style="color:#2b91af;">UserControl</span></p>
<p style="margin:0;">{</p>
<p style="margin:0;"><span style="color:blue;">public</span> Page()</p>
<p style="margin:0;">{</p>
<p style="margin:0;"><span style="color:green;">// Required to initialize variables</span></p>
<p style="margin:0;">InitializeComponent();</p>
<p style="margin:0;"><span style="color:blue;">this</span>.Loaded += <span style="color:blue;">new</span> <span style="color:#2b91af;">RoutedEventHandler</span>(Page_Loaded);</p>
<p style="margin:0;">}</p>
<p style="margin:0;">
<p style="margin:0;"><span style="color:blue;">void</span> Page_Loaded(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">RoutedEventArgs</span> e)</p>
<p style="margin:0;">{</p>
<p style="margin:0;">myLabel.DataContext = <span style="color:blue;">new</span> <span style="color:#2b91af;">Cow</span>(<span style="color:#a31515;">“Betsy”</span>, 3);</p>
<p style="margin:0;">myCowLabel1.DataContext = <span style="color:blue;">new</span> <span style="color:#2b91af;">Cow</span>(<span style="color:#a31515;">“Martha”</span>, 1);</p>
<p style="margin:0;">myCowLabel2.DataContext = <span style="color:blue;">new</span> <span style="color:#2b91af;">Cow</span>(<span style="color:#a31515;">“Flossy”</span>, 5);</p>
<p style="margin:0;">myCowLabel3.DataContext = <span style="color:blue;">new</span> <span style="color:#2b91af;">Cow</span>(<span style="color:#a31515;">“Hoss”</span>, 2);</p>
<p style="margin:0;">}</p>
<p style="margin:0;">}</p>
</div>
<p>We’ll make sure to add those label to our page and re-run this sample.</p>
<p><a href="http://silverlight.net/blogs/justinangel/image_628BE764.png"><img style="display:inline;" title="image" src="http://silverlight.net/blogs/justinangel/image_thumb_7AAF51BF.png" border="0" alt="image" width="215" height="297" /></a></p>
<p>And our Cow Herd is now complete.</p>
<p>Here’s our DataTemplate XML.</p>
<div style="background:white none repeat scroll 0 0;font-size:12pt;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">UserControl.Resources</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><strong><span style="color:blue;">&lt;</span><span style="color:#a31515;">DataTemplate</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Key</span></strong><span style="color:blue;"><strong>=”CowContentTemplate”</strong>&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Grid</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">TextBlock</span><span style="color:red;"> Margin</span><span style="color:blue;">=”21.75,9.833,27.25,9.167″</span><span style="color:red;"> TextWrapping</span><span style="color:blue;">=”Wrap”</span><span style="color:red;"> FontSize</span><span style="color:blue;">=”8″</span><span style="color:red;"> <strong>Text</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">Binding</span><span style="color:red;"> Path</span></strong><span style="color:blue;"><strong>=Name}”</strong>/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Ellipse</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Right”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”0,2.167,4.583,13.833″</span><span style="color:red;"> Width</span><span style="color:blue;">=”15.084″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><strong><span style="color:red;"> StrokeThickness</span><span style="color:blue;">=”{</span><span style="color:#a31515;">Binding</span><span style="color:red;"> Path</span></strong><span style="color:blue;"><strong>=Age}”</strong>/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Rectangle</span><span style="color:red;"> Margin</span><span style="color:blue;">=”18.75,8,25.25,8″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> RadiusX</span><span style="color:blue;">=”1″</span><span style="color:red;"> RadiusY</span><span style="color:blue;">=”1″/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Path</span><span style="color:red;"> Height</span><span style="color:blue;">=”2.334″</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Right”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”0,12.25,19.417,0″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Top”</span><span style="color:red;"> Width</span><span style="color:blue;">=”6.667″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stretch</span><span style="color:blue;">=”Fill”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> Data</span><span style="color:blue;">=”M65.166664,9.833333 L59.5,11.166667″/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Path</span><span style="color:red;"> Height</span><span style="color:blue;">=”6″</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Right”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”0,0,23.75,2.667″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Bottom”</span><span style="color:red;"> Width</span><span style="color:blue;">=”3.667″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stretch</span><span style="color:blue;">=”Fill”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> Data</span><span style="color:blue;">=”M58.833332,19.666666 L61.5,24.666666″</span><span style="color:red;"> d</span><span style="color:blue;">:</span><span style="color:red;">LayoutOverrides</span><span style="color:blue;">=”Width”/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Path</span><span style="color:red;"> Height</span><span style="color:blue;">=”4.5″</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Left”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”27.585,0,0,3.833″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Bottom”</span><span style="color:red;"> Width</span><span style="color:blue;">=”2.166″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stretch</span><span style="color:blue;">=”Fill”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> Data</span><span style="color:blue;">=”M35.333332,19.666666 L34.166668,23.166666″/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Path</span><span style="color:red;"> Height</span><span style="color:blue;">=”4.834″</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Right”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”0,0,33.751,4.333″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Bottom”</span><span style="color:red;"> Width</span><span style="color:blue;">=”1.833″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stretch</span><span style="color:blue;">=”Fill”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> Data</span><span style="color:blue;">=”M51.833332,22.666666 L51,18.833334″</span><span style="color:red;"> d</span><span style="color:blue;">:</span><span style="color:red;">LayoutOverrides</span><span style="color:blue;">=”Width”/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Path</span><span style="color:red;"> Height</span><span style="color:blue;">=”5″</span><span style="color:red;"> HorizontalAlignment</span><span style="color:blue;">=”Left”</span><span style="color:red;"> Margin</span><span style="color:blue;">=”18.917,0,0,4.333″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Bottom”</span><span style="color:red;"> Width</span><span style="color:blue;">=”4″</span><span style="color:red;"> Fill</span><span style="color:blue;">=”#FFFFFFFF”</span><span style="color:red;"> Stretch</span><span style="color:blue;">=”Fill”</span><span style="color:red;"> Stroke</span><span style="color:blue;">=”#FF000000″</span><span style="color:red;"> Data</span><span style="color:blue;">=”M27.333334,19.35417 L24.833334,23.187502″/&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">Grid</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;"><span style="color:#a31515;"> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">DataTemplate</span><span style="color:blue;">&gt;</span></p>
<p style="margin:0;">
<p><span style="color:blue;">&lt;/</span><span style="color:#a31515;">UserControl.Resources</span><span style="color:blue;">&gt;</span></div>
<p>And our Cow labels:</p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> Height</span><span style="color:blue;">=”32.5″</span><span style="color:red;"> Margin</span><span style="color:blue;">=”311.5,56.75,235.5,0″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Top”</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=”myLabel”</span><span style="color:red;"> <strong>ContentTemplate</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> CowContentTemplate</span><span style="color:blue;">}”</span></strong><span style="color:red;"> <strong>Content</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">Binding</span><span style="color:blue;">}”</span></strong><span style="color:red;"> </span><span style="color:blue;"> /&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> Height</span><span style="color:blue;">=”32.5″</span><span style="color:red;"> Margin</span><span style="color:blue;">=”311,129.5,236,0″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Top”</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=”myCowLabel1″</span><span style="color:red;"> <strong>ContentTemplate</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> CowContentTemplate</span><span style="color:blue;">}”</span><span style="color:red;"> Content</span><span style="color:blue;">=”{</span><span style="color:#a31515;">Binding</span><span style="color:blue;">}”</span></strong><span style="color:red;"> </span><span style="color:blue;">/&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> Height</span><span style="color:blue;">=”32.5″</span><span style="color:red;"> Margin</span><span style="color:blue;">=”311,198.75,236,0″</span><span style="color:red;"> VerticalAlignment</span><span style="color:blue;">=”Top”</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=”myCowLabel2″</span><span style="color:red;"> <strong>ContentTemplate</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> CowContentTemplate</span><span style="color:blue;">}”</span><span style="color:red;"> Content</span><span style="color:blue;">=”{</span><span style="color:#a31515;">Binding</span><span style="color:blue;">}”</span></strong><span style="color:red;"> </span><span style="color:blue;"> /&gt;</span></p>
<p style="margin:0;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">slctls</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:red;"> Height</span><span style="color:blue;">=”32.5″</span><span style="color:red;"> Margin</span><span style="color:blue;">=”311.5,0,235.5,184.5″</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=”myCowLabel3″</span><span style="color:red;"> <strong>ContentTemplate</strong></span><strong><span style="color:blue;">=”{</span><span style="color:#a31515;">StaticResource</span><span style="color:red;"> CowContentTemplate</span><span style="color:blue;">}”</span><span style="color:red;"> Content</span><span style="color:blue;">=”{</span><span style="color:#a31515;">Binding</span><span style="color:blue;">}”</span></strong><span style="color:red;"> </span><span style="color:blue;"> /&gt;</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brandontruong.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brandontruong.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brandontruong.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brandontruong.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brandontruong.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brandontruong.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brandontruong.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brandontruong.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brandontruong.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brandontruong.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brandontruong.wordpress.com&blog=1950271&post=34&subd=brandontruong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brandontruong.wordpress.com/2008/11/01/silverlight-toolkit-label/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/078e01527cc65cb1786bcec439ef4545?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brandontruong</media:title>
		</media:content>

		<media:content url="http://brandontruong.net23.net/wordpress/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_2DFFEF24.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_5C29C511.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_480082BB.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_00CAB6BC.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_04C4DEC1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_31D9CB8F.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_2975F638.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_1C9BA01A.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_171D09A9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_072DC4E5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_5EAEE2D0.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_237B0705.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_33A6CEFE.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_527D42DC.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_7153B6BA.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_2FD90461.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_62C894C8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_675E9F82.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_6FFEF80E.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_3C568BB0.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_4D5AB993.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_52C92A37.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_10E244E9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_7C7C7F5D.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_776A1BE1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_1C1B3359.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_53151192.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_5C219D13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_55FA5078.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_0CF42EB2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_4B0D4963.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_500F8712.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_6E79C7FB.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_70671704.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_1C376AF4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_13D3959D.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_51ECB04E.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_2D97A5FF.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_501B98E0.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_667E119A.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_6BEC823E.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_69CF8375.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_72DC0EF6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_3AF9A506.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_27A8C89A.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_59439A55.png" medium="image">
			<media:title type="html">Single cow</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_7373DDAC.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_71C311D8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_7731827C.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_4EB2A068.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_2633BE54.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_2482F280.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_28409750.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_5D89A9B5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_43494091.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://silverlight.net/blogs/justinangel/image_thumb_7AAF51BF.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>