
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://gmpg.org/xfn/11"><link rel="stylesheet" href="/themes/Automotive/css.axd?name=style1.6.1.0.css" type="text/css" /><link rel="shortcut icon" href="pics/blogengine.ico" type="image/x-icon" /><link rel="stylesheet" href="/themes/Automotive/css.axd?name=sifr/sIFR-screen1.6.1.0.css" type="text/css" media="screen" /><link rel="stylesheet" href="/themes/Automotive/css.axd?name=sifr/sIFR-print1.6.1.0.css" type="text/css" media="print" />

<script src="/themes/FunkyGrunge/sifr/sifr.js" type="text/javascript"></script>
<script src="/themes/FunkyGrunge/sifr/sifr-addons.js" type="text/javascript"></script>
<meta name="description" content="Continually looking for the yellow brick road so I can catch me a wizard...." /><meta name="author" content="Nick Randolph" /><link rel="contents" title="Archive" href="/archive.aspx" /><link rel="start" title="Nick's .NET Travels" href="/" /><link type="application/rdf+xml" rel="meta" title="SIOC" href="http://nicksnettravels.builttoroam.com/sioc.axd" /><link type="application/apml+xml" rel="meta" title="APML" href="http://nicksnettravels.builttoroam.com/apml.axd" /><link type="application/rdf+xml" rel="meta" title="FOAF" href="http://nicksnettravels.builttoroam.com/foaf.axd" /><link type="application/rss+xml" rel="alternate" title="Nick's .NET Travels" href="http://feeds.feedburner.com/NicksNetTravels" /><link type="application/rsd+xml" rel="edituri" title="RSD" href="http://nicksnettravels.builttoroam.com/rsd.axd" /><meta http-equiv="content-type" content="text/html; charset=utf-8" /><link type="application/opensearchdescription+xml" rel="search" title="Nick's .NET Travels" href="http://nicksnettravels.builttoroam.com/opensearch.axd" />
<!-- Start custom code -->
<meta name="google-site-verification" content="jcPttNvaAE8tk90K4uA6XFREEo3fMzJxYrDgAU1sMuA" />
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1403822-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<!-- End custom code -->
<link rel="prev" title="Previous page" href="/?page=2" /><script type="text/javascript" src="/js.axd?path=/dp.SyntaxHighlighter/Scripts/shCore.js"></script><script type="text/javascript" src="/js.axd?path=/dp.SyntaxHighlighter/Scripts/shBrushCSharp.js"></script><script type="text/javascript" src="/js.axd?path=/dp.SyntaxHighlighter/Scripts/shBrushXml.js"></script><script type="text/javascript" src="/js.axd?path=/dp.SyntaxHighlighter/Scripts/shBrushCss.js"></script><script type="text/javascript" src="/js.axd?path=/dp.SyntaxHighlighter/Scripts/shBrushJScript.js"></script><script type="text/javascript" src="/js.axd?path=/dp.SyntaxHighlighter/Scripts/shBrushVb.js"></script><link type="text/css" rel="stylesheet" href="/css.axd?name=/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" /><title>
	Nick's .NET Travels | Continually looking for the yellow brick road so I can catch me a wizard....
</title></head>
<body>
<div id="frame">
    <form name="aspnetForm" method="post" action="/default.aspx" id="aspnetForm" class="body">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTYwMTA0MjAxNw9kFgJmD2QWAgIDD2QWAmYPFgQeBGhyZWYFCy9sb2dpbi5hc3B4Hglpbm5lcmh0bWwFBkxvZyBpbmRk47K1fLSz0NHlH/n6kQGMgKhUzCc=" />
</div>

      <div id="content">
        <div id="contentinner">
          <div id="header">
            <p id="blogname"><a href="http://nicksnettravels.builttoroam.com/">Nick's .NET Travels</a></p>
            <p id="blogdesc">Continually looking for the yellow brick road so I can catch me a wizard....</p>
            <div id="menu"> <a href="javascript:void(BlogEngine.filterByAPML())" class="apmlfilter">Filter by APML</a>
              <ul>
                <li><a href="http://nicksnettravels.builttoroam.com/" rel="home">Home</a></li>
                <li><a href="http://nicksnettravels.builttoroam.com/archive.aspx">Archive</a></li>
                <li><a href="http://nicksnettravels.builttoroam.com/contact.aspx">Contact</a></li>
                <li><a href="http://feeds.feedburner.com/NicksNetTravels" class="feed"><img src="http://nicksnettravels.builttoroam.com/pics/rssButton.gif" alt="Feed" />Subscribe</a></li>
                <li><a href="/login.aspx" id="ctl00_aLogin">Log in</a></li>
              </ul>
            </div>
          </div>
          
          
  <div id="ctl00_cphBody_divError"></div>
  <div id="ctl00_cphBody_PostList1_posts" class="posts">

<div class="post xfolkentry" id="post0">
  <h1><a href="/post/2010/06/08/Windows-Phone-7-EnvironmentDeviceType-3d-Un-Blendable-code.aspx" class="taggedlink">Windows Phone 7 Environment.DeviceType = Un-Blendable code</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">8. June 2010 16:46</span>
  
  <div class="text"><p>So, you’ve decided to be really inventive and build some helper classes that work around the limitations of the Windows Phone 7 emulator (eg inability to simulate network connectivity, accelerometer, location, actually anything that isn’t in Silverlgiht for the desktop). Of course you don’t want this code to be used when the application runs on a real device so you have some code that looks like:</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ce4ddde4-d183-43c3-aed5-db1896773048" class="wlWriterEditableSmartContent"><pre name="code" class="c#">if (System.Environment.DeviceType == DeviceType.Device)
{
    // Device code
}
else
{
    // Emulator code
}</pre></div>

<p>This compiles and runs fine when working in Visual Studio and Blend. However, if this code is invoked as part of building the UI to be displayed in the designer (remember that both Visual Studio and Blend run a bit of code in the background to make sure things are created properly and that data contexts are created to facilitate data binding), you will likely see a message similar to the following.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7E.DeviceTypeUnBlendablecode_EBF4/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7E.DeviceTypeUnBlendablecode_EBF4/image_thumb.png" width="576" height="56" /></a> </p>

<p><strong>“Method not found: ‘System.DeviceType System.Environment.get_DeviceType()’.</strong></p>

<p>Right, you think, simple enough to fix, I just need to wrap this in a check to see whether it’s running in the designer or not:</p>

<p>
  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:284079c0-e85a-425a-918f-23131ef71dad" class="wlWriterEditableSmartContent"><pre name="code" class="c#">if (!DesignerProperties.IsInDesignTool &amp;&amp; System.Environment.DeviceType == DeviceType.Device)
{
    // Device code
}
else
{
    // Emulator code
}</pre></div>
</p>

<p>Unfortunately you’d be horrified to note that this does <strong>NOT</strong> get the error to disappear. The error is actually an error raised by the JIT compiler when it goes off looking for DeviceType property. Unfortunately there is no such property on the desktop so it throws an error. Typically JIT compilation is done on an “as required” and “method-level” basis which means that the whole method you are working in will be JITted together, resulting in the error even if the code will never be executed. The workaround…. just move the erroneous&#160; code to a method that won’t get JITted:</p>

<p>
  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:16f844b4-7a65-47f6-89df-6fe3a1157763" class="wlWriterEditableSmartContent"><pre name="code" class="c#"> if (!DesignerProperties.IsInDesignTool )
{
    DoRuntimeCode();
}
else
{
    // Designer code
}

private static void DoRuntimeCode()
{
    if (System.Environment.DeviceType == DeviceType.Device)
    {
        // Device code
    }
    else
    {
        // Emulator code
    }
}</pre></div>
</p>

<p>Problem fixed…. happy coding.</p>

