<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>top-silverlight</title>
	
	<link>http://www.top-silverlight.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 10 Sep 2010 13:37:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Top-silverlight" /><feedburner:info uri="top-silverlight" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Writing plugins for Seesmic Desktop</title>
		<link>http://www.top-silverlight.com/2010/09/10/writing-plugins-for-seesmic-desktop.html</link>
		<comments>http://www.top-silverlight.com/2010/09/10/writing-plugins-for-seesmic-desktop.html#comments</comments>
		<pubDate>Fri, 10 Sep 2010 13:37:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/09/10/writing-plugins-for-seesmic-desktop.html</guid>
		<description><![CDATA[Today, Seesmic more broadly launched Seesmic Desktop, a refreshed platform for interacting with various social media outlets like Twitter, Facebook, Google Buzz, etc.  Seesmic has been one of the leaders in this space providing client applications on various platforms across web, desktop and mobile and providing us with unified views of our interaction with others [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin: 0px 14px 0px 0px;float: left" alt="Seesmic logo" align="left" src="http://storage2.timheuer.com/seesmic-logo-175-red.jpg" />Today, <a href="http://www.seesmic.com">Seesmic</a> more broadly launched Seesmic Desktop, a refreshed platform for interacting with various social media outlets like <a href="http://twitter.com/timheuer">Twitter</a>, Facebook, Google Buzz, etc.  Seesmic has been one of the leaders in this space providing client applications on various platforms across web, desktop and mobile and providing us with unified views of our interaction with others online.</p>
<p>You may have remembered seeing Loic on stage at MIX last year demonstrating their first preview of this updated platform and inviting developers to be a part of extending the shell.  That’s right…their platform is extensible!  A great application that I can also modify to my needs?  Double rainbow…what does it mean!?</p>
<p>I went to the evening social session at MIX to hear about how they would be enabling developers to extend the platform.  In introducing the concept of plugins, it was made clear that the <a href="http://platform.seesmic.com/">Seesmic Desktop Platform</a> (SDP) would be leveraging the Managed Extensibility Framework (MEF) that was to be included as a part of <a href="http://www.silverlight.net">Silverlight</a>.  Seesmic would define MEF contracts that as long as developers adhered to them (and of course implemented any required interfaces for actual functionality) then the plugin would be able to extend the platform.  The most grandiose idea can be simply stated as <em>if you don’t like how Twitter is represented in Seesmic, fine…change it.</em>  Of course, I suspect most people will be just fine with their implementation and choose to extend in other areas as I’ve done.</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="Seesmic Desktop 2" src="http://storage2.timheuer.com/sd2preview.png" /></p>
<p>Admittedly I’ve got a vested interest in being excited about SDP…after all it is built using Silverlight.  However, I’m also very much into being a part of my online connected network via Twitter.  Prior to SDP I did not use Tweetdeck or some of the other popular multi-column ones…but was a user of Twhirl.  I loved the simplicity that it provided but did desire for slightly more.  I never got into Tweetdeck and honestly I don’t know why…it just never stuck to me in how I interacted online.  The thought of customizing my own experience, however, is what intrigued me to SDP.</p>
<p>I immediately got started writing some plugins, starting with something that I use often, a translator for reading messages incoming that aren’t in my native English.  Some may scoff, but when you monitor a lot of different things online, this becomes important as I don’t want to ignore things that might be interesting.  I chose to use Microsoft Translator services and in a few hours had my first rough draft plugin completed.  It was very rough (mostly because I desired a lot of things from Seesmic).  I showed Marco my warez and started to give feedback on what I think the platform needed for this specific use case as well as to make my life easier.  </p>
<p>Since then the platform has significantly evolved to accommodate most developers needs.  Seesmic has been very responsive on the developer forums for the platform to needs and questions.  Getting started writing a plugin couldn’t be easier for a Silverlight developer, but I’ve tried to make it even simpler (as I was sick of doing the same tasks myself).  I created <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/902333d8-74ad-4e70-9ef5-f753ed8eef16">some templates that you can download from the Visual Studio gallery</a> that will help get you started.  Once installed you’ll see a nice new project template in Visual Studio:</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="Seesmic project template" src="http://storage2.timheuer.com/seesmic-vs-newproj.png" /></p>
<p>This will stub out the initial shell you will need (you’ll still need to add the correct references to the SDP SDK).  From there you can add item templates for the base plugin type or other types: posting actions, timeline items, etc.  Here’s what my templates provide:</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="Seesmic item templates" src="http://storage2.timheuer.com/seesmic-vs-itemtemplatesj.png" /></p>
<p>These should give you some good jumpstart code to provide some of the necessary plumbing that would be required.  This is <strong>NOT</strong> a substitute from understanding the platform!  You need to <a href="http://devwiki.seesmic.com">read the docs</a> and understand the interaction of the API with the platform to be successful.</p>
<blockquote><p>TIP: When you add references to the Seesmic SDK assemblies, change their Copy Local attribute (in properties) to <strong>false</strong> so you don’t end up shipping them with your plugin.  Since they are already a part of the platform there is no reason to ship them with your plugin (and this makes your plugin size smaller).</p>
</blockquote>
<p>To me, I think the easiest plugins to create are those that implement a URL shortener, posting action or a timeline processor.  These are the areas which would allow for very fast customization.  The account providers is likely the most time consuming as you could imagine as you are interacting with authentication schemes, etc.  </p>
<p>I’ve created a few initial plugins that you might be interested in and you can <a href="http://timheuer.com/blog/articles/seesmic-desktop-plugins.aspx">download them here</a>.  I’m really excited about this platform and the fact that I can extend it to make my interaction with things I care about uniquely my own.  <a href="http://seesmic.com/seesmic_desktop">Install Seesmic Desktop</a> today and <a href="http://devwiki.seesmic.com/Getting-Started-with-the-Desktop-Plugin-SDK">start developing using the SDK</a>!    </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/seesmic/default.aspx" rel="tag">seesmic</a>, <a href="http://timheuer.com/blog/tags/mef/default.aspx" rel="tag">mef</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/wpf/default.aspx" rel="tag">wpf</a>, <a href="http://timheuer.com/blog/tags/twitter/default.aspx" rel="tag">twitter</a>, <a href="http://timheuer.com/blog/tags/facebook/default.aspx" rel="tag">facebook</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14781.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/5SvCA460YsurA1OCVCymZ0vr9aU/0/da"><img src="http://feedads.g.doubleclick.net/~a/5SvCA460YsurA1OCVCymZ0vr9aU/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/5SvCA460YsurA1OCVCymZ0vr9aU/1/da"><img src="http://feedads.g.doubleclick.net/~a/5SvCA460YsurA1OCVCymZ0vr9aU/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/tI2GyU3N4W4" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/09/10/writing-plugins-for-seesmic-desktop.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing JetPack–a new Silverlight 4 application theme</title>
		<link>http://www.top-silverlight.com/2010/09/10/introducing-jetpacka-new-silverlight-4-application-theme.html</link>
		<comments>http://www.top-silverlight.com/2010/09/10/introducing-jetpacka-new-silverlight-4-application-theme.html#comments</comments>
		<pubDate>Fri, 10 Sep 2010 13:37:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/09/10/introducing-jetpacka-new-silverlight-4-application-theme.html</guid>
		<description><![CDATA[After a longer-than-should-have-been delay (you can blame me for that) allow me to introduce JetPack.

I’m really excited about this theme and the work that our team put together here.  You may have see Tsitsi talk about theming in general and introduce this theme on Silverlight TV.  The challenge behind this theme was to take some [...]]]></description>
			<content:encoded><![CDATA[<p>After a longer-than-should-have-been delay (you can blame me for that) allow me to introduce <strong>JetPack</strong>.</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="JetPack theme" src="http://storage2.timheuer.com/jetpack-demo.png" /></p>
<p>I’m really excited about this theme and the work that our team put together here.  You may have see Tsitsi talk about theming in general and introduce this theme on <a href="http://channel9.msdn.com/shows/SilverlightTV/Silverlight-TV-42-Apply-and-Customize-the-New-Silverlight-Themes/">Silverlight TV</a>.  The challenge behind this theme was to take some of the excitement around other <a href="http://www.silverlight.net">Silverlight</a> themes and create a great looking overall theme that could be used for line-of-business applications, but also extended as desired by any other application.</p>
<p>Working with the team at <a href="http://thinkpixellab.com/"><strong>Pixel Lab</strong></a>, our small team looked at areas of inspiration from various online and client applications that are popular and what worked well about the user interaction on those themes.  Robby and team did a great job in my opinion of creating a very well designed theme that can be used in almost any circumstance.</p>
<p>During this September refresh of the themes we’ve also updated the previous 3 themes: <a href="http://timheuer.com/blog/archive/2010/05/03/new-silverlight-4-themes-available-for-download.aspx">Cosmopolitan, Windows and Accent Color</a> with some minor fixes and tweaks based on some feedback we got.  You can see a <a href="http://www.silverlight.net/content/samples/sl4/themes/jetpack.html">preview of the various styles in JetPack here</a>.</p>
<p>We hope you enjoy JetPack as much as we do!  We’ve provided the theme pack in the same way as we have the others, as templates for Visual Studio 2010 and Expression Blend 4 and the raw assets (resource dictionaries) for you to download.  Each Visual Studio template is build for modeling the Silverlight Navigation Application template and the WCF Ria Services Business Application template.  We’ve provided the VSIX installer formats so you just need to download that, double-click and you’ll have them in your File…New Project window for selection.</p>
<p>Thanks for your patience through the release of JetPack, there were some moving parts in the end (mostly delays in our release management system which underwent some changes) that were human-caused [blame me] but we’re glad to finally get it out in the wild!  <a href="http://go.microsoft.com/fwlink/?LinkId=192411"><strong>Download all the themes here</strong></a>.</p>
<p>Hope this helps! </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/riaservices/default.aspx" rel="tag">riaservices</a>, <a href="http://timheuer.com/blog/tags/expression+blend/default.aspx" rel="tag">expression blend</a>, <a href="http://timheuer.com/blog/tags/expression/default.aspx" rel="tag">expression</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/themes/default.aspx" rel="tag">themes</a>, <a href="http://timheuer.com/blog/tags/jetpack/default.aspx" rel="tag">jetpack</a>, <a href="http://timheuer.com/blog/tags/ria/default.aspx" rel="tag">ria</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14780.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/ymNytctjF9r1jRicrZ_3xgWRK64/0/da"><img src="http://feedads.g.doubleclick.net/~a/ymNytctjF9r1jRicrZ_3xgWRK64/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/ymNytctjF9r1jRicrZ_3xgWRK64/1/da"><img src="http://feedads.g.doubleclick.net/~a/ymNytctjF9r1jRicrZ_3xgWRK64/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/XBaSLKallTw" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/09/10/introducing-jetpacka-new-silverlight-4-application-theme.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smashing Magazine September 2010 Windows 7 Theme</title>
		<link>http://www.top-silverlight.com/2010/09/07/smashing-magazine-september-2010-windows-7-theme.html</link>
		<comments>http://www.top-silverlight.com/2010/09/07/smashing-magazine-september-2010-windows-7-theme.html#comments</comments>
		<pubDate>Mon, 06 Sep 2010 22:32:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/09/07/smashing-magazine-september-2010-windows-7-theme.html</guid>
		<description><![CDATA[September is here (apologies for being late &#8211; in all honesty I wasn&#8217;t inspired by this months&#8217; selections)…time for an updated Windows 7 Smashing Magazine theme pack!

The September themes seem to be continuing the focus on &#8217;summer&#8217; things.  So here is your September 2010 Windows 7 Theme Packs for wallpapers – unfiltered and uncensored – [...]]]></description>
			<content:encoded><![CDATA[<p>September is here (apologies for being late &#8211; in all honesty I wasn&#8217;t inspired by this months&#8217; selections)…time for an updated Windows 7 Smashing Magazine theme pack!</p>
<p><img src="http://storage2.timheuer.com/kitchen_hymns.jpg" alt="Smashing Magazine September 2010 Windows 7 Theme" style="float: none;margin-left: auto;margin-right: auto" /></p>
<p>The September themes seem to be continuing the focus on &#8217;summer&#8217; things.  So here is your <strong>September 2010 Windows 7 Theme Packs</strong> for wallpapers – unfiltered and uncensored – about 75 wallpapers in all.</p>
<ul>
<li><a href="http://drop.io/fvfk5we">Smashing Magazine September 2010 Windows 7 Theme (calendar)</a> </li>
<li><a href="http://drop.io/xke3h8m/">Smashing Magazine September 2010 Windows 7 Theme (no calendar)</a> </li>
<li><a href="http://www.smashingmagazine.com/2010/08/31/desktop-wallpaper-calendar-september-2010/">Smashing Magazine Desktop Wallpaper: September 2010 (original post)</a> </li>
</ul>
<p>For details on these and to see past ones, visit the <a href="http://timheuer.com/blog/archive/2010/01/12/smashing-magazine-wallpaper-theme-for-windows-7.aspx">Smashing Magazine Windows 7 Theme information</a> for the specifications I used for the theme pack as well as previous themes.  Want to participate and submit yours?  <a href="http://www.smashingmagazine.com/2008/03/19/desktop-wallpaper-calendar-join-in/">Join in</a>! </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/smashingmagazine/default.aspx" rel="tag">smashingmagazine</a>, <a href="http://timheuer.com/blog/tags/smashing/default.aspx" rel="tag">smashing</a>, <a href="http://timheuer.com/blog/tags/smashingmag/default.aspx" rel="tag">smashingmag</a>, <a href="http://timheuer.com/blog/tags/win7/default.aspx" rel="tag">win7</a>, <a href="http://timheuer.com/blog/tags/windows/default.aspx" rel="tag">windows</a>, <a href="http://timheuer.com/blog/tags/themes/default.aspx" rel="tag">themes</a>, <a href="http://timheuer.com/blog/tags/windows+7/default.aspx" rel="tag">windows 7</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14779.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/VOSESGFg7KY3CRNgXWXsV5QFxkY/0/da"><img src="http://feedads.g.doubleclick.net/~a/VOSESGFg7KY3CRNgXWXsV5QFxkY/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/VOSESGFg7KY3CRNgXWXsV5QFxkY/1/da"><img src="http://feedads.g.doubleclick.net/~a/VOSESGFg7KY3CRNgXWXsV5QFxkY/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/i_xaAVfO2Rc" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/09/07/smashing-magazine-september-2010-windows-7-theme.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight, HTML5 and the future</title>
		<link>http://www.top-silverlight.com/2010/09/03/silverlight-html5-and-the-future.html</link>
		<comments>http://www.top-silverlight.com/2010/09/03/silverlight-html5-and-the-future.html#comments</comments>
		<pubDate>Fri, 03 Sep 2010 07:22:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/09/03/silverlight-html5-and-the-future.html</guid>
		<description><![CDATA[The Silverlight team today posted some information about what the future holds for rich Internet apps and where we have come with SIlverlight, where we see HTML5 playing a role and how Silverlight will be a part of the future of this next evolution of rich Internet apps.
Brad Becker, Director of Product Management, provides some [...]]]></description>
			<content:encoded><![CDATA[<p>The Silverlight team today <a href="http://team.silverlight.net/announcement/the-future-of-silverlight/?utm_source=timheuer">posted some information about what the future holds for rich Internet apps</a> and where we have come with SIlverlight, where we see HTML5 playing a role and how Silverlight will be a part of the future of this next evolution of rich Internet apps.</p>
<p>Brad Becker, Director of Product Management, provides some information behind the value of Silverlight in a world where HTML5 will also co-exist:</p>
<blockquote><p><em>Expect to see more from Silverlight in these areas especially in our focus scenarios of high-quality media experiences, consumer apps and games, and business apps.</em></p>
<p><em>When you invest in learning Silverlight, you get the ability to do any kind of development from business to entertainment across screens from browser to mobile to living room, for fun, profit, or both. And best of all, you can start today and target the 600,000,000 desktops and devices that have Silverlight installed.</em></p>
</blockquote>
<p>I would encourage you to go and read “<strong><a href="http://team.silverlight.net/announcement/the-future-of-silverlight/?utm_source=timheuer">The Future of Silverlight</a></strong>” (frankly which I think should be titled <em>The Future Includes Silverlight</em>) as it provides some good information about what exists today, capabilities of platforms and where these technologies can grow into in the future.  Be sure to leave comments for Brad on the post as well!</p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/expression/default.aspx" rel="tag">expression</a>, <a href="http://timheuer.com/blog/tags/blend/default.aspx" rel="tag">blend</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/html5/default.aspx" rel="tag">html5</a>, <a href="http://timheuer.com/blog/tags/riaservices/default.aspx" rel="tag">riaservices</a>, <a href="http://timheuer.com/blog/tags/ria/default.aspx" rel="tag">ria</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14778.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/NUG-1B2dFXm4wX6hL53fZswGLLk/0/da"><img src="http://feedads.g.doubleclick.net/~a/NUG-1B2dFXm4wX6hL53fZswGLLk/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/NUG-1B2dFXm4wX6hL53fZswGLLk/1/da"><img src="http://feedads.g.doubleclick.net/~a/NUG-1B2dFXm4wX6hL53fZswGLLk/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/D5VERcUQViE" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/09/03/silverlight-html5-and-the-future.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 4 service release (September 2010)</title>
		<link>http://www.top-silverlight.com/2010/09/02/silverlight-4-service-release-september-2010.html</link>
		<comments>http://www.top-silverlight.com/2010/09/02/silverlight-4-service-release-september-2010.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 02:22:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/09/02/silverlight-4-service-release-september-2010.html</guid>
		<description><![CDATA[Today we released an update to Silverlight 4 (update build is 4.0.50826.0) along with an updated SDK.  We appreciate our customers’ patience on working with us to help identify and verify necessary updates to this service release.  You can find all the details in KB2164913.  Here are the relevant highlights:

SDK feature to enable Add New [...]]]></description>
			<content:encoded><![CDATA[<p>Today we released an update to <a href="http://www.silverlight.net">Silverlight</a> 4 (update build is 4.0.50826.0) along with an updated SDK.  We appreciate our customers’ patience on working with us to help identify and verify necessary updates to this service release.  You can find all the details in <a href="http://support.microsoft.com/kb/2164913">KB2164913</a>.  Here are the relevant highlights:</p>
<ul>
<li>SDK feature to enable Add New Row capabilities in DataGrid control</li>
<li>Improving startup performance of Silverlight applications</li>
<li>Adding mouse wheel support for out-of-browser applications on the Mac platform</li>
<li>Various media-related fixes around DRM content</li>
<li>Fixed memory leak when MouseCapture is used</li>
<li>Fixed memory leak for DataTemplate usage</li>
</ul>
<p>All the installer links have been updated to leverage these new bits for our customers.</p>
<h2>For end users</h2>
<p>For end users, having them simply install the runtime will provide them with the updated bits and benefits of the fixes/features in this service release.  The best way to <strike>force</strike> encourage your users to upgrade to this service release would be to leverage the MinRuntimeVersion attribute of your object tag:</p>
<div>
<div>
<pre><span>   1:</span> <span>&lt;</span><span>object</span> <span>data</span><span>="data:application/x-silverlight-2,"</span> <span>type</span><span>="application/x-silverlight-2"</span></pre>
<p><!--CRLF--></p>
<pre><span>   2:</span>     <span>width</span><span>="640"</span> <span>height</span><span>="400"</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   3:</span>     <span>&lt;</span><span>param</span> <span>name</span><span>="source"</span> <span>value</span><span>="YOUR_PATH_TO_XAP"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>     <span>&lt;</span><span>param</span> <span>name</span><span>="background"</span> <span>value</span><span>="white"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>     <span>&lt;</span><span>param</span> <span>name</span><span>="minRuntimeVersion"</span> <span>value</span><span>="4.0.50826.0"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     <span>&lt;</span><span>param</span> <span>name</span><span>="autoUpgrade"</span> <span>value</span><span>="true"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>     <span>&lt;</span><span>a</span> <span>href</span><span>="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=4.0.50826.0"</span> <span>style</span><span>="text-decoration: none"</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>         <span>&lt;</span><span>img</span> <span>src</span><span>="http://go.microsoft.com/fwlink/?LinkId=161376"</span> <span>alt</span><span>="Get Microsoft Silverlight"</span></pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>             <span>style</span><span>="border-style: none"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  10:</span>     <span>&lt;/</span><span>a</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  11:</span> <span>&lt;/</span><span>object</span><span>&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>Notice lines 5 and 6 above.  This would trigger that the end user is required for your application to run and require them to upgrade. The minRuntimeVersion/autoUpgrade are the <em>minimum</em> to require your user to upgrade to the later version.  Ideally you would follow good installation experience guidance (see “<a href="http://www.silverlight.net/learn/whitepapers/">Installation Experience Whitepaper</a>” with complete sample source code) to customize your install and/or upgrade experience.</p>
<h2>For Developers</h2>
<p>If you are a developer and authoring Silverlight applications you may want to grab the new <strong>developer </strong>bits and updated SDK:</p>
<ul>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=188039">Windows <strong>developer</strong> runtime</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=188040">Mac <strong>developer</strong> runtime</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=188043">Silverlight 4.0.50826.0 SDK</a></li>
</ul>
<p>I would install the developer build first and then the SDK and you’ll have a refreshed environment.  <strong>As with any release we try to get you the information as soon as possible and sometimes the information flows faster than the download servers replicate.</strong>  If you aren’t getting the updated bits using the links above, please be patient as the download servers from Microsoft refresh their replication caches.  </p>
<p>Note that when you now <em>create</em> a new project you’ll be using the new SDK and so the minRuntimeVersion (see above) of the project templates as well as compiled bits for your SL4 application will be using/requiring the updated runtime. </p>
<p>There are NO Visual Studio tools updates for this release so the Silverlight4_Tools.exe package is not needed to re-install. </p>
<h2>For Visual Studio LightSwitch Users</h2>
<p>When <a href="http://www.microsoft.com/lightswitch">Visual Studio LightSwitch</a> shipped they included a pre-release later build of Silverlight 4.  This caused some issues for customers who were using a single machine to evaluate LightSwitch but also using the same machine.  Any Silverlight 4 application developed and deployed would give customers messages indicating that they needed a later version of Silverlight, but were unable to acquire a compatible version!</p>
<p>This is now solved with this service release.  Simply put: <strong>If you are using LightSwitch, install the updated developer runtime and SDK</strong>.  This will solve this issue and allow you to develop LightSwitch applications as well as production Silverlight 4 applications.</p>
<p>Hope this helps!  As always if you have feedback on Silverlight, <a href="http://timheuer.com/blog/archive/2010/05/03/ways-to-give-feedback-on-silverlight.aspx">here are some methods of providing feedback to our team</a>.</p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/expression/default.aspx" rel="tag">expression</a>, <a href="http://timheuer.com/blog/tags/riaservices/default.aspx" rel="tag">riaservices</a>, <a href="http://timheuer.com/blog/tags/lightswitch/default.aspx" rel="tag">lightswitch</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/ria/default.aspx" rel="tag">ria</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14777.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/IDiOehnGwekf3Poy7VXxyz4axac/0/da"><img src="http://feedads.g.doubleclick.net/~a/IDiOehnGwekf3Poy7VXxyz4axac/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/IDiOehnGwekf3Poy7VXxyz4axac/1/da"><img src="http://feedads.g.doubleclick.net/~a/IDiOehnGwekf3Poy7VXxyz4axac/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/6hYelXIjOCk" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/09/02/silverlight-4-service-release-september-2010.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new Kindle 3 review–comparing against Kindle 2</title>
		<link>http://www.top-silverlight.com/2010/08/28/my-new-kindle-3-reviewcomparing-against-kindle-2.html</link>
		<comments>http://www.top-silverlight.com/2010/08/28/my-new-kindle-3-reviewcomparing-against-kindle-2.html#comments</comments>
		<pubDate>Sat, 28 Aug 2010 06:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/08/28/my-new-kindle-3-reviewcomparing-against-kindle-2.html</guid>
		<description><![CDATA[When I first saw the Kindle 3 (is that even the new name?) was going to be offered with WiFi, I thought that was cool.  Then when I saw the price (USD $139) I figured it was a no-brainer to explore.  I had bought my wife a Kindle 2 a while back ($249 when I [...]]]></description>
			<content:encoded><![CDATA[<p>When I first saw the <a href="http://www.amazon.com/gp/product/B002Y27P3M?ie=UTF8&amp;tag=meoffa-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002Y27P3M"><strong>Kindle 3</strong></a> (is that even the new name?) was going to be offered with WiFi, I thought that was cool.  Then when I saw the price (USD $139) I figured it was a no-brainer to explore.  I had bought my wife a Kindle 2 a while back ($249 when I purchased it) as she is a reader and I thought she’d like it.  She does.  It turns out though, so do I!  I’ve found myself reading a LOT more lately and I really like the versatility this provides me in switching between books.  (If you are interested in seeing what I’m reading or just finished you can <a href="http://www.goodreads.com/user/show/3346629-tim-heuer">see my list on goodreads.com</a>.)</p>
<p>Anyway, back on to the Kindle 3.  I just got mine today and wanted to share my first impressions/comparisons.  By no means is this an exhaustive review, but I compared for my own edification and thought I would share.</p>
<h2>First Impressions</h2>
<p>Amazon’s packaging of the <strong><a href="http://www.amazon.com/gp/product/B002Y27P3M?ie=UTF8&amp;tag=meoffa-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002Y27P3M">Kindle</a></strong> since their first versions are great.  The self-contained box is awesome…unzip the recyclable cardboard and there it is.  No additional box to open.  It’s simple, and puts the focus on the device.  The box includes 3 things: Kindle, power cord and a user guide (that I almost mistook for a <a href="http://fieldnotesbrand.com/">Field Notes</a> large notebook).  The new device is compact, well-designed and attractive.  My first impressions were very good.</p>
<h2>Power-on experience and WiFi connectivity</h2>
<p>I powered it on and was instantly ready to go.  The user guide popped up with some initial information.  Having had a Kindle before, I ignored it all of course.  The next screen encouraged me to register the device and change the device name.  Before I could do that I needed some level of connectivity.  My home has two stories and my wireless router is upstairs <em>behind</em> a structured wiring panel.  For my laptop, mobile devices, etc. this hasn’t been a problem.  It isn’t the strongest signal, but it has done well.</p>
<p>The Kindle saw the wireless network fine and showed an adequate representation of signal strength.  I entered my password (WPA2) and it failed to connect.  And then I entered it again and it failed.  And again.  Then I tried “manual” and essentially just verified the information and clicked connect (my WPA2 password was already filled in the manual registration based on previous attempts).  This time it connected.  My gut tells me that the WiFi antenna isn’t the strongest on the Kindle device, so keep that in mind where you plan on using it.  I don’t see this as a huge issue as generally when you’d use it you are likely to be in a good range.  But so far my experience is that the range is much less than normal for Kindle than for other traditional devices.</p>
<h2>Transferring content</h2>
<p>There was an option for “transfer” of existing data (email profile and data).  Since I was planning on keeping both of them I chose to skip that.  There was an option to transfer Collections created from another device.  It showed me my device list, I selected it and the collections were transferred.  Simple.</p>
<h2>Hardware</h2>
<p>The hardware is physically smaller than the Kindle 2:</p>
<p><img src="http://storage2.timheuer.com/photo_5.JPG" style="float: none;margin-left: auto;margin-right: auto" alt="" /></p>
<p><img src="http://storage2.timheuer.com/photo_1.JPG" style="float: none;margin-left: auto;margin-right: auto" alt="" /></p>
<p>If you look at the second picture above you’ll see how they were able to reduce some width and height.  NOTE: While I’m sure there are some millimeter measurement differences in the thickness, I found it to be negligible…the blind eye wouldn’t notice much of any difference.</p>
<p>I tried to line up the screens (which is the same size) so you could see where the reduction is.  The keyboard keys are spaced the same amount apart (again <em>maybe</em> millimeter closer), but notice the removal of the numbered keys.  That eliminated an entire row from the keyboard.  On the width side of things, the next/previous page buttons are no longer labeled and are much thinner – this is noticeable, and welcomed.  There is now matching next/prev buttons on <strong>both</strong> sides of the Kindle so no matter how you hold it.  </p>
<p><img src="http://storage2.timheuer.com/photo_2.JPG" style="float: none;margin-left: auto;margin-right: auto" alt="" /></p>
<p>The home, menu and back buttons are moved into the keyboard area along with a d-pad like replacement of the Kindle 2’s knob, again a welcome replacement in design and usability for me.</p>
<p>The Kindle 3 also seems to weigh a slight bit less and I think this is due to a more plastic design than the metal backing on the Kindle 2.  I like the new Kindle material as it feels a little less industrial and more stylish.  </p>
<h2>Software</h2>
<p>One of my nags about the Kindle is not in the reading responsiveness, but rather in interacting with the menu system, the store, and navigating the device.  I was pleasantly surprised on the new Kindle 3 at the speed and responsiveness in everything I interacted with.  <em>For me</em>, this was very noticeable improvement on my previous experience.  The Kindle 2 isn’t <em>bad</em>, but it’s like driving a 200 horsepower engine after just driving a 550 horsepower engine.  The former isn’t bad and is adequate, but now that you’ve had more power, it’s hard to enjoy the adequacy.  </p>
<p>I think that this will greatly improve my overall experience on the device and for others.  The knob on the Kindle 2 may actually be the issue as I’ve always felt a delay in response after issuing a command.  Not so on Kindle 3 as interaction with the d-bad/arrows has been immediate for me.  Page turning comparisons between Kindle 2 and 3 is about the same in my book.  I want to believe the new one is faster, but honestly I can’t tell much of a difference.  It wasn’t bad for me before.</p>
<p>The software on the Kindle 3 reads “3.0” whereas my Kindle 2 is 2.5.6 right now so understandably there are some differences.  Perhaps the Kindle 2 will get an update that results in better responsiveness.</p>
<h2>Browser</h2>
<p>This was the biggest surprise to me.  The browser (which is actually in the “experimental” area of the Kindle OS) on the Kindle 2 sucks.  It <em>barely</em> works.  Lynx is a better browsing experience.  Seriously.  Knowing this I fired it up on the Kindle 3.  Wow.  I was impressed.  Here is Amazon’s home page on Kindle 2:</p>
<p><img src="http://storage2.timheuer.com/photo_4.JPG" style="float: none;margin-left: auto;margin-right: auto" alt="" /></p>
<p>and on Kindle 3:</p>
<p><img src="http://s3.amazonaws.com:80/storage2.timheuer.com/photo_3.JPG" style="float: none;margin-left: auto;margin-right: auto" alt="" /></p>
<p>Most other sites are able to render well also.  Sure it is still monochromatic, but I don’t expect to be watching Hulu or anything on my e-reader.  It’s a primary-purpose device for me with ancillary benefits…and a MUCH better browser is a welcome experience for the few times I’ve actually wanted/needed to use it.  Bravo Amazon, bravo.</p>
<h2>Wireless connectivity</h2>
<p>Now the Kindle 2 always came with “3G” connectivity…that was the only wireless option.  The Kindle 3 offered a new option, WiFi only (in addition to WiFi+3G for a larger price).  I chose the WiFi only one because the times I’ve actually used the wireless connectivity (to buy a new book and to sync pages for my other reading devices) has been in areas where I would have had WiFi anyway.  The cost savings made it even easier of a decision.</p>
<p>The WiFi seems adequate speeds when connected to an access point in good range.  Again, this isn’t as big of deal for me because I don’t use it that much.  My Kindle 2 sucked down battery like crazy when I kept wireless on.  I’m keeping WiFi on my Kindle 3 initially to see the battery life.  Honestly though, unless I’m actually interacting with connectivity, I turn it off anyway…there isn’t a need for it on otherwise in my opinion.</p>
<h2>Summary</h2>
<p>If you’ve been holding back on getting a Kindle, the $139 WiFi only version just released should remove most, if not all, barriers in your decision.  For what you are getting on that price in an e-reader is amazing.  Sure I can get an iPad for 3x the cost and have Kindle on that, but I’m not sure it would make a good e-reader as a primary purpose device.  Also, take a look at <a href="http://www.bit-101.com/blog/?p=2722">this comparison of quality for reading purposes between iPad and Kindle</a>.</p>
<p>My initial impressions of Kindle 3 as a previous Kindle user are awesome.  I’m impressed above the existing device I have and would recommend Kindle 3 to anyone on the fence about getting one.  If you think it is an iPad competitor, then you won’t be happy with it, but compared to other reader-specific devices out there, the price, the design and the available library of books is unmatched.  Go <a href="http://www.amazon.com/gp/product/B002Y27P3M?ie=UTF8&amp;tag=meoffa-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002Y27P3M">buy it now</a>.    </p>
<div><span>tags: <a rel="tag" href="http://timheuer.com/blog/tags/kindle/default.aspx">kindle</a>, <a rel="tag" href="http://timheuer.com/blog/tags/amazon/default.aspx">amazon</a>, <a rel="tag" href="http://timheuer.com/blog/tags/ereader/default.aspx">ereader</a>, <a rel="tag" href="http://timheuer.com/blog/tags/reader/default.aspx">reader</a>, <a rel="tag" href="http://timheuer.com/blog/tags/e-reader/default.aspx">e-reader</a>, <a rel="tag" href="http://timheuer.com/blog/tags/e-ink/default.aspx">e-ink</a>, <a rel="tag" href="http://timheuer.com/blog/tags/ipad/default.aspx">ipad</a>, <a rel="tag" href="http://timheuer.com/blog/tags/ebook/default.aspx">ebook</a>, <a rel="tag" href="http://timheuer.com/blog/tags/e-books/default.aspx">e-books</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14776.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/3czEvqGa8p1N0UBIqinErJGy5LA/0/da"><img src="http://feedads.g.doubleclick.net/~a/3czEvqGa8p1N0UBIqinErJGy5LA/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/3czEvqGa8p1N0UBIqinErJGy5LA/1/da"><img src="http://feedads.g.doubleclick.net/~a/3czEvqGa8p1N0UBIqinErJGy5LA/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/FdyYyYWrMAI" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/08/28/my-new-kindle-3-reviewcomparing-against-kindle-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing and playing media on Windows Phone 7</title>
		<link>http://www.top-silverlight.com/2010/08/17/storing-and-playing-media-on-windows-phone-7.html</link>
		<comments>http://www.top-silverlight.com/2010/08/17/storing-and-playing-media-on-windows-phone-7.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 08:52:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/08/17/storing-and-playing-media-on-windows-phone-7.html</guid>
		<description><![CDATA[In talking with a friend about some Windows Phone 7 and Silverlight stuff recently.  He was giving me some great feedback about a few things (all of which I’ve passed along).  One of the things was what I felt was a common task that might exist in the mobile space but admittedly isn’t as clear [...]]]></description>
			<content:encoded><![CDATA[<p>In talking with a <a href="http://twitter.com/chrisntr">friend</a> about some Windows Phone 7 and <a href="http://www.silverlight.net">Silverlight</a> stuff recently.  He was giving me some great feedback about a few things (all of which I’ve passed along).  One of the things was what I felt was a common task that might exist in the mobile space but admittedly isn’t as clear if you are just coming to WP7 development.  The scenario is that of downloading media files and storing them for later playback.</p>
<p>WP7 does not have a storage mechanism like SQLLite on the device, but since it is Silverlight, you do have Isolated Storage you can use leveraging the same .NET class libraries from the full framework.  Here’s a sample app that demonstrates <strong>downloading an MP3 and storing for later playback on Windows Phone 7</strong>.</p>
<h2>The Scenario</h2>
<p>First, to make the scenario clear, say you are building a specific app for your brand’s media archives (audio and/or video).  You want to enable the user to selectively (or automatically) download the media to their device.  You want the user to be able to playback the downloaded media while offline later.  The media in this scenario is an MP3 file, a common audio format.</p>
<h2>The Pieces</h2>
<p>In order to do this we’ll assume the following:</p>
<ul>
<li>You have an absolute URI to the MP3 file.</li>
<li>You have some type of UI to display to the user a list of media for your application</li>
<li>Some type of UI to control the playback (play/stop/etc.)</li>
</ul>
<p>For demonstration purposes my UI will not be very ‘user friendly’ as it is meant to be diagnostic in explaining the task.  I will have a ListBox that I’ll use to bind to the list of downloaded items, a TextBox to give an option to download an MP3 file, and three (3) buttons: Download (to fetch the file and store for later), Play and Stop.  Here is the XAML I’ve used starting with the blank Windows Phone Application using the <strong><a href="http://www.silverlight.net/getstarted/devices/windows-phone/">Windows Phone Developer Tools</a></strong> available to developers.</p>
<div>
<div>
<pre><span>   1:</span> <span>&lt;!--LayoutRoot is the root grid where all page content is placed--&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   2:</span> <span>&lt;</span><span>Grid</span> <span>x:Name</span><span>="LayoutRoot"</span> <span>Background</span><span>="Transparent"</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   3:</span>     <span>&lt;</span><span>Grid.RowDefinitions</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>         <span>&lt;</span><span>RowDefinition</span> <span>Height</span><span>="Auto"</span><span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>         <span>&lt;</span><span>RowDefinition</span> <span>Height</span><span>="*"</span><span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     <span>&lt;/</span><span>Grid.RowDefinitions</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>     <span>&lt;!--TitlePanel contains the name of the application and page title--&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>     <span>&lt;</span><span>StackPanel</span> <span>x:Name</span><span>="TitlePanel"</span> <span>Grid</span>.<span>Row</span><span>="0"</span> <span>Margin</span><span>="12,9,0,40"</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  10:</span>         <span>&lt;</span><span>TextBlock</span> <span>x:Name</span><span>="ApplicationTitle"</span> <span>Text</span><span>="AUDIO SAMPLES"</span> <span>Style</span><span>="{StaticResource PhoneTextNormalStyle}"</span><span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  11:</span>         <span>&lt;</span><span>TextBlock</span> <span>x:Name</span><span>="PageTitle"</span> <span>Text</span><span>="MP3"</span> <span>Margin</span><span>="9,-8,0,0"</span> <span>Style</span><span>="{StaticResource PhoneTextTitle1Style}"</span><span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  12:</span>     <span>&lt;/</span><span>StackPanel</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  13:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  14:</span>     <span>&lt;!--ContentPanel - place additional content here--&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  15:</span>     <span>&lt;</span><span>Grid</span> <span>x:Name</span><span>="ContentPanel"</span> <span>Grid</span>.<span>Row</span><span>="1"</span> <span>Margin</span><span>="12,0,12,0"</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  16:</span>         <span>&lt;</span><span>TextBlock</span> <span>Height</span><span>="67"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="6,6,0,0"</span> <span>Name</span><span>="textBlock1"</span> <span>Text</span><span>="Showing how to store and playback MP3 files on the device."</span> <span>VerticalAlignment</span><span>="Top"</span> <span>TextWrapping</span><span>="Wrap"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  17:</span>         <span>&lt;</span><span>ListBox</span> <span>Height</span><span>="150"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="6,79,0,0"</span> <span>Name</span><span>="listBox1"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="444"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  18:</span>         <span>&lt;</span><span>ProgressBar</span> <span>x:Name</span><span>="DownloadProgress"</span> <span>IsIndeterminate</span><span>="False"</span> <span>Style</span><span>="{StaticResource PerformanceProgressBar}"</span> <span>Margin</span><span>="6,-60,0,0"</span><span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  19:</span>         <span>&lt;</span><span>TextBlock</span> <span>Height</span><span>="30"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="12,298,0,0"</span> <span>Name</span><span>="textBlock2"</span> <span>Text</span><span>="URL to download"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="175"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  20:</span>         <span>&lt;</span><span>TextBox</span> <span>Height</span><span>="72"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="0,334,0,0"</span> <span>Name</span><span>="mpsUri"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="460"</span> <span>Text</span><span>="http://files.sparklingclient.com/099_2010.07.09_WP7_Phones_In_The_Wild.mp3"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  21:</span>         <span>&lt;</span><span>Button</span> <span>Content</span><span>="DOWNLOAD"</span> <span>Height</span><span>="72"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="12,399,0,0"</span> <span>Name</span><span>="button1"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="438"</span> <span>Click</span><span>="button1_Click"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  22:</span>         <span>&lt;</span><span>Button</span> <span>Content</span><span>="PLAY"</span> <span>Height</span><span>="72"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="12,477,0,0"</span> <span>Name</span><span>="button2"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="220"</span> <span>Click</span><span>="button2_Click"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  23:</span>         <span>&lt;</span><span>MediaElement</span> <span>Height</span><span>="43"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="6,555,0,0"</span> <span>Name</span><span>="mediaPlayback"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="438"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  24:</span>         <span>&lt;</span><span>Button</span> <span>Content</span><span>="STOP"</span> <span>Height</span><span>="72"</span> <span>HorizontalAlignment</span><span>="Left"</span> <span>Margin</span><span>="230,477,0,0"</span> <span>Name</span><span>="button3"</span> <span>VerticalAlignment</span><span>="Top"</span> <span>Width</span><span>="220"</span> <span>Click</span><span>="button3_Click"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  25:</span>     <span>&lt;/</span><span>Grid</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  26:</span> <span>&lt;/</span><span>Grid</span><span>&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>You can see that I’m not using any advanced pattern development here for two reasons: 1) it doesn’t need it and 2) I want to focus on specific tasks to isolate this learning.  Therefore if you don’t like Click handlers in your Button XAML, then you can flog me later <img src='http://www.top-silverlight.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<h2>Downloading the media</h2>
<p>The first step in my sample is to download some media.  I’ve chosen a favorite podcast, the <a href="http://www.sparklingclient.com/">Sparkling Client</a> as my sample file.  I hope they don’t mind.  In fact you may want to pick a small MP3 file to test on one of your servers so you don’t have to wait a while for the download to complete.</p>
<blockquote>
<p>SIDE NOTE: I like how Sparkling Client has become more of short review of the times with regard to Silverlight.  Good to see some perspectives (and rumors).  It’s like a live version of <a href="http://www.silverlightcream.com">Dave Campbell’s Silverlight Cream</a>.</p>
</blockquote>
<p>Because typing long things in the emulator is, well, annoying, I’ve prepopulated the URI TextBox (mpsUrl) with a specific URL.  Feel free to change this or enter a new MP3 URI in the emulator.  The next step is to execute the download.  I’m choosing to use WebClient.OpenReadAsync in this regard.  It’s simple and gets the job done.  Admittedly I wish that there was an OpenReadDownloadProgress argument available (as there is for DownloadStringAsync) but there is not.  </p>
<p>Because there is no actual progress value provided for me, I do want to provide the user <em>some</em> feedback that something is happening.  To do this in my sample I am using <strong><a href="http://www.jeff.wilcox.name/2010/08/performanceprogressbar/">Jeff Wilcox’s “High Performance ProgressBar” for Windows Phone 7</a></strong>.  I’m not going to go into the details of why and how to hook it up – read his post.  I followed the exact same instructions.  </p>
<blockquote>
<p>NOTE: When using the progress bar, don’t (only) set Visibility to collapsed if that is one of your mechanisms for displaying/hiding it, <strong>but be sure to set IsIndeterminate to false </strong>when not using it.</p>
</blockquote>
<p>When I start the download, I start the ProgressBar to show the user <em>some</em> type of feedback that something is happening.  Here’s the code for the function:</p>
<div>
<div>
<pre><span>   1:</span> <span>private</span> <span>void</span> button1_Click(<span>object</span> sender, RoutedEventArgs e)</pre>
<p><!--CRLF--></p>
<pre><span>   2:</span> {</pre>
<p><!--CRLF--></p>
<pre><span>   3:</span>     <span>string</span> fileName = System.IO.Path.GetFileName(mpsUri.Text);</pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>     <span>// start the download of the MP3</span></pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     WebClient wc = <span>new</span> WebClient();</pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>     wc.OpenReadCompleted += ((s, args) =&gt;</pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span>  10:</span>             DownloadProgress.IsIndeterminate = <span>false</span>;</pre>
<p><!--CRLF--></p>
<pre><span>  11:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  12:</span>             <span>// once get the streams, put in isolated storage</span></pre>
<p><!--CRLF--></p>
<pre><span>  13:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  14:</span>         });</pre>
<p><!--CRLF--></p>
<pre><span>  15:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  16:</span>     wc.OpenReadAsync(<span>new</span> System.Uri(mpsUri.Text, System.UriKind.RelativeOrAbsolute));</pre>
<p><!--CRLF--></p>
<pre><span>  17:</span>     DownloadProgress.IsIndeterminate = <span>true</span>;</pre>
<p><!--CRLF--></p>
<pre><span>  18:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>And here’s a quick screenshot of what it looks like running:</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="Windows Phone 7 progress bar" src="http://storage2.timheuer.com/wp7-media-progress.png" /></p>
<p>Simple enough…let’s store the downloaded bits now.</p>
<h2>Storing the media to IsolatedStorage</h2>
<p>The result of OpenReadAsync is a Stream.  Using IsolatedStorage and specifically IsolatedStorageFileStream, I can write out those bits to a file that is stored in my device’s storage location.  Normally in the browser Silverlight world I would have to calculate the amount of storage needed, see if it is available and, if not, request a quota increase to the user.  I don’t have to do that in the phone world.  I can just begin to write out the data.  Ideally, however, I should check for available space since it is entirely possible the user has used all their storage.  This sample does not accommodate that logic.</p>
<p>In my OpenReadCompleted event I add the following logic:</p>
<div>
<div>
<pre><span>   1:</span> <span>// snipped</span></pre>
<p><!--CRLF--></p>
<pre><span>   2:</span> wc.OpenReadCompleted += ((s, args) =&gt;</pre>
<p><!--CRLF--></p>
<pre><span>   3:</span> {</pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>     DownloadProgress.IsIndeterminate = <span>false</span>;</pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     <span>// once get the streams, put in isolated storage</span></pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>     <span>using</span> (var store = IsolatedStorageFile.GetUserStoreForApplication())</pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>         <span>if</span> (store.FileExists(fileName))</pre>
<p><!--CRLF--></p>
<pre><span>  10:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span>  11:</span>             store.DeleteFile(fileName);</pre>
<p><!--CRLF--></p>
<pre><span>  12:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span>  13:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  14:</span>         <span>using</span> (var fs = <span>new</span> IsolatedStorageFileStream(fileName, FileMode.Create, store))</pre>
<p><!--CRLF--></p>
<pre><span>  15:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span>  16:</span>             <span>byte</span>[] bytesInStream = <span>new</span> <span>byte</span>[args.Result.Length];</pre>
<p><!--CRLF--></p>
<pre><span>  17:</span>             args.Result.Read(bytesInStream, 0, (<span>int</span>)bytesInStream.Length);</pre>
<p><!--CRLF--></p>
<pre><span>  18:</span>             fs.Write(bytesInStream, 0, bytesInStream.Length);</pre>
<p><!--CRLF--></p>
<pre><span>  19:</span>             fs.Flush();</pre>
<p><!--CRLF--></p>
<pre><span>  20:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span>  21:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span>  22:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  23:</span>     RefreshIsoFiles();</pre>
<p><!--CRLF--></p>
<pre><span>  24:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  25:</span> });</pre>
<p><!--CRLF--></p>
<pre><span>  26:</span> // snipped</pre>
<p><!--CRLF--></div>
</div>
<p>You can see that I’m writing out the file stream to a file using the same name as the MP3 file literally (which may not make sense to the user, so again this is one of those ‘polish’ areas you’d want to make better and perhaps organize the files in IsolatedStorage better).</p>
<p>The last step you see is a call to RefreshIsoFiles.  This is a function that I also call when the first user interface page is loaded.  It traverses the IsolatedStorage for the app to display the already stored media in the ListBox in our XAML:</p>
<div>
<div>
<pre><span>   1:</span> <span>private</span> <span>void</span> RefreshIsoFiles()</pre>
<p><!--CRLF--></p>
<pre><span>   2:</span> {</pre>
<p><!--CRLF--></p>
<pre><span>   3:</span>     <span>string</span>[] fileList;</pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>     <span>using</span> (var store = IsolatedStorageFile.GetUserStoreForApplication())</pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>         fileList = store.GetFileNames();</pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>     listBox1.ItemsSource = fileList;</pre>
<p><!--CRLF--></p>
<pre><span>  10:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Now we have our data downloaded and ready for playback.</p>
<h2>Playing back the stored media</h2>
<p>So great, now you have a stored MP3 file and you want to play it back.  Remember the XAML above and that I have a MediaElement there.  MediaElement is so simple at playing back media files from a URI.  Simply set the source of MediaElement and you can then call Play() and other functions.  </p>
<p>The challenge is that we now have our media in IsolatedStorage and there isn’t a URI scheme for IsolatedStorage that is predictable to the developer.  What we are left with is opening the media as a Stream and feeding that to the MediaElement.  This introduces MediaStreamSource.  If you aren’t familiar with this API, you’re probably not alone.  This is the API that enables a few scenarios, namely Smooth Streaming playback for Silverlight.  It is an extensible API so that you could wrap your own decode logic, etc. as needed.  Now given that MP3 is a common format you’d think it would be simple to do this…but there isn’t one built-in method for these various different codecs.</p>
<p>When MediaStreamSource was introduced, the program manager on that feature had written some helper files as code samples for developers to use.  One of them was an MP3 MediaStreamSource helper.  I wrote about them and where you can get them: <strong><a href="http://timheuer.com/blog/archive/2008/10/01/mediastreamsource-sample-with-source-code.aspx">MediaStreamSource for Silverlight</a></strong>.  Here’s where some awesome code re-use comes in to play.</p>
<p>I downloaded the ManagedMediaHelpers project and built the Mp3MediaStreamSource project (which also builds MediaHelpers).  In my WP7 project I simply added a reference to these in my project.  I was able to use these Silverlight binaries directly in my WP7 project! (I’ve included the compiled binaries in this sample for convenience but you can also see the source link in the article above.)</p>
<p>Now I need to read the media from IsolatedStorage as a stream, feed that Stream into my MediaStreamSource, and set that as the source for my MediaElement.  Here’s the relevant code on the Play button on my sample:</p>
<div>
<div>
<pre><span>   1:</span> <span>private</span> <span>void</span> button2_Click(<span>object</span> sender, RoutedEventArgs e)</pre>
<p><!--CRLF--></p>
<pre><span>   2:</span> {</pre>
<p><!--CRLF--></p>
<pre><span>   3:</span>     <span>if</span> (listBox1.SelectedItem == <span>null</span>)</pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>         MessageBox.Show(<span>"choose an item to play back!"</span>);</pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>     <span>else</span></pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>         <span>using</span> (var store = IsolatedStorageFile.GetUserStoreForApplication())</pre>
<p><!--CRLF--></p>
<pre><span>  10:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span>  11:</span>             audio = store.OpenFile(listBox1.SelectedItem.ToString(), FileMode.Open);</pre>
<p><!--CRLF--></p>
<pre><span>  12:</span>             <span>// play it back as a MSS</span></pre>
<p><!--CRLF--></p>
<pre><span>  13:</span>             mss = <span>new</span> Media.Mp3MediaStreamSource(audio);</pre>
<p><!--CRLF--></p>
<pre><span>  14:</span>             mediaPlayback.SetSource(mss);</pre>
<p><!--CRLF--></p>
<pre><span>  15:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span>  16:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span>  17:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>The media now plays back on the phone.  My Stop button basically closes the stream (audio and mss are member variables of the project) and nulls out references.</p>
<h2>Summary</h2>
<p>This is I think what might be a common application scenario for WP7 (downloading media for playback later).  Hopefully over time our platform will improve to make some of this better (i.e., progress indication), but for now this should help those get started on this task.  The meat of the solution is in the MediaStreamSource implementation.  If you are working with MP3 format, then the sample code will help you greatly as it’s mostly done!  There are other implementations floating around for <a href="http://code.msdn.microsoft.com/wavmss">WAV</a> and other things as well if you need them.</p>
<p>Hopefully this might nudge <a href="http://twitter.com/chrisntr">Chris</a> along the right path and be a helpful tip to others as well.  If you have any feedback on the implementation or a better way of doing this, please share!  Here’s the solution bits to my sample in full: <a href="http://storage2.timheuer.com/Mp3StoreandPlayback.zip">Mp3StoreandPlayback.zip</a>.</p>
<p>Hope this helps!
  </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/wp7dev/default.aspx" rel="tag">wp7dev</a>, <a href="http://timheuer.com/blog/tags/wp7/default.aspx" rel="tag">wp7</a>, <a href="http://timheuer.com/blog/tags/windows-phone/default.aspx" rel="tag">windows-phone</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/mediastreamsource/default.aspx" rel="tag">mediastreamsource</a>, <a href="http://timheuer.com/blog/tags/media/default.aspx" rel="tag">media</a>, <a href="http://timheuer.com/blog/tags/mp3/default.aspx" rel="tag">mp3</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14775.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/Buso0a20SDsh3F2wg-_6U16b82E/0/da"><img src="http://feedads.g.doubleclick.net/~a/Buso0a20SDsh3F2wg-_6U16b82E/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/Buso0a20SDsh3F2wg-_6U16b82E/1/da"><img src="http://feedads.g.doubleclick.net/~a/Buso0a20SDsh3F2wg-_6U16b82E/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/XA4VPHmoWIY" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/08/17/storing-and-playing-media-on-windows-phone-7.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://files.sparklingclient.com/099_2010.07.09_WP7_Phones_In_The_Wild.mp3" length="19056032" type="audio/mpeg" />
		</item>
		<item>
		<title>Debugging Silverlight with Visual Studio and Firefox</title>
		<link>http://www.top-silverlight.com/2010/08/17/debugging-silverlight-with-visual-studio-and-firefox.html</link>
		<comments>http://www.top-silverlight.com/2010/08/17/debugging-silverlight-with-visual-studio-and-firefox.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 08:52:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/08/17/debugging-silverlight-with-visual-studio-and-firefox.html</guid>
		<description><![CDATA[Suppose you use Firefox as your default web browser and you are a Silverlight developer using Visual Studio.  You may have been frustrated at times in being able to get the debugger to attach to your breakpoints.  You’ve triple-checked that you are in debug mode, that the Silverlight checkbox is marked in the hosting web [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you use Firefox as your default web browser and you are a <a href="http://www.silverlight.net">Silverlight</a> developer using Visual Studio.  You may have been frustrated at times in being able to get the debugger to attach to your breakpoints.  You’ve triple-checked that you are in debug mode, that the Silverlight checkbox is marked in the hosting web application’s property pages and it still is not breaking for you.  You stare at the dreaded empty red circle in Visual Studio reading the tooltip of “No debug symbols have been loaded…” a thousand times.</p>
<p>But it works in Internet Explorer.</p>
<p>I’ve faced this a few times and always forget the tip.  I’m recording it for my own posterity, but hopefully it will help others as well.</p>
<p>Here’s how to ensure the VS debugger attaches to the Silverlight app for debugging:</p>
<ul>
<li>In Firefox address bar type <strong>about:config</strong></li>
<li>Read the warning, choose your preference to always remind you or not and accept</li>
<li>In the search bar of the config options now type: <strong>npctrl</strong></li>
<li>You should then see the entry: <strong>dom.ipc.plugins.enabled.npctrl.dll</strong></li>
<li>Change the value from <strong>true</strong> to <strong>false</strong> (simply double-clicking will change this for you)</li>
<li>Restart Firefox</li>
</ul>
<p>And your debugging should come back to normal.  It has frustrated me more than once.  Hopefully it helps some others.   </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/firefox/default.aspx" rel="tag">firefox</a>, <a href="http://timheuer.com/blog/tags/debugging/default.aspx" rel="tag">debugging</a>, <a href="http://timheuer.com/blog/tags/visual+studio/default.aspx" rel="tag">visual studio</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14774.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/PESdCuIqNRqbVxxekapaVXBFYxc/0/da"><img src="http://feedads.g.doubleclick.net/~a/PESdCuIqNRqbVxxekapaVXBFYxc/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/PESdCuIqNRqbVxxekapaVXBFYxc/1/da"><img src="http://feedads.g.doubleclick.net/~a/PESdCuIqNRqbVxxekapaVXBFYxc/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/H4jIRLTBqCE" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/08/17/debugging-silverlight-with-visual-studio-and-firefox.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pano versus Pivot: Windows Phone Design Days content available</title>
		<link>http://www.top-silverlight.com/2010/08/15/pano-versus-pivot-windows-phone-design-days-content-available.html</link>
		<comments>http://www.top-silverlight.com/2010/08/15/pano-versus-pivot-windows-phone-design-days-content-available.html#comments</comments>
		<pubDate>Sat, 14 Aug 2010 22:46:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/08/15/pano-versus-pivot-windows-phone-design-days-content-available.html</guid>
		<description><![CDATA[One of the biggest discussions I started getting into when Windows Phone development was announced to the world was sparked with this single question I posed to our internal Windows Phone developer teams:
What is the use case for when you would want to use a Pano versus Pivot application layout?
I asked this in the context [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest discussions I started getting into when Windows Phone development was announced to the world was sparked with this single question I posed to our internal Windows Phone developer teams:</p>
<p><em>What is the use case for when you would want to use a Pano versus Pivot application layout?</em></p>
<p>I asked this in the context of an application for Yelp that I was writing.  Information was <em>similar</em> but not identical.  It was only similar in the sense that the data was all about user reviews and venues.  In my eyes I saw this like the fact that games are similar in that they are games, but their individual information (the play) is different.</p>
<p>I guess I was expecting a definitive or clear view on when to use either given my use case I presented.  I laughed as I collected numerous various viewpoints from all areas of the dev platform folks.  It was clear there was no clarity for me.  I actually have saved the most concise definition the discussion generated and had been wanting to blog about it for a while.</p>
<p>Today, Jaime released a bunch of videos from a ‘design days’ event that was held in Redmond for Windows Phone developers.  They are all great, but there was one that caught my eye: <a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Pivot-and-Pano/">Windows Phone Design Days – Pivot and Pano</a>.  In this video a few UX researchers walk through some of the key tenets of each control.  Here’s some of my mental notes:</p>
<p><em><u>Pivot</u></em></p>
<ul>
<li>Application view manager </li>
<li>Filter same data on different views (the “inbox” is a great example of this) </li>
<li>Optimized for current screen size </li>
<li>Filter of data doesn’t have to be same view (agenda/day) </li>
<li>Related content is ok to pivot on as long as related content is truly related </li>
<li>Focused </li>
</ul>
<p><em><u>Panorama</u></em></p>
<ul>
<li>Horizontal broad canvas, not confined to current screen size </li>
<li>A ‘top layer’ view into underlying experiences/tasks </li>
<li>Exploratory in nature </li>
<li>Don’t use if you need an application bar</li>
<li>Don’t have a pano that takes the user to a pivot control constantly</li>
<li>Leverage things inherently interesting (use ‘about me’ type information)</li>
<li>Never place a pano *in* a pivot</li>
</ul>
<p>There was some good information in this video (like don’t use pivot/pano for wizard-based UI) and one of the better descriptions/examples of answering my root question.  The other videos are great and I encourage you to take a look at them.</p>
<ul>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Personas/">Ana and Miles, the Windows Phone personas</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Metro/">The Metro Design Language, the inspiration</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Applications/">Deconstructing a Windows Phone application part 1: Controls</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Animation/">Deconstructing a Windows Phone application part2: Animation</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Target-Sizes/">Deconstructing a Windows Phone application, part 3: Target Sizes</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Globalization/">Deconstructing a Windows Phone application, part 4: Globalization</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Perceived-Performance/">Deconstructing a Windows Phone application, part 6: Perceived performance</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Pivot-and-Pano/">Designer insights into Panorama and Pivot</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Audio/">Making Audio Sing on Windows Phone</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Voice/">Windows Phone Voice</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Blend/">Designer Resources: Expression Blend Overview and Roadmap</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Documentation/">Designer Resources:  Windows Phone Documentation</a></li>
<li><a href="http://channel9.msdn.com/posts/Jaime+Rodriguez/Windows-Phone-Design-Days-Templates/">Designer Resources: Windows Phone Design Templates</a></li>
</ul>
<p>I’d encourage you to take a look at all of these videos to get a good sense on some of the user experience research done for Windows Phone developers and how you can learn to target a great experience in your app/game.   </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/wp7dev/default.aspx" rel="tag">wp7dev</a>, <a href="http://timheuer.com/blog/tags/wp7/default.aspx" rel="tag">wp7</a>, <a href="http://timheuer.com/blog/tags/ria/default.aspx" rel="tag">ria</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/windows+phone+7/default.aspx" rel="tag">windows phone 7</a>, <a href="http://timheuer.com/blog/tags/windows+phone/default.aspx" rel="tag">windows phone</a>, <a href="http://timheuer.com/blog/tags/ux/default.aspx" rel="tag">ux</a>, <a href="http://timheuer.com/blog/tags/design/default.aspx" rel="tag">design</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14773.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/9J5Xy9DBcVNUtV-DfyO_4y5HkZc/0/da"><img src="http://feedads.g.doubleclick.net/~a/9J5Xy9DBcVNUtV-DfyO_4y5HkZc/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/9J5Xy9DBcVNUtV-DfyO_4y5HkZc/1/da"><img src="http://feedads.g.doubleclick.net/~a/9J5Xy9DBcVNUtV-DfyO_4y5HkZc/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/DOFtcjipnCY" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/08/15/pano-versus-pivot-windows-phone-design-days-content-available.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StringFormat and CurrentCulture in Silverlight</title>
		<link>http://www.top-silverlight.com/2010/08/12/stringformat-and-currentculture-in-silverlight.html</link>
		<comments>http://www.top-silverlight.com/2010/08/12/stringformat-and-currentculture-in-silverlight.html#comments</comments>
		<pubDate>Thu, 12 Aug 2010 12:42:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[新闻News]]></category>

		<guid isPermaLink="false">http://www.top-silverlight.com/2010/08/12/stringformat-and-currentculture-in-silverlight.html</guid>
		<description><![CDATA[I recently got a note about a nagging issue in using StringFormat in XAML binding expressions and how it doesn’t honor the current user’s culture settings.  This is true that there is an issue in that it doesn’t in WPF or Silverlight.  If you don’t know what I’m talking about, Silverlight introduced the ability to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got a note about a nagging issue in using StringFormat in XAML binding expressions and how it doesn’t honor the current user’s culture settings.  This is true that there is an issue in that it doesn’t in WPF or <a href="http://www.silverlight.net">Silverlight</a>.  If you don’t know what I’m talking about, Silverlight introduced the ability to use StringFormat in data binding expressions (WPF has had this since 3.5 SP1) so you could do some formatting in-line in your binding.  Like this:</p>
<div>
<div>
<pre><span>   1:</span> <span>&lt;</span><span>TextBlock</span> <span>Text</span><span>="{Binding Path=CurrentDate, StringFormat=Current Timestamp is: \{0:G\}}"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>This would result in text that would be formatted directly using your string Formatter without the need for code-behind or any generic ValueConverter.  This is a very helpful feature for formatting UI values as well as in some cases replacing ValueConverters for simple tasks.</p>
<p>The problem is that StringFormat isn’t honoring the user’s culture settings.  Take for example this complete XAML:</p>
<div>
<div>
<pre><span>   1:</span> <span>&lt;</span><span>StackPanel</span> <span>x:Name</span><span>="FooContainer"</span><span>&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   2:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   3:</span>     <span>&lt;</span><span>TextBlock</span> <span>x:Name</span><span>="CultureInfo"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   4:</span>     <span>&lt;</span><span>TextBlock</span> <span>x:Name</span><span>="UICultureInfo"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   5:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   6:</span>     <span>&lt;</span><span>TextBlock</span> <span>Text</span><span>="{Binding Path=CurrentDate, StringFormat=Current Timestamp is: \{0:G\}}"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   7:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>   8:</span>     <span>&lt;</span><span>TextBlock</span> <span>x:Name</span><span>="CostField"</span> <span>Text</span><span>="{Binding Path=Cost, StringFormat=Cost is: \{0:c\}}"</span> <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>   9:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  10:</span>     <span>&lt;</span><span>toolkit:GlobalCalendar</span>  <span>/&gt;</span></pre>
<p><!--CRLF--></p>
<pre><span>  11:</span>  </pre>
<p><!--CRLF--></p>
<pre><span>  12:</span> <span>&lt;/</span><span>StackPanel</span><span>&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>This is being bound to a simple object that exposes two properties for the purposes of demonstration: CurrentDate (DateTime) and Cost (double).  Using my standard US-English settings and regional preferences the output would be:</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="StringFormat with default culture" src="http://storage2.timheuer.com/stringformat-culture1.png" /></p>
<p>Now, let me tell my Silverlight app that I have a different culture information.  I can do this without having to force a language pack installation of sorts and completely change my machine.  Adding the culture/uiculture params to the &lt;object&gt; tag does the trick.  I’ll change it to “de-de” for German.  Here is the new output:</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="StringFormat with explicit culture" src="http://storage2.timheuer.com/stringformat-culture2.png" /></p>
<p>What?!  Even thought the settings recognize a different culture, StringFormat is not doing what I expect.  I would have expected a different date display for German settings (d.m.yyyy) and a different currency display instead of dollars.</p>
<p>Unfortunately this is an issue in StringFormat right now, but there is a simple workaround that if you are creating a localized app you can add to your code that shouldn’t affect your default language settings either.  In my constructor I add this line of code:</p>
<div>
<div>
<pre><span>   1:</span> <span>this</span>.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);</pre>
<p><!--CRLF--></div>
</div>
<p>This tells the markup system to use the current culture settings as the UI language.  XmlLanguage is a part of the System.Windows.Markup namespace, so ensure you call that out explicitly or add a using statement.  Now refreshing my German settings sample I get:</p>
<p><img style="float: none;margin-left: auto;margin-right: auto" alt="StringFormat with explicit culture" src="http://storage2.timheuer.com/stringformat-culture3.png" /></p>
<p>as expected.  Changing (or removing the explicit setting of culture in my &lt;object&gt; tag) back to my default culture settings results in my US-English preferences being used and no need for me to change the XAML.</p>
<p>Hope this helps!
  </p>
<div><span>tags: <a href="http://timheuer.com/blog/tags/silverlight/default.aspx" rel="tag">silverlight</a>, <a href="http://timheuer.com/blog/tags/xaml/default.aspx" rel="tag">xaml</a>, <a href="http://timheuer.com/blog/tags/wpf/default.aspx" rel="tag">wpf</a>, <a href="http://timheuer.com/blog/tags/localization/default.aspx" rel="tag">localization</a>, <a href="http://timheuer.com/blog/tags/ria/default.aspx" rel="tag">ria</a>, <a href="http://timheuer.com/blog/tags/stringformat/default.aspx" rel="tag">stringformat</a>, <a href="http://timheuer.com/blog/tags/currentculture/default.aspx" rel="tag">currentculture</a></span></div>
<div>
<hr />
<div>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
<p><img src="http://timheuer.com/blog/aggbug/14772.aspx" width="1" height="1" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/I19KafxbKFGsLKS3i4s17UljQno/0/da"><img src="http://feedads.g.doubleclick.net/~a/I19KafxbKFGsLKS3i4s17UljQno/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/I19KafxbKFGsLKS3i4s17UljQno/1/da"><img src="http://feedads.g.doubleclick.net/~a/I19KafxbKFGsLKS3i4s17UljQno/1/di" border="0"></img></a></p>
<p><img src="http://feeds.feedburner.com/~r/timheuer/~4/3L78YoDgfhk" height="1" width="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.top-silverlight.com/2010/08/12/stringformat-and-currentculture-in-silverlight.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
