<?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/"
	>

<channel>
	<title>Silverlight Muffins</title>
	<atom:link href="http://www.adamelmore.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.adamelmore.net</link>
	<description>Sharing with the world, one muffin at a time.</description>
	<lastBuildDate>Fri, 21 Aug 2009 16:37:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Forward Time Travel &amp; MSDN Roadshow Events</title>
		<link>http://www.adamelmore.net/?p=51</link>
		<comments>http://www.adamelmore.net/?p=51#comments</comments>
		<pubDate>Fri, 21 Aug 2009 16:37:33 +0000</pubDate>
		<dc:creator>Adam Elmore</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.adamelmore.net/?p=51</guid>
		<description><![CDATA[I had a good laugh when I saw that my last post was the night before the official Silverlight 3 release. I started this blog with good intentions, but the last month has been a whirlwind. I must have been one of the few people writing LOB Silverlight applications for a living that hadn&#8217;t touched [...]]]></description>
			<content:encoded><![CDATA[<p>I had a good laugh when I saw that my last post was the night before the official Silverlight 3 release. I started this blog with good intentions, but the last month has been a whirlwind. I must have been one of the few people writing LOB Silverlight applications for a living that hadn&#8217;t touched the Silverlight 3 features until the official release. Since release, I have been frantically catching up while still maintaining the level of productivity needed to hit deadlines. Look for future posts outlining my experiences with Silverlight 3.</p>
<p>I spent the last week on a sort of vacation. I attended a couple of MSDN Roadshow events in the Northeast (&#8221;Mid-Atlantic Roadshow&#8221; and the &#8220;Suburban Roadshow&#8221;) and met with a client in New York. I had not had the chance to attend any MSDN events in the past, so I wanted to see what they were all about and maybe meet some fellow developers in the process. The experience wasn&#8217;t what I expected, to say the least. I&#8217;m not convinced that the target audience includes developers who are actually using the technologies being covered. I wasn&#8217;t necessarily expecting any earth shattering content, but I did expect that the presenters would have actual experience using the technologies they were discussing. In New York, the Microsoft Evangelist presenting on Dependency Injection admitted to hearing of the concept only days before the event. Seriously? You&#8217;re going to present on a topic that you barely have a definition for? I was actually answering questions for uninformed attendees when the presenter failed to do so.</p>
<p>I&#8217;m looking forward to PDC 09.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamelmore.net/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Silverlight 3 Bits</title>
		<link>http://www.adamelmore.net/?p=39</link>
		<comments>http://www.adamelmore.net/?p=39#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:50:21 +0000</pubDate>
		<dc:creator>Adam Elmore</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight 3]]></category>

		<guid isPermaLink="false">http://www.adamelmore.net/?p=39</guid>
		<description><![CDATA[If you haven&#8217;t heard, Microsoft has some of the Silverlight 3 bits up on the web. Tommorrow we&#8217;ll see an official release. . . get excited!
Here are the downloads:
Expression Blend 3 with Sketchflow
Silverlight 3 Software Development Kit (SDK)
Silverlight 3 Tools for Visual Studio 2008 SP 1
]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t heard, Microsoft has some of the Silverlight 3 bits up on the web. Tommorrow we&#8217;ll see an official release. . . get excited!</p>
<p>Here are the downloads:</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=92e1db7a-5d36-449b-8c6b-d25f078f3609">Expression Blend 3 with Sketchflow</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=2050e580-f1d5-4040-bb09-e6185591b6b5">Silverlight 3 Software Development Kit (SDK)</a></p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=9442b0f2-7465-417a-88f3-5e7b5409e9dd">Silverlight 3 Tools for Visual Studio 2008 SP 1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamelmore.net/?feed=rss2&amp;p=39</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silverlight &#8211; My Favorite &#8220;Web Design&#8221; Technology</title>
		<link>http://www.adamelmore.net/?p=26</link>
		<comments>http://www.adamelmore.net/?p=26#comments</comments>
		<pubDate>Tue, 07 Jul 2009 15:07:13 +0000</pubDate>
		<dc:creator>Adam Elmore</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://www.adamelmore.net/?p=26</guid>
		<description><![CDATA[I was in Barnes &#38; Noble over the weekend, browsing through the technology sections (picked up &#8220;Microsoft .NET: Architecting Applications for the Enterprise&#8221; by Dino Esposito) when I realized I wasn&#8217;t seeing any Silverlight books. I looked through various &#8220;programming&#8221; categories without any luck. I had decided that this particular small-town BN (Springfield, MO) might [...]]]></description>
			<content:encoded><![CDATA[<p>I was in Barnes &amp; Noble over the weekend, browsing through the technology sections (picked up &#8220;Microsoft .NET: Architecting Applications for the Enterprise&#8221; by <a href="http://weblogs.asp.net/despos/" target="_blank">Dino Esposito</a>) when I realized I wasn&#8217;t seeing any Silverlight books. I looked through various &#8220;programming&#8221; categories without any luck. I had decided that this particular small-town BN (Springfield, MO) might have a relatively narrow selection, but I was still shocked to think that they wouldn&#8217;t have a single book on the topic. Just as I was primed to ask an employee for assistance, I stumbled into the &#8220;Web Design&#8221; section of the store where I found a saddening surprise: Silverlight books. In droves. I suppose I should update my job title. . .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamelmore.net/?feed=rss2&amp;p=26</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom Control Resources</title>
		<link>http://www.adamelmore.net/?p=10</link>
		<comments>http://www.adamelmore.net/?p=10#comments</comments>
		<pubDate>Fri, 03 Jul 2009 04:53:47 +0000</pubDate>
		<dc:creator>Adam Elmore</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Custom Controls]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://adamelmore.wordpress.com/?p=10</guid>
		<description><![CDATA[This morning I ran into an interesting bug while working on a custom TabControl created by another member of my team. This TabControl (appropriately named, &#8220;TabControl2&#8243;) adds a button in the TabPanel for adding new TabItems (among other things). For various reasons, this Button is created dynamically in the class definition and added to the [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I ran into an interesting bug while working on a custom TabControl created by another member of my team. This TabControl (appropriately named, &#8220;TabControl2&#8243;) adds a button in the TabPanel for adding new TabItems (among other things). For various reasons, this Button is created dynamically in the class definition and added to the current TabPanel. No problems here until it was time to style the Button in a way that would fit the application. After taking a look at TabControl2.cs, I quickly saw the first mistake:</p>
<h3>TabControl2.cs</h3>
<p><img class="size-full wp-image-13 alignnone" title="OnApplyTemplate" src="http://adamelmore.files.wordpress.com/2009/07/2-6-2009_1.jpg" alt="OnApplyTemplate" width="470" height="111" /></p>
<h3>generic.xaml</h3>
<p><img class="alignnone size-full wp-image-19" title="2-6-2009_6" src="http://adamelmore.files.wordpress.com/2009/07/2-6-2009_6.jpg" alt="2-6-2009_6" width="551" height="115" /></p>
<p>AddTabButtonStyle is a DependencyProperty used to update the Style of the dynamically created Button. As you can see, an attempt is made to set the value of this property to the &#8220;Local_NewTabButtonStyle&#8221; Style. Knowing that the Style defined in generic.xaml is not located within this control&#8217;s Resources, I saw a few possible solutions. The obvious solution was to store the Style somewhere within the TabControl2 ControlTemplate. This would give us easy access to the resource in the TabControl2 OnApplyTemplate() method. However, this particular control didn&#8217;t have a ControlTemplate defined as it derived directly from TabControl and did not make any changes that warranted a new template (outside of this particular Button). At this point, the smart move would have been to create a default ControlTemplate targeting the TabControl2 control and throw my Button Style directly into the template. Another solution involved creating the Style in C# (no thanks). Turns out, I&#8217;m lazy and went with solution number three: move the Local_NewTabButtonStyle resource to App.xaml (that&#8217;s right, the application level resources; not so &#8220;Local&#8221; anymore..), and pull it from Application.Current.Resources.</p>
<h3>App.xaml</h3>
<p><img class="alignnone size-full wp-image-16" title="2-6-2009_3" src="http://adamelmore.files.wordpress.com/2009/07/2-6-2009_3.jpg" alt="2-6-2009_3" width="311" height="132" /></p>
<h3>TabControl2.cs</h3>
<p><img class="alignnone size-full wp-image-17" title="2-6-2009_4" src="http://adamelmore.files.wordpress.com/2009/07/2-6-2009_4.jpg" alt="2-6-2009_4" width="590" height="111" /></p>
<p>Aside from the fact that this is very poor design when it comes to creating a custom control, using this &#8220;solution&#8221; also introduced a very strange bug. I initially ran the application and saw that the style was being applied correctly (after all, the style does reside within the application&#8217;s ResourceDictionary). Not feeling the least bit guilty, I moved on to more important tasks (don&#8217;t judge me <img src='http://www.adamelmore.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). An hour later, our team designer hopped on his Mac to take a look at the changes only to find that the application wouldn&#8217;t load. I picked up my wife&#8217;s MacBook and confirmed the problem: after finishing the Silverlight loading animation, the application loaded a blank white screen. In addition, the browser&#8217;s error console was void of any Silverlight exceptions (this problem was occurring in both Firefox and Safari). Strange.</p>
<p>After much toil, I came to the realization that my Application level resource was the culprit. After creating a ControlTemplate for TabControl2 and storing the Style in the root Grid&#8217;s resources, I quickly remedied the problem.</p>
<h3>generic.xaml</h3>
<p><img class="alignnone size-full wp-image-15" title="2-6-2009_2" src="http://adamelmore.files.wordpress.com/2009/07/2-6-2009_2.jpg" alt="2-6-2009_2" width="551" height="285" /></p>
<h3>TabControl2.cs</h3>
<p><img class="alignnone size-full wp-image-18" title="2-6-2009_5" src="http://adamelmore.files.wordpress.com/2009/07/2-6-2009_5.jpg" alt="2-6-2009_5" width="606" height="196" /></p>
<p>I&#8217;d love to hear an explanation for this issue. One thing is for sure &#8211; it <span style="text-decoration: line-through;">never</span> rarely pays to take the quick route.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamelmore.net/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