<p>(FWIW this is a trick that Windows Mobile developers have used for years to build libraries that work across both .NET Framework and .NET Compact Framework where there are features on either platform that aren’t available on the other)</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">a098be1e-1753-4ed2-bf19-9ce8b37351ff|1|5.0</div>
    <p class="tags">Tags: <a href="/?tag=/Windows+Mobile" rel="tag">Windows Mobile</a>, <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a>, <a href="/?tag=/Visual+Studio" rel="tag">Visual Studio</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 0" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f06%2f08%2fWindows-Phone-7-EnvironmentDeviceType-3d-Un-Blendable-code.aspx&amp;title=Windows+Phone+7+Environment.DeviceType+%3d+Un-Blendable+code">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=a098be1e-1753-4ed2-bf19-9ce8b37351ff" title="Windows Phone 7 Environment.DeviceType = Un-Blendable code">Permalink</a> |
    <a rel="nofollow" href="/post/2010/06/08/Windows-Phone-7-EnvironmentDeviceType-3d-Un-Blendable-code.aspx#comment">Comments (1)</a>
  </div>
</div>

<div class="post xfolkentry" id="post1">
  <h1><a href="/post/2010/06/08/Applee28099s-WWDC-Failure-was-both-Technical-and-Architectural.aspx" class="taggedlink">Apple’s WWDC Failure was both Technical and Architectural</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">8. June 2010 14:02</span>
  
  <div class="text"><p>Ok, I’ve resisted for as long as I could before posting this: Looks like Microsoft isn’t the only large organisation that suffers from technology failures during their presentations. I often criticise Microsoft, particularly here in Australia, of not being thorough enough in their rehearsals for keynotes, leading to demos not working. This time it was Steve Jobs who looked like an idiot on stage when he could access a website on Safari due to a network failure. Clearly there was a major oversight here when it came to making sure there was a backup network in the case of something going wrong.</p>  <p><a href="http://www.softteq.com/nick/ApplesWWDCFailurewasbothTechnicalandArch_C557/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/ApplesWWDCFailurewasbothTechnicalandArch_C557/image_thumb.png" width="300" height="134" /></a> </p>  <p>I guess what made me smile was that this demo strengthens my argument against all those web developers out&#160; there that believe the answer to the world’s problems is another mobile website, or worse a RIA application. Current RIA thoughts, be they Ajax or Silverlight, just don’t get mobility and what it means to build an offline capable application. Having built for mobile on a number of platforms for countless year I believe that for your mobile application to be awesome, it <strong>must</strong> be offline capable. Yes, this means either packaging data with your application, or better, syncing with a server somewhere. </p>  <p>Unfortunately, do you think that Microsoft gets this – not a chance. Actually there are several teams within Microsoft that do understand this (eg Sync Services, Sql Compact, Merge replication and even Live Mesh). However, it appears none of them are currently able to influence the decisions to release Windows Phone 7 without either database or sync support. </p>  <p>Back to the demo failure at WWDC: Clearly they were going to show the rich capabilities of Safari…. My point is that if you are building a “rich” mobile website you’ve messed up your architecture somewhere along the line. Build rich applications using a rich technology designed for the platform. If you want reach, then build a mobile website that is light, fast, easy to navigate and gives the user what they want without chewing through their data plan. Yes, this means NO flash and NO silverlight on the page (not that either of these will render in Safari on iPhone/iPad/iPods)</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">a4822c41-0cf8-4b4e-8d2f-b6d1b73d2f71|1|3.0</div>
    <p class="tags">Tags: <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a>, <a href="/?tag=/Apple" rel="tag">Apple</a>, <a href="/?tag=/Microsoft" rel="tag">Microsoft</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 1" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f06%2f08%2fApplee28099s-WWDC-Failure-was-both-Technical-and-Architectural.aspx&amp;title=Apple%e2%80%99s+WWDC+Failure+was+both+Technical+and+Architectural">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=a4822c41-0cf8-4b4e-8d2f-b6d1b73d2f71" title="Apple’s WWDC Failure was both Technical and Architectural">Permalink</a> |
    <a rel="nofollow" href="/post/2010/06/08/Applee28099s-WWDC-Failure-was-both-Technical-and-Architectural.aspx#comment">Comments (5)</a>
  </div>
</div>

<div class="post xfolkentry" id="post2">
  <h1><a href="/post/2010/06/07/Windows-Phone-7-Applications-Running-Under-the-Locked-Screen.aspx" class="taggedlink">Windows Phone 7 Applications Running Under the Locked Screen</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">7. June 2010 09:45</span>
  
  <div class="text"><p>The new <a href="http://bit.ly/a75RBR">Application Certification Requirements document</a> for Windows Phone 7 Marketplace has been published by Microsoft and includes a couple of interesting points:</p>
<p>Firstly, Microsoft, like Apple, have a stupid clause in their Application Policies to the effect that you can&rsquo;t charge a subscription basis for access to your application. Well, you could it Marketplace gave you the ability to charge a subscription &ndash; they don&rsquo;t, and since 2.1 forbids you from using an external payment gateway (eg PayPal), you can&rsquo;t do it.</p>
<p><a href="http://www.softteq.com/nick/WindowsPhone7ApplicationsRunningUnderthe_8934/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://www.softteq.com/nick/WindowsPhone7ApplicationsRunningUnderthe_8934/image_thumb.png" border="0" alt="image" width="457" height="44" /></a></p>
<p>The second and more interesting item is that Windows Phone 7 applications can continue to run even after the Lock screen has appeared.&nbsp; Apparently there will be (and I say will be as it&rsquo;s not in the current SDK bits) a method called Microsoft.Phone.Shell.PhoneApplicationService.ApplicationIdleDetectionMode which has to be invoked to allow the application to continue to run.</p>
<p><a href="http://www.softteq.com/nick/WindowsPhone7ApplicationsRunningUnderthe_8934/image_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://www.softteq.com/nick/WindowsPhone7ApplicationsRunningUnderthe_8934/image_thumb_3.png" border="0" alt="image" width="454" height="60" /></a></p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">39d613e0-8755-4aab-babd-a46b68a38cef|0|.0</div>
    <p class="tags">Tags: <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 2" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f06%2f07%2fWindows-Phone-7-Applications-Running-Under-the-Locked-Screen.aspx&amp;title=Windows+Phone+7+Applications+Running+Under+the+Locked+Screen">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=39d613e0-8755-4aab-babd-a46b68a38cef" title="Windows Phone 7 Applications Running Under the Locked Screen">Permalink</a> |
    <a rel="nofollow" href="/post/2010/06/07/Windows-Phone-7-Applications-Running-Under-the-Locked-Screen.aspx#comment">Comments (0)</a>
  </div>
</div>

<div class="post xfolkentry" id="post3">
  <h1><a href="/post/2010/06/06/iPhone-User-Experience-Fail.aspx" class="taggedlink">iPhone User Experience Fail</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">6. June 2010 14:35</span>
  
  <div class="text"><p>This afternoon I planned to go play in the AppStore. Since everyone’s been raving on about all the cool apps in there I figured I must be missing something – Don’t get me wrong I’ve been in there before but I’m not really an apps person. I use the built in phone capabilities and the occasional app to get the odd job or two done. </p>  <p>Turns out that since the last time I turned on my iphone the beta of iphone OS 4 has expired so my iphone is just sitting there blinking at me indicating that I need to connect to iTunes. I connected to my PC and opened up iTunes (I could almost feel the groan from my computer when I did this). It then comes up with a message saying the iphone software has expired – great, so update it for me. No chance! Restore…. Fail, Check for Updates….. none available, you’re running v4.0 which is the latest and greatest…. not!</p>  <p>Thinking that of course my PC is stupid and what would it know I powered up my Mac. Same deal. I went to the iphone developer website in order to get the v4.0 update and ran into two issues:</p>  <p>- I’ve got two developer profiles with Apple for the companies that I work with. This means that when you sign in they ask you which profile you want to connect to. Do you think I could select one and proceed? Not a hope!</p>  <p>- Once I finally restarted my browser, cleared the cache etc I went back to the iphone dev centre it came up with a message saying it was being updated and to come back soon…. FAIL – you mean I have to sit here with a iphone that doesn’t work?</p>  <p>The work around was simple enough – back to the PC, open the iphone dev centre (which for some reason still works on my PC), download the update, copy update to mac (so I can update my iphone), update iphone from iTunes (on the Mac).</p>  <p>Honestly, that they have the nerve to accuse other companies of a poor user experience…..</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">db1602f4-841f-4656-9635-e39b6bbf36d5|1|5.0</div>
    <p class="tags">Tags: <a href="/?tag=/iPhone" rel="tag">iPhone</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 3" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f06%2f06%2fiPhone-User-Experience-Fail.aspx&amp;title=iPhone+User+Experience+Fail">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=db1602f4-841f-4656-9635-e39b6bbf36d5" title="iPhone User Experience Fail">Permalink</a> |
    <a rel="nofollow" href="/post/2010/06/06/iPhone-User-Experience-Fail.aspx#comment">Comments (0)</a>
  </div>
</div>

<div class="post xfolkentry" id="post4">
  <h1><a href="/post/2010/06/05/Windows-Phone-7-Data-Json-WCF-Data-Service-with-IIS-7-Compression.aspx" class="taggedlink">Windows Phone 7 Data: Json WCF Data Service with IIS 7 Compression</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">5. June 2010 23:05</span>
  
  <div class="text"><p>Today I was thinking about the way I consume data within my Windows Phone 7 applications, specifically how I can get a large amount of data into my application. Attempting to send 100Mb worth of uncompressed data across the wire when I could send the same thing compressed at around 25Mb wasn’t really appealing to me. This got me thinking…. “how did I do this on Windows Mobile?”…. surprisingly the answer is blindingly obvious: IIS&#160; compression. In this post I’ll walk you through exposing your data via a WCF Data Service, enabling IIS compression (for IIS 7) and then how you can leverage this on the client side.</p>  <p>Let’s start by creating a simple WCF Data Service to consume:</p>  <h2>WCF Data Service</h2>  <p>In an ASP.NET project, create a new ADO.NET Entity Data Model, mine is called YoLoModel.edmx (YoLo stands for You only Live once, which was the name of the sample application I built as part of my Remix Australia presentation last week).</p>  <p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb.png" width="316" height="335" /></a> </p>  <p>Next add a new WCF Data Service, and fill in the blanks with the name of your data context (In my case it’s YouOnlyLiveOnceEntities) and enable read access – you should come back later and tighten security!!</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:c923770c-0e12-4393-b0ff-a1934e0f6dac" class="wlWriterEditableSmartContent"><pre name="code" class="c#">using System.Data.Services;

namespace CompressedService
{
    public class YoLoData : DataService&lt;YouOnlyLiveOnceEntities&gt;
    {
        public static void InitializeService(IDataServiceConfiguration config)
        {
             config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
        }
    }
}</pre></div>

<p>At this point you should run up your ASP.NET project to make sure you get data when you view the data service. You should also make sure that your project is running on IIS, rather than using the Visual Studio Development Server. To do this go to Web tab of the project properties and change to “Use Local IIS Web server” (you need to hit the Create Virtual Directory to create the virtual directory so your application will run on IIS, and don’t forget to save the project properties). In my case IIS is running on port 8080 – this has no bearing on being able to use compression, just happens to be how I have IIS configured on my development machine.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_3.png" width="376" height="224" /></a> </p>

<p>Test this using either the browser or <a href="http://www.fiddler2.com/fiddler2/">Fiddler</a>.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_4.png" width="371" height="209" /></a> </p>

<h2></h2>

<h2>IIS Compression</h2>

<p>Setting up IIS 7 Compression isn’t that difficult once you know what to do. Start by using either the <a href="http://www.microsoft.com/web/downloads/platform.aspx">Web Platform Installer</a>&#160; or Programs and Features. Locate and check the box next to Dynamic Content Compression and hit Install – this adds the module to support dynamic compression into IIS.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_5.png" width="339" height="252" /></a> </p>

<p>Next, open up IIS Manager and locate your ASP.NET application. From the Feature View select Compression and then ensure both static and dynamic compression is enabled.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_6.png" width="340" height="176" /></a> </p>

<p>Next you have to enable dynamic compression for specific mime-types. Make sure you have the Server node (not your virtual directory or the web site nodes) selected and then select the Configuration Editor from the Feature View.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_7.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_7.png" width="337" height="238" /></a> </p>

<p>Locate the webServer/httpCompression node and find the dynamicTypes list.</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_8.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_8.png" width="344" height="206" /></a> </p>

<p>Add any missing mime-types to cover SOAP, ATOM, JSON etc (you might as well enable them whilst you’re there). Whilst there is a trade off between performance and compression, dynamic compression only happens when the client requests it, so I’d turn it on for these mime-types and then make sure the clients only use compression appropriately (it’s up to you how you do this).</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_9.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_9.png" width="345" height="204" /></a> </p>

<p></p>

<p></p>

<p></p>

<p></p>

<p><strong>Don’t forget to hit the Apply button!!!</strong></p>

<p><strong>Don’t forget to RESTART IIS, make sure all your web processes restart otherwise you won’t see compressed output.</strong></p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_10.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_10.png" width="342" height="205" /></a></p>

<p> Now, go to Fiddler and use the Request Builder tab to create a GET request. I this case I’m requesting the url <a href="http://nickwp7dev:8080/CompressedService/YoLoData.svc/Patients">http://nickwp7dev:8080/CompressedService/YoLoData.svc/Patients</a>. You need to specify the following headers:</p>

<blockquote>
  <p><strong>Accept: application/json&#160;&#160;&#160;&#160;&#160;&#160; </strong>-&#160;&#160;&#160;&#160;&#160;&#160; This will cause WCF Data Services to give you the output in json format which is much trimmer than the bloated xml it usually generates. If you do want to work with xml then you can omit this header.</p>

  <p><strong>Accept-Encoding: gzip, deflate&#160;&#160;&#160;&#160;&#160;&#160; -&#160;&#160;&#160;&#160;&#160;&#160; </strong>This is what tells IIS to generate compressed data.</p>

  <p>When you Execute this request you should see that <a href="http://www.fiddler2.com/fiddler2/">Fiddler</a> detects compressed data – If you don’t then go back and make sure you’ve hit Apply and restarted IIS as this seems to be the problem I came up against when experimenting with this.</p>
</blockquote>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_11.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_11.png" width="337" height="237" /></a></p>

<p>If you click the yellow bar, <a href="http://www.fiddler2.com/fiddler2/">Fiddler</a> is kind enough to decompress the data so you can see the json output (or xml if you’ve omitted the Accept header). </p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_12.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_12.png" width="338" height="238" /></a> </p>

<h2></h2>

<h2>Windows Phone </h2>

<p>Right, so that’s the server side done. Now you need to implement decompression on the client. Unfortunately, unlike true rich client technologies such as WPF or WinForms, Silverlight and Windows Phone are somewhat crippled when it comes to dealing with data. However, with a little help you can work with the data quite easily.</p>

<p>In order to decompress the data coming from IIS I use <a href="http://sharpdevelop.net/OpenSource/SharpZipLib/">SharpZipLib</a>. Well actually I used a slightly hacked together version of it. Essentially there are things that need to be updated to be compatible with Silverlight/Windows Phone.</p>

<p>Hacked SharpZipLib for Windows Phone <a href="http://www.builttoroam.com/wpsharpziplib.zip">available here</a></p>

<p>Once you have SharpZipLib, decompressing the data is relatively straight forward:</p>

<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:b192707d-b232-4dc1-a0ce-fffbf4ff0d3a" class="wlWriterEditableSmartContent"><pre name="code" class="c#">using System;
using System.IO;
using System.Net;
using System.Windows;
using ICSharpCode.SharpZipLib.GZip;
using Microsoft.Phone.Controls;

namespace WindowsPhoneApplication1
{
    public partial class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            InitializeComponent();

            SupportedOrientations = SupportedPageOrientation.Portrait | 
                                     SupportedPageOrientation.Landscape;
        }

        private void DisplayDataButton_Click(object sender, RoutedEventArgs e)
        {
            var request = HttpWebRequest.Create("http://nickwp7dev:8080/CompressedService/YoLoData.svc/Patients");
            request.Headers["Accept"] = "application/json";
            request.Headers["Accept-Encoding"] = "gzip, deflate";
            request.BeginGetResponse(RequestCallback, request);
        }

        void RequestCallback(IAsyncResult response)
        {
            var request = response.AsyncState as HttpWebRequest;
            var resp = request.EndGetResponse(response);
            var strm = resp.GetResponseStream();

            string data;
            using (var gzip = new GZipInputStream(strm))
            using(var reader = new StreamReader(gzip))
            {
                data = reader.ReadToEnd();
            }

            this.Dispatcher.BeginInvoke(()=&gt;{
                this.DataText.Text = data;
            });
        }
    }
}</pre></div>

<p>Run this, an there you go – compressed data from IIS 7 to Windows Phone! </p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_13.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7DataJsonWCFDataServicewithI_143B2/image_thumb_13.png" width="150" height="292" /></a> </p>

<p>Don’t forget you can use the json deserializer to then parse this into objects.</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">537f3ae1-59e8-4864-a737-f3b310a93115|0|.0</div>
    <p class="tags">Tags: <a href="/?tag=/WCF" rel="tag">WCF</a>, <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 4" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f06%2f05%2fWindows-Phone-7-Data-Json-WCF-Data-Service-with-IIS-7-Compression.aspx&amp;title=Windows+Phone+7+Data%3a+Json+WCF+Data+Service+with+IIS+7+Compression">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=537f3ae1-59e8-4864-a737-f3b310a93115" title="Windows Phone 7 Data: Json WCF Data Service with IIS 7 Compression">Permalink</a> |
    <a rel="nofollow" href="/post/2010/06/05/Windows-Phone-7-Data-Json-WCF-Data-Service-with-IIS-7-Compression.aspx#comment">Comments (2)</a>
  </div>
</div>

<div class="post xfolkentry" id="post5">
  <h1><a href="/post/2010/05/27/Free-Professional-Visual-Studio-2010-book-at-Remix-Australia-2010.aspx" class="taggedlink">Free Professional Visual Studio 2010 book at Remix Australia 2010</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">27. May 2010 00:18</span>
  
  <div class="text"><p><a href="http://www.softteq.com/nick/FreeProfessionalVisualStudio2010bookatRe_430/image.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 15px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.softteq.com/nick/FreeProfessionalVisualStudio2010bookatRe_430/image_thumb.png" width="204" height="154" /></a></p>  <p>If you’re going to <a href="http://www.microsoft.com/australia/remix/default.aspx">Remix Australia 2010</a>and want a FREE copy of <a href="http://www.professionalvisualstudio.com">Professional Visual Studio 2010</a>then you need to attend either my session <a href="http://www.microsoft.com/australia/remix/agenda/schedule.aspx#Windows_Phone_7">Windows Phone 7: The emperor’s got some new threads</a>or Chris Anderson’s <a href="http://www.microsoft.com/australia/remix/agenda/schedule.aspx#Silverlight_4">Silverlight 4</a>session. Chris, also a co-author on the book, and I will both be giving a away 1 copy during each of our sessions.</p>  <p>If you miss out on the free copies and still want a copy, which we both hope you do, then we’ll have a total of 4 books available for sale at $50 a book. This is a discount on what you can purchase it for here in Australia. There are only 4 books available, since we have to lug them down from Sydney, so it will be strictly on a first in basis. We won’t be taking pre-orders so you must find us during Remix (that’s anytime after the keynote has started).</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">6e5c90d1-b42a-4de3-8b00-7f7dbbad53b1|0|.0</div>
    <p class="tags">Tags: <a href="/?tag=/Events" rel="tag">Events</a>, <a href="/?tag=/News" rel="tag">News</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 5" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f05%2f27%2fFree-Professional-Visual-Studio-2010-book-at-Remix-Australia-2010.aspx&amp;title=Free+Professional+Visual+Studio+2010+book+at+Remix+Australia+2010">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=6e5c90d1-b42a-4de3-8b00-7f7dbbad53b1" title="Free Professional Visual Studio 2010 book at Remix Australia 2010">Permalink</a> |
    <a rel="nofollow" href="/post/2010/05/27/Free-Professional-Visual-Studio-2010-book-at-Remix-Australia-2010.aspx#comment">Comments (1)</a>
  </div>
</div>

<div class="post xfolkentry" id="post6">
  <h1><a href="/post/2010/05/25/Remix-Australia-2010-Ie28099m-speaking-on-Windows-Phone-7.aspx" class="taggedlink">Remix Australia 2010: I’m speaking on Windows Phone 7</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">25. May 2010 09:53</span>
  
  <div class="text"><p><a href="http://www.softteq.com/nick/RemixAustralia2010ImspeakingonWindowsPho_8B20/Speaking_at_remix_au_2010_large.jpg"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="Speaking_at_remix_au_2010_large" border="0" alt="Speaking_at_remix_au_2010_large" align="left" src="http://www.softteq.com/nick/RemixAustralia2010ImspeakingonWindowsPho_8B20/Speaking_at_remix_au_2010_large_thumb.jpg" width="184" height="244" /></a> Next week is the Australian reincarnation of the sensation MIX event held earlier this year in Vegas. This year <a href="http://www.microsoft.com/australia/remix">remix Australia</a> is being held in Melbourne over not one but two whole days. As you probably know I’m not a “web-guy” so you might be wondering what I’m doing showing up at a web event. Well here’s the catch, it’s all about rich internet-enabled applications. I don’t care if it’s written in HTML 5, Silverlight, WPF or hey, even WinForms, so long as you’re doing intelligent things like client side storage, offline support and rich UI then you’re talking my language.</p>  <p>This year my focus is almost exclusively on Windows Phone 7. My session, entitled <a href="threadshttp://www.microsoft.com/australia/remix/agenda/schedule.aspx#Windows_Phone_7">Windows Phone 7: The emperor has got some new Threads</a>, showcases the tools and technologies that make up developer story for Windows Phone 7. Immediately following my session is Luke Drumm’s session on <a href="http://www.microsoft.com/australia/remix/agenda/schedule.aspx#Windows_Phone_7_2">Windows Phone 7: Debauchery on the silicon seas : High adventure in a small amount of code</a>. I’m really looking forward to this session to watch Luke smash the Phone around a bit using the XNA Framework.</p>  <p>There is just so many awesome features to discuss, but here are a few of the points to watch out for in my session.   <br />- Notification Services    <br />- Location    <br />- Emulator Automation    <br />- Accelerometer    <br />- Panoramic and Pivot controls    <br />- Voice synthesis, transcription and translation</p>  <p>All this in a hour! Don’t forget if you like what you see you should pre-order the book I’m working on (yes, another one): <a href="http://www.amazon.com/Professional-Windows-Phone-Application-Development/dp/0470891661/ref=sr_1_5?ie=UTF8&amp;s=books&amp;qid=1274830984&amp;sr=1-5">Professional Windows Phone 7 Application Development: Building Windows Phone Applications Using Silverlight</a>. The title on Amazon is a little misleading at the moment as it won’t be covering much on games development or XNA (one chapter on this) but it is a deep dive on everything that makes building Windows Phone applications in Silverlight so great.</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">339fbfbd-f132-49eb-918f-27785c278931|0|.0</div>
    <p class="tags">Tags: <a href="/?tag=/Events" rel="tag">Events</a>, <a href="/?tag=/Windows+Phone" rel="tag">Windows Phone</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 6" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f05%2f25%2fRemix-Australia-2010-Ie28099m-speaking-on-Windows-Phone-7.aspx&amp;title=Remix+Australia+2010%3a+I%e2%80%99m+speaking+on+Windows+Phone+7">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=339fbfbd-f132-49eb-918f-27785c278931" title="Remix Australia 2010: I’m speaking on Windows Phone 7">Permalink</a> |
    <a rel="nofollow" href="/post/2010/05/25/Remix-Australia-2010-Ie28099m-speaking-on-Windows-Phone-7.aspx#comment">Comments (0)</a>
  </div>
</div>

<div class="post xfolkentry" id="post7">
  <h1><a href="/post/2010/05/23/What-to-do-with-an-audio-recording-using-the-microphone-on-Windows-Phone-7.aspx" class="taggedlink">What to do with an audio recording using the microphone on Windows Phone 7?</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">23. May 2010 12:39</span>
  
  <div class="text"><p>Most of the examples that you see for working with the microphone on Windows Phone 7 usually take the resulting byte array and either play it back (using the XNA audio namespace) or save it in its current form to IsolatedStorage. Unfortunately, the byte array isn’t much use by itself as it can’t be played back directly using say Media player. What you need to do is actually convert it to a wav file by wrapping the raw sample data in the appropriate header information. Following the WAV specifications you end up with a set of helper methods that look similar to the following:</p>  <p></p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:e670ce3e-3d38-4acc-96bc-bb038fd7a036" class="wlWriterEditableSmartContent"><pre name="code" class="c#">using System;
using System.Text;

namespace MediaHelper
{
    public static class SoundUtilities
    {
        public class WaveFormat
        {
            public int Encoding { get; set; }
            public int AverageBytesPerSecond { get; set; }
            public int BlockAlign { get; set; }
            public int Channels { get; set; }
            public int SamplesPerSecond { get; set; }
        }

        public static byte[] ConvertRawSamplesToWav(
           byte[] samples, WaveFormat format)
        {
            var ascii = Encoding.UTF8;
            var byteArrayLength = 36 + samples.Length;
            var byteArray = new byte[byteArrayLength+10];
            var index = 0;

            // Specify that this is a RIFF file and the length of the file in bytes
            index += byteArray.CopyInto(index, ascii.GetBytes("RIFF"));
            index += byteArray.CopyInto(index, byteArrayLength.AsFixedByteArray(4));

            // Specify that this is a WAVE and start the format header
            index += byteArray.CopyInto(index, ascii.GetBytes("WAVE"));
            index += byteArray.CopyInto(index, ascii.GetBytes("fmt "));

            // Format header is fixed size of 16
            index += byteArray.CopyInto(index, (16).AsFixedByteArray(4));

            // Encoding: "1" for PCM
            index += byteArray.CopyInto(index, (format.Encoding).AsFixedByteArray(2));

            // Number of Channel
            index += byteArray.CopyInto(index, (format.Channels).AsFixedByteArray(2));

            // Samples per second
            index += byteArray.CopyInto(index, (format.SamplesPerSecond).AsFixedByteArray(4));

            // Average bytes per second
            index += byteArray.CopyInto(index, (format.AverageBytesPerSecond).AsFixedByteArray(4));

            // Block Align
            index += byteArray.CopyInto(index, (format.BlockAlign).AsFixedByteArray(2));

            // Bits per sample
            index += byteArray.CopyInto(index, ((8*format.AverageBytesPerSecond)/format.SamplesPerSecond).AsFixedByteArray(2));

            // The Samples themselves
            index += byteArray.CopyInto(index, ascii.GetBytes("data"));
            index += byteArray.CopyInto(index, samples.Length.AsFixedByteArray(4));
            index += byteArray.CopyInto(index, samples);

            return byteArray;

        }

        public static int CopyInto(this byte[] byteArray, int offset,byte[] bytes )
        {
            bytes.CopyTo(byteArray, offset);
            return bytes.Length;
        }

        public static byte[] AsFixedByteArray(this int number, int fixedByteArraySize)
        {
            int remainder, result;
            var returnarray = new byte[fixedByteArraySize];
                
            result = DivRem(number, 256, out remainder);

            if (result &gt;= 1)
            {
                returnarray[0] = Convert.ToByte(remainder);
                var tmpArray = result.AsFixedByteArray(fixedByteArraySize - 1);
                tmpArray.CopyTo(returnarray, 1);
            }
            else 
            {
                returnarray[0] = Convert.ToByte(number);
            }
            return returnarray;
        }

        public static int DivRem(int a, int b, out int result)
        {
            result = a % b;
            return (a / b);
        }
    }
}
</pre></div>

<p></p>

<p>Of course, in order to make use of this code you need to know what the format of the raw samples are. This can be obtained by looking at the Microphone instance that you are using to record the audio. The following screenshot illustrates the various properties you will need to know</p>

<p><a href="http://www.softteq.com/nick/Whattodowithanaudiorecordingusingthemicr_B1F1/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/Whattodowithanaudiorecordingusingthemicr_B1F1/image_thumb.png" width="424" height="170" /></a></p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">ef13576e-6aca-4143-bbfc-d41d8f385a66|0|.0</div>
    <p class="tags">Tags: <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 7" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f05%2f23%2fWhat-to-do-with-an-audio-recording-using-the-microphone-on-Windows-Phone-7.aspx&amp;title=What+to+do+with+an+audio+recording+using+the+microphone+on+Windows+Phone+7%3f">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=ef13576e-6aca-4143-bbfc-d41d8f385a66" title="What to do with an audio recording using the microphone on Windows Phone 7?">Permalink</a> |
    <a rel="nofollow" href="/post/2010/05/23/What-to-do-with-an-audio-recording-using-the-microphone-on-Windows-Phone-7.aspx#comment">Comments (0)</a>
  </div>
</div>

<div class="post xfolkentry" id="post8">
  <h1><a href="/post/2010/05/20/Windows-Phone-7-Emulator-Themes-and-Resources.aspx" class="taggedlink">Windows Phone 7 Emulator Themes and Resources</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">20. May 2010 11:38</span>
  
  <div class="text"><p>If you’ve been looking at building Windows Phone 7 applications using Silverlight you will probably have come across the set of styles and resources that are defined within the App.xaml file. For example the following section defines the foreground and background colors to be used.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:bac48eb8-869b-491a-b592-dec127913e9c" class="wlWriterEditableSmartContent"><pre name="code" class="xml">&lt;Application 
    x:Class="Sounds.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:mpc="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:phoneNavigation="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Navigation"&gt;
    
    &lt;!--RootFrame points to and loads the first page of your application--&gt;
    &lt;Application.RootVisual&gt;
        &lt;phoneNavigation:PhoneApplicationFrame x:Name="RootFrame" Source="/MainPage.xaml"/&gt;
    &lt;/Application.RootVisual&gt;

    &lt;!-- Resources for following the Windows Phone design guidelines --&gt;
    &lt;Application.Resources&gt;
        &lt;!--************ THEME RESOURCES ************--&gt;
        &lt;!-- Color Resources --&gt;
        &lt;Color x:Key="PhoneBackgroundColor"&gt;#FF1F1F1F&lt;/Color&gt;
        &lt;Color x:Key="PhoneContrastForegroundColor"&gt;Black&lt;/Color&gt;
        &lt;Color x:Key="PhoneForegroundColor"&gt;White&lt;/Color&gt;
        &lt;Color x:Key="PhoneInactiveColor"&gt;#FF666666&lt;/Color&gt;
        &lt;Color x:Key="PhoneDisabledColor"&gt;#FF808080&lt;/Color&gt;
        &lt;Color x:Key="PhoneSubtleColor"&gt;#FF999999&lt;/Color&gt;
        &lt;Color x:Key="PhoneContrastBackgroundColor"&gt;#FFFFFFFF&lt;/Color&gt;
        &lt;Color x:Key="PhoneTextBoxColor"&gt;#FFBFBFBF&lt;/Color&gt;
        &lt;Color x:Key="PhoneBorderColor"&gt;#FFCCCCCC&lt;/Color&gt;
        &lt;Color x:Key="PhoneTextSelectionColor"&gt;Black&lt;/Color&gt;
        &lt;Color x:Key="PhoneAccentColor"&gt;#FF1BA1E2&lt;/Color&gt;
</pre></div>

<p>One thing to note here is that if you change the theme background or accent (see image below: Start –&gt; Settings, Theme) this will <strong>NOT</strong> be reflected by your application the next time your run it. This is because the colors have been hard coded in the App.xaml file</p>

<p><a href="http://www.softteq.com/nick/WindowsPhone7EmulatorThemesandResources_A3B4/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.softteq.com/nick/WindowsPhone7EmulatorThemesandResources_A3B4/image_thumb.png" width="127" height="244" /></a> </p>

<p>The solution to this is to remove the appropriate resources from the app.xaml file. Of course, this will break your designer experience within Visual Studio and Blend but will mean that your application reflects the theme settings of the emulator. But here lies the problem, which resources do you remove? Well of course, you can remove all the resources that are going to be defined by Windows Phone…. ok, but how do we know what they are?</p>

<p>Justin has been releasing a number of awesome posts on connecting to the emulator using the managed wrapper. In particular the article on <a href="http://justinangel.net/WindowsPhone7EmulatorAutomation">Emulator Automation</a> is definitely worth studying closely. Using the hacked emulator image I went trawling through the Windows directory and notices a number of xaml files that looked interesting. Using Justin’s post as a starting point I decided to rip a couple of these xaml files off the emulator and take a look at what’s inside. The process for doing this is relatively straight forward:</p>

<p>- Create a Windows application (WinForms or WPF, doesn’t matter)</p>

<p>- Add references to c:\Program Files\Common Files\microsoft shared\Phone Tools\CoreCon\10.0\Bin\Microsoft.Smartdevice.Connectivity.dll</p>

<p>- Write some code to receive the files you want from the emulator</p>

<p>
  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:023c5b80-4db0-4548-bec6-03c9a47258bf" class="wlWriterEditableSmartContent"><pre name="code" class="c#">// Get CoreCon WP7 SDK
DatastoreManager dsmgrObj = new DatastoreManager(1033);

Platform WP7SDK = dsmgrObj.GetPlatforms().Single(p =&gt; p.Name == "New Windows Mobile 7 SDK");

// Get Emulator / Device
bool useEmulator = true;
Device WP7Device = null;
if (useEmulator)
    WP7Device = WP7SDK.GetDevices().Single(d =&gt; d.Name == "Windows Phone 7 Emulator");
else
    WP7Device = WP7SDK.GetDevices().Single(d =&gt; d.Name == "Windows Phone 7 Device");

// Connect to WP7 Emulator / Device
WP7Device.Connect();

try{
    ICcConnection phone = WP7Device.GetType().GetField("mConmanServer", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(WP7Device) as ICcConnection;

    f.ReceiveFile(@"\windows\0000_system.windows.xaml", @"c:\temp\0000_system.windows.xaml", true);
    f.ReceiveFile(@"\windows\0000_themeresources.xaml", @"c:\temp\0000_themeresources.xaml", true);

    WP7Device.Disconnect();
}
catch (Exception ex){
    WP7Device.Disconnect();
}</pre></div>
</p>

<p>When you execute this code (you need to have the Windows Phone 7 emulator already running) it will download the two files 0000_system.windows.xaml and 0000_themeresources.xaml to the c:\temp directory. You can then open them up and inspect which resources are defined. For example the themeresources.xaml file starts as follows:</p>

<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:c2a8c72f-f03b-44c4-9b36-2b986d71cc95" class="wlWriterEditableSmartContent"><pre name="code" class="xml">&lt;ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:System="clr-namespace:System;assembly=mscorlib"&gt;

  &lt;Color x:Key="PhoneBackgroundColor"&gt;White&lt;/Color&gt;
&lt;Color x:Key="PhoneContrastForegroundColor"&gt;White&lt;/Color&gt;
&lt;Color x:Key="PhoneForegroundColor"&gt;Black&lt;/Color&gt;
&lt;Color x:Key="PhoneInactiveColor"&gt;#ffcccccc&lt;/Color&gt;
&lt;Color x:Key="PhoneDisabledColor"&gt;#ffcccccc&lt;/Color&gt;
&lt;Color x:Key="PhoneSubtleColor"&gt;#ff999999&lt;/Color&gt;
&lt;Color x:Key="PhoneContrastBackgroundColor"&gt;Black&lt;/Color&gt;
&lt;Color x:Key="PhoneTextBoxColor"&gt;#ffbfbfbf&lt;/Color&gt;
&lt;Color x:Key="PhoneBorderColor"&gt;#ff999999&lt;/Color&gt;
&lt;Color x:Key="PhoneTextSelectionColor"&gt;White&lt;/Color&gt;
&lt;Color x:Key="PhoneAccentColor"&gt;#FF339933&lt;/Color&gt;</pre></div>

<p>If you look at the \windows directory on the emulator (using the hacked emulator you can used the shortcuts application but you need to select Options-&gt; Show All Files) you will see that there are system.windows.xaml and themeresources.xaml files numbered 0000, 0001, 0002 and 0003, and then also 0100, 0101, 0102 and 0103. As you can guess these correspond to the eight themes (light/dark with orange/blue/red/green). You can download all of these xaml files and take a look at the resources that are defined. </p>

<p><strong>Disclaimer</strong>: Don’t make any dependencies on the values of these resources as they could/might/probably will vary before Windows Phone ships.</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">daaac7d4-6a05-4ac5-87c0-630b08e4ac7d|0|.0</div>
    <p class="tags">Tags: <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 8" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f05%2f20%2fWindows-Phone-7-Emulator-Themes-and-Resources.aspx&amp;title=Windows+Phone+7+Emulator+Themes+and+Resources">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=daaac7d4-6a05-4ac5-87c0-630b08e4ac7d" title="Windows Phone 7 Emulator Themes and Resources">Permalink</a> |
    <a rel="nofollow" href="/post/2010/05/20/Windows-Phone-7-Emulator-Themes-and-Resources.aspx#comment">Comments (0)</a>
  </div>
</div>

<div class="post xfolkentry" id="post9">
  <h1><a href="/post/2010/05/19/Windows-Phone-7-Emulator-Launch-Time-versus-Notification-Services.aspx" class="taggedlink">Windows Phone 7 Emulator Launch Time versus Notification Services</a></h1>
  <span class="author">by <a href="/author/nick.aspx">Nick</a></span>
  <span class="pubDate">19. May 2010 12:46</span>
  
  <div class="text"><p>I’ve got a bit of a dilemma as to which emulator image to work with for Windows Phone 7.&#160; As you are no doubt aware there is a hacked emulator image available that opens up some of the hidden functionality of Windows Phone 7. For example most of the built in applications such as the hubs and Office are available in the hacked build. </p>  <p>Here’s a couple of things you might not know:</p>  <p>- The official build is <strong>SLOW</strong> and I’m not talking slow whilst running applications (I think this is about the same speed), I’m talking about the boot and time to launch/connect debugger to your application. This is a royal pain and has caused me to go back to the hacked build because it’s so much quicker to debug your application on.</p>  <p>- The hacked build <strong>will NOT work</strong> with Notification services. If you are seeing any issues with notification services, make sure that you a) use the official build and b) make sure you check your proxy settings. Even if you think your proxy settings won’t make a difference, try turning them off and seeing whether notification services work.</p>  <p>Here’s the dilemma – I want to use notification services in my application but I don’t want to have to wait up to 5 minutes for Visual Studio to launch and debug my application……</p></div>
  <div class="bottom">
    <div class="ratingcontainer" style="visibility:hidden">79c6fc28-f856-4bc1-9112-73fd750ab881|1|1.0</div>
    <p class="tags">Tags: <a href="/?tag=/Windows+Phone+7" rel="tag">Windows Phone 7</a></p>
    <p class="categories"></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index 9" target="_blank" href="http://www.dotnetkicks.com/submit?url=http%3a%2f%2fnicksnettravels.builttoroam.com%2fpost%2f2010%2f05%2f19%2fWindows-Phone-7-Emulator-Launch-Time-versus-Notification-Services.aspx&amp;title=Windows+Phone+7+Emulator+Launch+Time+versus+Notification+Services">Submit to DotNetKicks...</a>
    </div>
    
    
    <a rel="bookmark" href="http://nicksnettravels.builttoroam.com/post.aspx?id=79c6fc28-f856-4bc1-9112-73fd750ab881" title="Windows Phone 7 Emulator Launch Time versus Notification Services">Permalink</a> |
    <a rel="nofollow" href="/post/2010/05/19/Windows-Phone-7-Emulator-Launch-Time-versus-Notification-Services.aspx#comment">Comments (0)</a>
  </div>
</div></div>

<div id="postPaging">
  <a href="/?page=2" id="ctl00_cphBody_PostList1_hlPrev" style="float:left">&lt;&lt; Previous posts</a>
  
</div>
      

          <div id="n3ofooter">
            <p id="footleft">Powered by <a href="http://www.dotnetblogengine.net">BlogEngine.NET</a> 1.6.1.0 </p> 
             <p id="footright"> Automotive Theme by <a href="http://www.bestcarfinder.co.uk">Car Leasing</a> Experts</p>
          </div>
          <div class="clearer">&nbsp;</div>
        </div>
      </div>
      <div id="sidepanel">
        <div id="widgetzone_be_WIDGET_ZONE" class="widgetzone"><div class="widget search" id="widgetd81c5ae3-e57e-4374-a539-5cdee45e639f"><br /><div class="content"><div id="searchbox">
<label for="searchfield" style="display:none">Search</label><input type="text" value="Enter search term" id="searchfield" onkeypress="if(event.keyCode==13) return BlogEngine.search('/')" onfocus="BlogEngine.searchClear('Enter search term')" onblur="BlogEngine.searchClear('Enter search term')" /><input type="button" value="Search" id="searchbutton" onclick="BlogEngine.search('/');" onkeypress="BlogEngine.search('/');" /><br /><input type="checkbox" id="searchcomments"  /><label for="searchcomments">Include comments in search</label></div>
</div></div><div class="widget textbox" id="widgetdc4b9804-52df-49bd-8c7d-83393531e39c"><br /><div class="content"><p>
<script type="text/javascript"><!--
google_ad_client = "pub-1778331316120170";
/* .NET Travels */
google_ad_slot = "3974361260";
google_ad_width = 240;
google_ad_height = 240;
// --></script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
</p></div></div><div class="widget textbox" id="widget703a1eda-fae0-4f00-ac46-0c872a6495c6"><br /><div class="content"><p><a title="Blog Directory for Sydney, New South Wales" href="http://au.loadedweb.com/cities/new-south-wales/sydney/blogs/"><img style="width: 80px; height: 15px; border: 0px;" src="http://www.loadedweb.com/loadedweb.png" alt="Blog Directory for Sydney, New South Wales" /></a></p></div></div><div class="widget blogroll" id="widget15068468-33d1-4f93-b726-3052d6cd7a54"><h4>BlogRoll</h4><div class="content"><div id="blogroll">
<ul class="xoxo"><li><a href="http://feeds.professionalvisualstudio.com/professionalvisualstudio/"><img src="/pics/rssButton.gif" alt="RSS feed for Professional Visual Studio 2010" /></a><a href="http://www.professionalvisualstudio.com/" rel="colleague ">Professional Visual Stu...</a><ul><li><a href="http://www.professionalvisualstudio.com/blog/2010/05/11/customizing-the-visual-studio-2010-rtm-start-page/" title="Customizing the Visual Studio 2010 RTM Start Page">Customizing the Visual...</a></li></ul></li><li><a href="http://windowsteamblog.com/blogs/wpdev/rss.aspx"><img src="/pics/rssButton.gif" alt="RSS feed for The Windows Phone Developer Blog" /></a><a href="http://windowsteamblog.com/blogs/wpdev/">The Windows Phone Devel...</a><ul><li><a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/06/08/hey-you-get-off-of-my-cloud.aspx" title="Hey, You, Get Off of My Cloud">Hey, You, Get Off of My...</a></li></ul></li></ul>
</div>

  <a href="http://nicksnettravels.builttoroam.com/opml.axd" style="display:block;text-align:right" title="Download OPML file" >Download OPML file <img src="http://nicksnettravels.builttoroam.com/pics/opml.png" alt="OPML" /></a></div></div><div class="widget twitter" id="widgetc576e855-791d-4365-81c1-b121dd929f52"><h4>Twitter</h4><div class="content">
    <img src="/widgets/twitter/twitter.ico" alt="Twitter" />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl00_lblDate" style="color:gray">June 16, 01:21 AM</span><br />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl00_lblItem"> Didn't realise the melbourne cold could get worse. Just heard bagpipes near southern cross stn. Back to syd now...</span><br /><br />
  
    <img src="/widgets/twitter/twitter.ico" alt="Twitter" />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl01_lblDate" style="color:gray">June 15, 04:06 PM</span><br />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl01_lblItem"> <a href="http://twitter.com/jordanbrock" rel="nofollow">@jordanbrock</a> that one of the few things the govt got right. By law telcos must unlock devices if requested by owner.</span><br /><br />
  
    <img src="/widgets/twitter/twitter.ico" alt="Twitter" />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl02_lblDate" style="color:gray">June 12, 10:53 PM</span><br />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl02_lblItem"> <a href="http://twitter.com/Pete_Brown" rel="nofollow">@Pete_Brown</a> yeh my response when customers want to go html is that it just changes the pain point - now u have to deal with diff browsers.</span><br /><br />
  
    <img src="/widgets/twitter/twitter.ico" alt="Twitter" />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl03_lblDate" style="color:gray">June 12, 10:48 PM</span><br />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl03_lblItem"> <a href="http://twitter.com/Pete_Brown" rel="nofollow">@Pete_Brown</a> yes I agree w.r.t. standardization as it equates to lowest common denominator. I want to know what to use *today*</span><br /><br />
  
    <img src="/widgets/twitter/twitter.ico" alt="Twitter" />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl04_lblDate" style="color:gray">June 12, 10:47 PM</span><br />
    <span id="ctl00_c576e855791d436581c1b121dd929f52_repItems_ctl04_lblItem"> <a href="http://twitter.com/Pete_Brown" rel="nofollow">@Pete_Brown</a> challenge: mkt=consumer-land (both mobile and desktop), what tech do you pick?</span><br /><br />
  

<a id="ctl00_c576e855791d436581c1b121dd929f52_hlTwitterAccount" rel="me">Follow me on Twitter</a></div></div><div class="widget recentposts" id="widget4ce68ae7-c0c8-4bf8-b50f-a67b582b0d2e"><h4>RecentPosts</h4><div class="content"><ul class="recentPosts" id="recentPosts"><li><a href="/post/2010/06/08/Windows-Phone-7-EnvironmentDeviceType-3d-Un-Blendable-code.aspx">Windows Phone 7 Environment.DeviceType = Un-Blendable code</a><span>Comments: 1</span><span>Rating: 5 / 1</span></li><li><a href="/post/2010/06/08/Applee28099s-WWDC-Failure-was-both-Technical-and-Architectural.aspx">Apple’s WWDC Failure was both Technical and Architectural</a><span>Comments: 5</span><span>Rating: 3 / 1</span></li><li><a href="/post/2010/06/07/Windows-Phone-7-Applications-Running-Under-the-Locked-Screen.aspx">Windows Phone 7 Applications Running Under the Locked Screen</a><span>Comments: 0</span><span>Rating: 0 / 0</span></li><li><a href="/post/2010/06/06/iPhone-User-Experience-Fail.aspx">iPhone User Experience Fail</a><span>Comments: 0</span><span>Rating: 5 / 1</span></li><li><a href="/post/2010/06/05/Windows-Phone-7-Data-Json-WCF-Data-Service-with-IIS-7-Compression.aspx">Windows Phone 7 Data: Json WCF Data Service with IIS 7 Compression</a><span>Comments: 2</span><span>Rating: 0 / 0</span></li><li><a href="/post/2010/05/27/Free-Professional-Visual-Studio-2010-book-at-Remix-Australia-2010.aspx">Free Professional Visual Studio 2010 book at Remix Australia 2010</a><span>Comments: 1</span><span>Rating: 0 / 0</span></li><li><a href="/post/2010/05/25/Remix-Australia-2010-Ie28099m-speaking-on-Windows-Phone-7.aspx">Remix Australia 2010: I’m speaking on Windows Phone 7</a><span>Comments: 0</span><span>Rating: 0 / 0</span></li><li><a href="/post/2010/05/23/What-to-do-with-an-audio-recording-using-the-microphone-on-Windows-Phone-7.aspx">What to do with an audio recording using the microphone on Windows Phone 7?</a><span>Comments: 0</span><span>Rating: 0 / 0</span></li><li><a href="/post/2010/05/20/Windows-Phone-7-Emulator-Themes-and-Resources.aspx">Windows Phone 7 Emulator Themes and Resources</a><span>Comments: 0</span><span>Rating: 0 / 0</span></li><li><a href="/post/2010/05/19/Windows-Phone-7-Emulator-Launch-Time-versus-Notification-Services.aspx">Windows Phone 7 Emulator Launch Time versus Notification Services</a><span>Comments: 0</span><span>Rating: 1 / 1</span></li></ul></div></div><div class="widget tagcloud" id="widgetc3c1fff6-d8d6-40ee-92da-1b496ac52339"><h4>Tag cloud</h4><div class="content"><ul id="ctl00_c3c1fff6d8d640ee92da1b496ac52339_ulTags"><li><a href="/?tag=/NET" class="smallest" title="Tag: .NET">.NET</a> </li><li><a href="/?tag=/NET-Compact-Framework" class="smallest" title="Tag: .NET Compact Framework">.NET Compact Framework</a> </li><li><a href="/?tag=/Architecture" class="smallest" title="Tag: Architecture">Architecture</a> </li><li><a href="/?tag=/Bing" class="smallest" title="Tag: Bing">Bing</a> </li><li><a href="/?tag=/Databases" class="small" title="Tag: Databases">Databases</a> </li><li><a href="/?tag=/Events" class="small" title="Tag: Events">Events</a> </li><li><a href="/?tag=/Frameworks" class="smallest" title="Tag: Frameworks">Frameworks</a> </li><li><a href="/?tag=/Google" class="smallest" title="Tag: Google">Google</a> </li><li><a href="/?tag=/Imagine-Cup" class="smallest" title="Tag: Imagine Cup">Imagine Cup</a> </li><li><a href="/?tag=/iPhone" class="smallest" title="Tag: iPhone">iPhone</a> </li><li><a href="/?tag=/Languages" class="smallest" title="Tag: Languages">Languages</a> </li><li><a href="/?tag=/Linq" class="smallest" title="Tag: Linq">Linq</a> </li><li><a href="/?tag=/Maps" class="smallest" title="Tag: Maps">Maps</a> </li><li><a href="/?tag=/Microsoft" class="smallest" title="Tag: Microsoft">Microsoft</a> </li><li><a href="/?tag=/News" class="medium" title="Tag: News">News</a> </li><li><a href="/?tag=/Occasionally-Connected" class="smallest" title="Tag: Occasionally Connected">Occasionally Connected</a> </li><li><a href="/?tag=/Office" class="smallest" title="Tag: Office">Office</a> </li><li><a href="/?tag=/OneCare" class="smallest" title="Tag: OneCare">OneCare</a> </li><li><a href="/?tag=/Rant" class="smallest" title="Tag: Rant">Rant</a> </li><li><a href="/?tag=/Security" class="smallest" title="Tag: Security">Security</a> </li><li><a href="/?tag=/Silverlight" class="smallest" title="Tag: Silverlight">Silverlight</a> </li><li><a href="/?tag=/Synchronization" class="smallest" title="Tag: Synchronization">Synchronization</a> </li><li><a href="/?tag=/Tools" class="small" title="Tag: Tools">Tools</a> </li><li><a href="/?tag=/Visual-Studio" class="medium" title="Tag: Visual Studio">Visual Studio</a> </li><li><a href="/?tag=/WCF" class="smallest" title="Tag: WCF">WCF</a> </li><li><a href="/?tag=/Widgets" class="smallest" title="Tag: Widgets">Widgets</a> </li><li><a href="/?tag=/Windows-7" class="smallest" title="Tag: Windows 7">Windows 7</a> </li><li><a href="/?tag=/Windows-Azure" class="smallest" title="Tag: Windows Azure">Windows Azure</a> </li><li><a href="/?tag=/Windows-Mobile" class="biggest" title="Tag: Windows Mobile">Windows Mobile</a> </li><li><a href="/?tag=/Windows-Phone-7" class="smallest" title="Tag: Windows Phone 7">Windows Phone 7</a> </li><li><a href="/?tag=/Windows-Vista" class="smallest" title="Tag: Windows Vista">Windows Vista</a> </li></ul></div></div></div>
      </div>
    

<script type="text/javascript">
//<![CDATA[
function registerVariables(){BlogEngine.webRoot='/';BlogEngine.i18n.hasRated='You already rated this post';BlogEngine.i18n.savingTheComment='Saving the comment...';BlogEngine.i18n.comments='Comments';BlogEngine.i18n.commentWasSaved='The comment was saved. Thank you for the feedback';BlogEngine.i18n.commentWaitingModeration='Thank you for the feedback. The comment is now awaiting moderation';BlogEngine.i18n.cancel='Cancel';BlogEngine.i18n.filter='Filter';BlogEngine.i18n.apmlDescription='Enter the URL to your website or to your APML document';BlogEngine.i18n.beTheFirstToRate='Be the first to rate this post';BlogEngine.i18n.currentlyRated='Currently rated {0} by {1} people';BlogEngine.i18n.ratingHasBeenRegistered='Your rating has been registered. Thank you!';BlogEngine.i18n.rateThisXStars='Rate this {0} star{1} out of 5';};//]]>
</script>
<script type="text/javascript" defer="defer" src="/js.axd?path=%2fblog.js&amp;v=1.6.1.0"></script><!-- Begin SyntaxHighlighter HighlightAll   -->
<script type="text/javascript">
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
</script>
<!-- End SyntaxHighlighter HighlightAll   -->
</form>
    <div class="clearer">&nbsp;</div>
</div>
    <script type="text/javascript">
    if(typeof sIFR == "function"){
	    sIFR.replaceElement(named({sSelector:"h4",sFlashSrc:"/themes/Automotive/automotive.swf",sColor:"#e38a17",sBgColor:"#000000",sWmode:"transparent"}));
    };
    if(typeof sIFR == "function"){
	    sIFR.replaceElement(named({sSelector:"h1",sFlashSrc:"/themes/Automotive/automotive.swf",sColor:"#e38a17",sBgColor:"#000000",sWmode:"transparent"}));
    };
    if(typeof sIFR == "function"){
	    sIFR.replaceElement(named({sSelector:"p#blogname",sFlashSrc:"/themes/Automotive/automotive.swf",sColor:"#e38a17",sBgColor:"#000000",sWmode:"transparent"}));
    };
    </script>
</body>
</html>
