<?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:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">
  <channel>
    <title>Chris Pietschmann</title>
    <description>A passionate software developer from Wisconsin.</description>
    <link>http://pietschsoft.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://pietschsoft.com/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://feeds2.feedburner.com/simplovation</blogChannel:blink>
    <dc:creator>Chris Pietschmann</dc:creator>
    <dc:title>Chris Pietschmann</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/crpietschmann" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Managed JScript on the DLR from Microsoft is DEAD!! WHY?!??</title>
      <description>&lt;p&gt;I’ve been questioning &lt;a href="http://stackoverflow.com/questions/775339/where-can-you-download-managed-jscript-for-the-dlr" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957" target="_blank"&gt;there&lt;/a&gt; as to what happened to Managed JScript on the Dynamic Language Runtime. The most recent preview release is really old, and it has since been taken out of any further preview releases of the DLR, where as IronRuby and IronPython continue on.&lt;/p&gt;  &lt;h3&gt;No More Managed JScript on the DLR?&lt;/h3&gt;  &lt;p&gt;For some time I never really got any good answers. Well, it’s really sad to hear that apparently Microsoft decided to drop it completely.&lt;/p&gt;  &lt;p&gt;According the &lt;a href="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121" target="_blank"&gt;this link&lt;/a&gt;, a member on the DLR team has this to say:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“The DLR JScript was experimental for informing the design of the DLR (expression trees, interop, callsites, hosting, etc.). The JS we released with asp futures and the Silverlight dynamic sdk became very old and unserviceable as the DLR continued evolving for release in CLR 4.0. unfortunately, there are no plans at this time to develop and release a DLR hostable JScript.”&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;“Experimental for informing the design”??&lt;/h3&gt;  &lt;p&gt;I understand what this means, but since Managed JScript was used to help build the DLR from the beginning then “Why didn’t they keep it up to date?”&lt;/p&gt;  &lt;p&gt;Plus if you go read the &lt;a href="http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx" target="_blank"&gt;Initial Announcement of Managed JScript&lt;/a&gt; over on the JScript Blog you will see the following statement:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“We are working to make sure that Managed JScript is a first class language on top of DLR.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;What part of that post and the above statement specify that it’s only “experimental” and not to actually ever get released?&lt;/p&gt;  &lt;p&gt;I’m really curious to find out who actually made the decision to drop it, and what the real reason is. Was it you &lt;a href="http://weblogs.asp.net/scottgu/" target="_blank"&gt;ScottGu&lt;/a&gt;?&lt;/p&gt;  &lt;h3&gt;Why not Open Source it?&lt;/h3&gt;  &lt;p&gt;Well, the next logical question to ask is “Why not release what was done for Managed JScript as Open Source under a Public License?” At least this way it would allow the community to take it and run with it.&lt;/p&gt;  &lt;h3&gt;Are there Alternative Implementations?&lt;/h3&gt;  &lt;p&gt;None that I could find for .NET and/or the DLR. If you know of any, please let me know!&lt;/p&gt;  &lt;p&gt;I did however find the &lt;a href="http://www.mozilla.org/rhino/" target="_blank"&gt;Rhino project from Mozilla&lt;/a&gt;, but it’s for Java. According to Mozilla, &lt;em&gt;“Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users.”&amp;#160; &lt;/em&gt;I guess this could be a start at building one for .NET/DLR, but…&lt;/p&gt;  &lt;p&gt;Update: I did find the &lt;a href="http://myjscript.codeplex.com/" target="_blank"&gt;MyJScript&lt;/a&gt; project on CodePlex; it’s not a complete implemenation, but it does show the basics on how to create your own scripting language on the DLR. There is also an companion article to the MyJScript project: &lt;a title="http://www.dotnetguru.org/us/dlrus/DLR2.htm" href="http://www.dotnetguru.org/us/dlrus/DLR2.htm"&gt;http://www.dotnetguru.org/us/dlrus/DLR2.htm&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Further Info&lt;/h3&gt;  &lt;p&gt;Here’s a few links that have some small bits of info in addition to that linked above:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121" href="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121"&gt;http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=41990" href="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=41990"&gt;http://dlr.codeplex.com/Thread/View.aspx?ThreadId=41990&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/posts/Charles/Jimmy-Schementi-Inside-IronRuby/?CommentID=472955" href="http://channel9.msdn.com/posts/Charles/Jimmy-Schementi-Inside-IronRuby/?CommentID=472955"&gt;http://channel9.msdn.com/posts/Charles/Jimmy-Schementi-Inside-IronRuby/?CommentID=472955&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957" href="http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957"&gt;http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx" href="http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx"&gt;http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;I’ve very disappointed to hear this sad news. However, I guess I could always work on building my own Managed JScript compiler/library for the DLR; if I could only find the time in between my other open source work and other paying gigs.&lt;/p&gt;  &lt;p&gt;Until then, I guess I can only hope that Microsoft (or would it be &lt;a href="http://weblogs.asp.net/scottgu/" target="_blank"&gt;ScottGu&lt;/a&gt;) decides to reconsider.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=aZDwJ3o8R9I:_MsEm2vGYJo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=aZDwJ3o8R9I:_MsEm2vGYJo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=aZDwJ3o8R9I:_MsEm2vGYJo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=aZDwJ3o8R9I:_MsEm2vGYJo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=aZDwJ3o8R9I:_MsEm2vGYJo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/aZDwJ3o8R9I" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/06/12/Managed-JScript-on-the-DLR-from-Microsoft-is-DEAD-Why.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/06/12/Managed-JScript-on-the-DLR-from-Microsoft-is-DEAD-Why.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</guid>
      <pubDate>Fri, 12 Jun 2009 15:03:28 -0500</pubDate>
      <category>JavaScript</category>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</pingback:target>
      <slash:comments>13</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/06/12/Managed-JScript-on-the-DLR-from-Microsoft-is-DEAD-Why.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</wfw:commentRss>
    </item>
    <item>
      <title>Building JavaScript / HTML based Applications using Adobe Air for FREE</title>
      <description>&lt;p&gt;As a web developer I use JavaScript, HTML and CSS a lot. I do however build desktop applications too, but can’t use those same tools/languages to build them. So, for quite some time now I’ve wanted to be able to build Desktop Applications using the same JavaScript, HTML and CSS that I use to build Web Applications. Now with the help of Adobe AIR it can finally be done with ease, and even have multi-platform support.&lt;/p&gt;  &lt;p&gt;In this post I’m going to discuss the basics of creating a JavaScript/HTML based Desktop Application using Adobe AIR, and point you to some of the online resources that have helped me to get started.&lt;/p&gt;  &lt;p&gt;Also, just in case you didn’t know, you can create/build JavaScript / HTML based Adobe AIR applications for FREE. The runtime and sdk are both free.&lt;/p&gt;  &lt;h3&gt;Getting Started with Adobe AIR&lt;/h3&gt;  &lt;p&gt;First you’ll need to get the following two things installed:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Adobe AIR – &lt;a href="http://get.adobe.com/air"&gt;http://get.adobe.com/air&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Adobe AIR SDK – &lt;a title="http://www.adobe.com/products/air/tools/sdk/" href="http://www.adobe.com/products/air/tools/sdk/"&gt;http://www.adobe.com/products/air/tools/sdk/&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here’s a couple excellent resources I found to getting started with Adobe AIR and JavaScript:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7ecc.html" target="_blank"&gt;Creating your first HTML-based AIR application with the AIR SDK&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.petefreitag.com/item/667.cfm" target="_blank"&gt;Adobe AIR Tutorial for HTML / JavaScript Developers&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://ajaxian.com/archives/adobe-air-for-javascript-developers-pocketguide" target="_blank"&gt;Adobe AIR for JavaScript Developers FREE Pocket Guide&lt;/a&gt; – Direct &lt;a href="http://onair.adobe.com/files/AIRforJSDevPocketGuide.pdf?sdid=CEYFA" target="_blank"&gt;Download of PDF&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;You can follow those two guides linked to above to get you started using Adobe AIR to build JavaScript / HTML based Desktop Applications.&lt;/p&gt;  &lt;h3&gt;Setting Up the Adobe AIR SDK on Windows&lt;/h3&gt;  &lt;p&gt;I had a couple small setup issues with getting the Adobe AIR SDK setup on my Windows development box.&lt;/p&gt;  &lt;p&gt;The Adobe AIR SDK download is just a Zip Archive containing the files necessary for the SDK; it contains no setup EXE. To get it setup, you’ll need to follow the below steps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Extract the SDK to some folder of your choosing. For Example: &lt;em&gt;C:\AdobeAIRSDK&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;Add the &lt;em&gt;“C:\AdobeAIRSDK\bin” &lt;/em&gt;folder to the System Path so you can execute it easily from within the Command Line. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Also, to use the Adobe Developer Tool (adt) you’ll need Java installed, and you’ll need to make sure that the path to where Java is installed is also included within the System Path as described above.&lt;/p&gt;  &lt;p&gt;To edit the “System Path” in Windows just follow these steps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open the System Properties dialog box and click the Advanced tab. You can find this in the System settings within the Control Panel. &lt;/li&gt;    &lt;li&gt;Click the Environment Variables button. &lt;/li&gt;    &lt;li&gt;Select the PATH entry and then click the Edit button. Add the desired path to the end of the current variable value, separating it from previous values with a semicolon. For Example &lt;em&gt;“;C:\AdobeAIRSDK\bin”&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;Click OK to Save. &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Tips to Make Building and Testing Easier&lt;/h3&gt;  &lt;p&gt;Here are some simple tips to make building and testing your applications easier.&lt;/p&gt;  &lt;h5&gt;Create .BAT files to Build and Test&lt;/h5&gt;  &lt;p&gt;One thing that you'’ll want to do to make it a little easier to Build (using adt) and Test (using adl) your HTML-based Adobe AIR applications is create some simple “build.bat” and “test.bat” DOS Batch files so you don’t have to type in the command-line parameters every time you want to build or test your application.&lt;/p&gt;  &lt;p&gt;build.bat example:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;adt –package –storetype pkcs12 –keystore certificate MyApp.air application.xml .&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;test.bat example:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;adl application.xml&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This way you can just simply double-click on the specific .BAT file within Windows Explorer to either Build or Test your application.&lt;/p&gt;  &lt;p&gt;Also, in the above build.bat example, my Certificate file is simply named “certificate”, and it’s a self-signed certificate.&lt;/p&gt;  &lt;h5&gt;Place Application Files within a Sub-Folder&lt;/h5&gt;  &lt;p&gt;If you rename your “.air” file that was built using the above mentioned .BAT file to be a “.ZIP” file and then open it, you’ll notice that the .BAT files and your Certificate were included within the Build. This is because the above mentioned call to “adt” tells it to include all files and folders within the build. To prevent the .BAT files and Certificate from being included, you’ll need to place them within a separate folder.&lt;/p&gt;  &lt;p&gt;The easiest way to do this is to place all you Application files within a Sub-Folder within the main folder that your .BAT files and Certificate are located. For example you could name it “App_Files”. Then make the following changes to the .BAT files to point it to the new file/folder locations appropriately:&lt;/p&gt;  &lt;p&gt;build.bat example:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;cd App_Files      &lt;br /&gt;adt –package –storetype pkcs12 –keystore ../certificate ../MyApp.air application.xml .&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;test.bat example&lt;/p&gt;  &lt;p&gt;&lt;em&gt;cd App_Files      &lt;br /&gt;adl application.xml&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Also, one thing to note about the above modified “build.bat” file is that it will place the Built “.air” file/application within the Main folder where the .BAT files and Certificate are located.&lt;/p&gt;  &lt;h3&gt;Creating a Self-Signed Certificate&lt;/h3&gt;  &lt;p&gt;One thing that you’ll notice above is that I’m using a Certificate file names “&lt;em&gt;certificate&lt;/em&gt;”. This is a self-signed certificate that I generated using the “adt” tool. To generate a self-signed certificate, you can execute “adt” using the following command-line parameters:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;adt –certificate –cn SelfSigned 1024-RSA certificate.pfx samplePassword&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;The above is pretty much the extent of my knowledge of building Adobe AIR applications using JavaScript / HTML at the time of this writing. I decided to take a few minutes to figure out the basics, so I thought I’d share some of the tidbits I found out.&lt;/p&gt;  &lt;p&gt;Since, I’ve wanted to build desktop applications using JavaScript, HTML and CSS for some time now I find it relieving that it can be done with Adobe AIR and for Free.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/B3TNO6Oa2bFvpxw759ql5ps1Kok/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B3TNO6Oa2bFvpxw759ql5ps1Kok/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/B3TNO6Oa2bFvpxw759ql5ps1Kok/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B3TNO6Oa2bFvpxw759ql5ps1Kok/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vtacER32KYg:5VdEPm-K6QE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vtacER32KYg:5VdEPm-K6QE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vtacER32KYg:5VdEPm-K6QE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vtacER32KYg:5VdEPm-K6QE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vtacER32KYg:5VdEPm-K6QE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/vtacER32KYg" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/06/10/Building-JavaScript-HTML-Applications-using-Adobe-AIR-for-FREE.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/06/10/Building-JavaScript-HTML-Applications-using-Adobe-AIR-for-FREE.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=b5ce781e-d427-42d2-95c7-d01f6cf3c690</guid>
      <pubDate>Wed, 10 Jun 2009 20:44:16 -0500</pubDate>
      <category>Adobe AIR</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=b5ce781e-d427-42d2-95c7-d01f6cf3c690</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=b5ce781e-d427-42d2-95c7-d01f6cf3c690</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/06/10/Building-JavaScript-HTML-Applications-using-Adobe-AIR-for-FREE.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=b5ce781e-d427-42d2-95c7-d01f6cf3c690</wfw:commentRss>
    </item>
    <item>
      <title>Bing Maps for Enterprise (formerly Virtual Earth) Licensing FAQ</title>
      <description>&lt;p&gt;I usually get at least 1 email a month asking me some form of the below questions about Virtual Earth / Bing Maps for Enterprise Licensing. So, I’ve decided to post some information on the topic.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I’m not a Bing Maps for Enterprise (formerly&amp;#160; Virtual Earth) Reseller, nor do I work for Microsoft or represent Microsoft in any way; so the following tips/faq are my own opinion and do not represent Microsoft in any way. For official answers, please contact Microsoft directly and refer to the “&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;Microsoft Virtual Earth Platform API Terms of Use&lt;/a&gt;.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Email all licensing questions directly to Microsoft at &lt;a href="mailto:maplic@microsoft.com"&gt;maplic@microsoft.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I encourage you to read through the official “&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;Microsoft Virtual Eearth Platform API Terms of Use&lt;/a&gt;”. You can also find more information on the “&lt;a href="http://www.microsoft.com/maps/product/licensing.aspx" target="_blank"&gt;Microsoft Bing Maps for Enterprise – Licensing And Pricing Options&lt;/a&gt;” page.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I am not responsible for any actions you take based on the tips/faq provided below. The below is provided for informational purposes only and is not provided as legal advise. It is always recommended you consult an attorney.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Now that I have the disclaimer out of the way…&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Do I need to Pay / License Bing Maps for Enterprise to use the JavaScript Map Control and/or Web Services within my Website / Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; There are really two separate answers:&amp;#160; &lt;br /&gt;    &lt;br /&gt;1) &lt;em&gt;Non-Commercial Use:&lt;/em&gt; No, If you are developing or hosting an online application that uses the service to display results for N&lt;strong&gt;on-Commercial Use, &lt;/strong&gt;you do not need to purchase a license agreement from Microsoft.&amp;#160; &lt;br /&gt;    &lt;br /&gt;2) &lt;em&gt;Commercial&amp;#160; or Government Use:&lt;/em&gt; Yes, If you are developing or hosting an online application that uses the service to display results for &lt;strong&gt;Commercial or Government Use&lt;/strong&gt;, then you are required to purchase a license agreement from Microsoft. However, you are allowed to use the service for a 90 day evaluation period before you are required to purchase a license agreement.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;There are some additional restrictions for using the Service for Non-Commercial use and within the 90 day evaluation period; these restrictions are outlined within the official “&lt;/em&gt;&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;&lt;em&gt;Microsoft Virtual Earth Platform API Terms of Use&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Can I use the &lt;a href="http://connect.microsoft.com/silverlightmapcontrolctp" target="_blank"&gt;Silverlight Virtual Earth Control CTP&lt;/a&gt; within a Website / Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;Officially, the answer is &lt;strong&gt;No&lt;/strong&gt;. Since the current release of the Silverlight Virtual Earth Control is a Community Technology Preview (CTP) it is not licensed for use in any Production environments.&amp;#160; Also, there is no support provided for any bugs that you may encounter while using it.     &lt;br /&gt;    &lt;br /&gt;However, you can use the Silverlight Virtual Earth Control CTP for Development and Testing purposes.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Can I use Bing Maps (Virtual Earth) within a Windows Forms or WPF Desktop Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; As far as Licensing, you’ll need to contact Microsoft. The “&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;Microsoft Virtual Earth Platform API Terms of Use&lt;/a&gt;” doesn’t really cover this specific usage scenario.     &lt;br /&gt;    &lt;br /&gt;Microsoft doesn’t have a Window Forms or WPF control that you can just drag onto a Window, but you could access the Web Service from your application or display the JavaScript Map Control within an embedded WebBrowser control.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Can I use the Virtual Earth Server Control that’s part of the &lt;a href="http://dev.live.com/tools/" target="_blank"&gt;Windows Live Tools CTP&lt;/a&gt; within a Website / Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A: No&lt;/strong&gt;, Since the Windows Live Tools is a Community Technology Preview (CTP) it is not licensed for use in any Production environments, and thus all the controls within the Windows Live Tools CTP are licensed the same.     &lt;br /&gt;    &lt;br /&gt;Also, the Virtual Earth Server Control within the latest release of the Windows Live Tools CTP is buggy and only partially implemented.&lt;/p&gt;  &lt;p&gt;If you are looking for an &lt;a href="http://simplovation.com/page/webmapsve.aspx" target="_blank"&gt;ASP.NET AJAX Bing Maps (Virtual Earth) Server Control&lt;/a&gt; that you CAN use in Production and is Fully Supported, then I encourage you to check out the &lt;a href="http://simplovation.com/page/webmapsve.aspx" target="_blank"&gt;Web.Maps.VE product by Simplovation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WFyQNcqMxPo:0soXLQXy88k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WFyQNcqMxPo:0soXLQXy88k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=WFyQNcqMxPo:0soXLQXy88k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WFyQNcqMxPo:0soXLQXy88k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=WFyQNcqMxPo:0soXLQXy88k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/WFyQNcqMxPo" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=ad070bf0-ed36-4dcf-995a-d8f4217869a3</guid>
      <pubDate>Tue, 02 Jun 2009 18:52:00 -0500</pubDate>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=ad070bf0-ed36-4dcf-995a-d8f4217869a3</pingback:target>
      <slash:comments>8</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=ad070bf0-ed36-4dcf-995a-d8f4217869a3</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=ad070bf0-ed36-4dcf-995a-d8f4217869a3</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Shapes (VEShape) to WKT (Well-Known-Text) and Back using JavaScript</title>
      <description>&lt;p&gt;One of the standard methods of representing geometric shapes is by using the WKT (Well-Known-Text) standard. This is a human readable standard method of representing geometric shapes that can be used to easily pass spatial data between applications. I know GML or GeoRSS may be a little more applicable since they are based on XML, but WKT can work just fine in some cases.&lt;/p&gt;  &lt;p&gt;If you don’t know what WKT is here are a couple links for reference:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/referencing/doc-files/WKT.html" href="http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/referencing/doc-files/WKT.html"&gt;http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/referencing/doc-files/WKT.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://en.wikipedia.org/wiki/Well-known_text" href="http://en.wikipedia.org/wiki/Well-known_text"&gt;http://en.wikipedia.org/wiki/Well-known_text&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is also one of the things that Virtual Earth does NOT have support built in for. So I wrote a little code that simply converts VEShape objects to a WKT string representation.&lt;/p&gt;  &lt;p&gt;The code below allows you to represent Pushpins, Polygons and Polylines as strings like the following:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;POINT(-99.71000000000001 43.74999999999998)

POLYGON((-99.71000000000001 46.74999999999998,
 -96.71000000000001 46.74999999999998,
 -96.71000000000001 43.74999999999998,
 -99.71000000000001 46.74999999999998))

LINESTRING(-99.71000000000001 40.74999999999998,
 -102.71000000000001 40.74999999999998,
 -102.71000000000001 43.74999999999998)&lt;/pre&gt;

&lt;p&gt;Here are some examples of using the conversion methods:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Get Map Center Point&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; centerPoint = map.GetCenter();

 &lt;span class="rem"&gt;// Create Pushpin VEShape and Get it's WKT representation&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; wktShape = VirtualEarthWKT.ShapeToWKT(&lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Pushpin, centerPoint));
 &lt;span class="rem"&gt;// Create a VEShape from the WKT representation&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; shape = VirtualEarthWKT.ShapeFromWKT(wktShape);
 &lt;span class="rem"&gt;// Add VEShape to Map&lt;/span&gt;
 map.AddShape(shape);


 &lt;span class="rem"&gt;// Create Polygons' Location Array&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; polygonLocations = [
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude + 3, centerPoint.Longitude),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude + 3, centerPoint.Longitude + 3),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude, centerPoint.Longitude + 3)
 ];

 &lt;span class="rem"&gt;// Create Polygon VEShape and Get it's WKT representation&lt;/span&gt;
 wktShape = VirtualEarthWKT.ShapeToWKT(&lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Polygon, polygonLocations));
 &lt;span class="rem"&gt;// Create a VEShape from the WKT representation&lt;/span&gt;
 shape = VirtualEarthWKT.ShapeFromWKT(wktShape);
 &lt;span class="rem"&gt;// Add VEShape to Map&lt;/span&gt;
 map.AddShape(shape);


 &lt;span class="rem"&gt;// Create Polylines' Location Array&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; polylineLocations = [
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude - 3, centerPoint.Longitude),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude - 3, centerPoint.Longitude - 3),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude, centerPoint.Longitude - 3)
 ];

 &lt;span class="rem"&gt;// Create Polyline VEShape and Get it's WKT representation&lt;/span&gt;
 wktShape = VirtualEarthWKT.ShapeToWKT(&lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Polyline, polylineLocations));
 &lt;span class="rem"&gt;// Create a VEShape from the WKT representation&lt;/span&gt;
 shape = VirtualEarthWKT.ShapeFromWKT(wktShape);
 &lt;span class="rem"&gt;// Add VEShape to Map&lt;/span&gt;
 map.AddShape(shape);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Here’s the full code to the VirtualEarthWKT object that contains the static methods:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Create the singleton object that contains the WKT (Well-Known-Text) transformation methods.&lt;/span&gt;
&lt;span class="kwrd"&gt;var&lt;/span&gt; VirtualEarthWKT = &lt;span class="kwrd"&gt;new&lt;/span&gt; (&lt;span class="kwrd"&gt;function&lt;/span&gt;() {
    &lt;span class="rem"&gt;// Declare some &amp;quot;private&amp;quot; methods that will only be used internally&lt;/span&gt;
    &lt;span class="kwrd"&gt;var&lt;/span&gt; priv = {
        trimSpaces: &lt;span class="kwrd"&gt;function&lt;/span&gt;(str) {
            &lt;span class="rem"&gt;// Trim beginning spaces&lt;/span&gt;
            &lt;span class="kwrd"&gt;while&lt;/span&gt; (priv.startsWith(str, &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt;)) {
                str = str.substring(1);
            }
            &lt;span class="rem"&gt;// Trim ending spaces&lt;/span&gt;
            &lt;span class="kwrd"&gt;while&lt;/span&gt; (priv.endsWith(str, &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt;)) {
                str = str.substring(0, str.length - 1);
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; str;
        },
        startsWith: &lt;span class="kwrd"&gt;function&lt;/span&gt;(str, startstr) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; str.substring(0, startstr.length) == startstr;
        },
        endsWith: &lt;span class="kwrd"&gt;function&lt;/span&gt;(str, endstr) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; str.substring(str.length - endstr.length) == endstr;
        }
    };
    &lt;span class="rem"&gt;// Declare the &amp;quot;public&amp;quot; methods that will be exposed&lt;/span&gt;
    &lt;span class="kwrd"&gt;var&lt;/span&gt; that = {
        &lt;span class="rem"&gt;///&amp;lt;summary&amp;gt;Converts a VEShape object to WKT (Well-Known-Text) string representation.&amp;lt;/summary&amp;gt;&lt;/span&gt;
        ShapeToWKT: &lt;span class="kwrd"&gt;function&lt;/span&gt;(shape) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (shape == &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeToWKT: 'shape' parameter can not be null.&amp;quot;&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;var&lt;/span&gt; wktTemplate = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; wktGeomPoints = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;

            &lt;span class="rem"&gt;// Figure out the WKT Geometry Type&lt;/span&gt;
            &lt;span class="kwrd"&gt;switch&lt;/span&gt; (shape.GetType()) {
                &lt;span class="kwrd"&gt;case&lt;/span&gt; VEShapeType.Pushpin:
                    wktTemplate = &lt;span class="str"&gt;&amp;quot;POINT({points})&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; VEShapeType.Polygon:
                    wktTemplate = &lt;span class="str"&gt;&amp;quot;POLYGON(({points}))&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; VEShapeType.Polyline:
                    wktTemplate = &lt;span class="str"&gt;&amp;quot;LINESTRING({points})&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;default&lt;/span&gt;:
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeToWKT: VEShapeType (&amp;quot;&lt;/span&gt; + shape.GetType() + &lt;span class="str"&gt;&amp;quot;) not supported.&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
            }

            &lt;span class="rem"&gt;// Get the List of VELatLong objects represented as WKT compatible list of points&lt;/span&gt;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; shapePoints = shape.GetPoints();
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 0; i &amp;lt; shapePoints.length; i++) {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (wktGeomPoints.length &amp;gt; 0) {
                    wktGeomPoints += &lt;span class="str"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;;
                }
                wktGeomPoints += shapePoints[i].Longitude + &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + shapePoints[i].Latitude;
            }

            &lt;span class="rem"&gt;// return WKT representation of the VEShape&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; wktTemplate.replace(&lt;span class="str"&gt;&amp;quot;{points}&amp;quot;&lt;/span&gt;, wktGeomPoints);
        },
        &lt;span class="rem"&gt;///&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;///Converts WKT (Well-Known-Text) string representation of a point/polygon/linestring to a VEShape object.&lt;/span&gt;
        &lt;span class="rem"&gt;///&amp;lt;/summary&amp;gt;&lt;/span&gt;
        ShapeFromWKT: &lt;span class="kwrd"&gt;function&lt;/span&gt;(strWKT) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (strWKT == &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeFromWKT: 'strWKT' parameter can not be null.&amp;quot;&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (strWKT.length == 0) {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeFromWKT: 'strWKT' parameter can not be an empty string.&amp;quot;&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;var&lt;/span&gt; shapeType = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; wktPoints = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

            &lt;span class="rem"&gt;// Get the Shape Type and list of &amp;quot;Longitude Latitude&amp;quot; location points&lt;/span&gt;
            &lt;span class="kwrd"&gt;switch&lt;/span&gt; (strWKT.substring(0, 5).toLowerCase()) {
                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;point&amp;quot;&lt;/span&gt;:
                    shapeType = VEShapeType.Pushpin;
                    wktPoints = strWKT.substring(6, strWKT.length - 1);
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;polyg&amp;quot;&lt;/span&gt;:
                    shapeType = VEShapeType.Polygon;
                    wktPoints = strWKT.substring(9, strWKT.length - 2);
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;lines&amp;quot;&lt;/span&gt;:
                    shapeType = VEShapeType.Polyline;
                    wktPoints = strWKT.substring(11, strWKT.length - 1);
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;default&lt;/span&gt;:
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeFromWKT: Unknown WKT Geometry Type&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
            }

            &lt;span class="rem"&gt;// split out the wkt points to be seperate&lt;/span&gt;
            wktPoints = wktPoints.split(&lt;span class="str"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;);

            &lt;span class="rem"&gt;// Convert the WKT Points to VELatLong locations&lt;/span&gt;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; shapePoints = &lt;span class="kwrd"&gt;new&lt;/span&gt; Array();
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 0; i &amp;lt; wktPoints.length; i++) {
                &lt;span class="rem"&gt;// Split the &amp;quot;Longitude Latitude&amp;quot; apart&lt;/span&gt;
                &lt;span class="kwrd"&gt;var&lt;/span&gt; loc = priv.trimSpaces(wktPoints[i]).split(&lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt;);
                &lt;span class="rem"&gt;// Create VELatLong location&lt;/span&gt;
                shapePoints[shapePoints.length] = &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(parseFloat(loc[1]), parseFloat(loc[0]));
            }
            
            &lt;span class="rem"&gt;// Return a VEShape that represents this WKT Geometry&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(shapeType, shapePoints);
        }
    };
    &lt;span class="rem"&gt;// Return the object that contains the &amp;quot;public&amp;quot; and &amp;quot;private&amp;quot; methods&lt;/span&gt;
    &lt;span class="kwrd"&gt;return&lt;/span&gt; that;
})();&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q-yD9YNrI3U:QZh_-roulvw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q-yD9YNrI3U:QZh_-roulvw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=q-yD9YNrI3U:QZh_-roulvw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q-yD9YNrI3U:QZh_-roulvw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=q-yD9YNrI3U:QZh_-roulvw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/q-yD9YNrI3U" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/04/04/Virtual-Earth-Shapes-(VEShape)-to-WKT-(Well-Known-Text)-and-Back-using-JavaScript.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/04/04/Virtual-Earth-Shapes-(VEShape)-to-WKT-(Well-Known-Text)-and-Back-using-JavaScript.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=7b110c3f-e26c-446e-967f-084357c59f31</guid>
      <pubDate>Sat, 04 Apr 2009 12:38:59 -0500</pubDate>
      <category>Virtual Earth</category>
      <category>JavaScript</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=7b110c3f-e26c-446e-967f-084357c59f31</pingback:target>
      <slash:comments>14</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=7b110c3f-e26c-446e-967f-084357c59f31</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/04/04/Virtual-Earth-Shapes-(VEShape)-to-WKT-(Well-Known-Text)-and-Back-using-JavaScript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=7b110c3f-e26c-446e-967f-084357c59f31</wfw:commentRss>
    </item>
    <item>
      <title>Awarded 2009 Microsoft MVP - Windows Live Platform</title>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Congratulations 2009 Microsoft MVP!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Dear Chris Pietschmann,&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Congratulations! We are pleased to present you with the 2009 Microsoft&amp;reg; MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Toby Richards     &lt;br /&gt;General Manager       &lt;br /&gt;Community Support Services&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m lucky enough to be one of the April Fools MVPs. Last year I wasn&amp;rsquo;t sure at first if the email was an April Fools joke or not, and this year I&amp;rsquo;m just as happy that it&amp;rsquo;s not. This marks the second time I&amp;rsquo;ve been awarded Microsoft MVP. Last year I was awarded in the &amp;ldquo;Virtual Earth&amp;rdquo; category, and last fall they renamed me to &amp;ldquo;Windows Live Platform&amp;rdquo;. This year I am awarded in the same &amp;ldquo;Windows Live Platform&amp;rdquo; category.&lt;/p&gt;
&lt;p&gt;In case you&amp;rsquo;re not familiar with the Microsoft MVP Program, here&amp;rsquo;s a link for more information:&lt;/p&gt;
&lt;p&gt;&lt;a title="http://mvp.support.microsoft.com/gp/mvpawardintro" href="http://mvp.support.microsoft.com/gp/mvpawardintro"&gt;http://mvp.support.microsoft.com/gp/mvpawardintro&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And Congratulations to all those that have also been awarded MVP on this April Fools day. Especially to those who&amp;rsquo;ve gotten awarded for the first time; keep it up.&lt;/p&gt;
&lt;p&gt;Thanks!!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://mvp.support.microsoft.com/profile/Pietschmann" target="_blank"&gt;Chris Pietschmann&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=EhKh9YtltMU:8vQg9fQ86Uk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=EhKh9YtltMU:8vQg9fQ86Uk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=EhKh9YtltMU:8vQg9fQ86Uk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=EhKh9YtltMU:8vQg9fQ86Uk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=EhKh9YtltMU:8vQg9fQ86Uk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/EhKh9YtltMU" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/04/01/Awarded-2009-Microsoft-MVP-ndash3b-Windows-Live-Platform.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/04/01/Awarded-2009-Microsoft-MVP-ndash3b-Windows-Live-Platform.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=3314eabf-8818-450e-ad7d-27986a02f641</guid>
      <pubDate>Wed, 01 Apr 2009 16:17:00 -0500</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=3314eabf-8818-450e-ad7d-27986a02f641</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=3314eabf-8818-450e-ad7d-27986a02f641</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/04/01/Awarded-2009-Microsoft-MVP-ndash3b-Windows-Live-Platform.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=3314eabf-8818-450e-ad7d-27986a02f641</wfw:commentRss>
    </item>
    <item>
      <title>Prototype of VEToolkit + ASP.NET MVC 1.0 Component Checked In</title>
      <description>&lt;p&gt;I just checked in an initial prototype of a reusable Virtual Earth component for ASP.NET MVC. The “VEToolkit.Web.MVC.Map” component is written as an Extension to the ASP.NET MVC AjaxHelper class, and allows for a simpler experience when implementing Virtual Earth mapping within ASP.NET MVC applications. This is an early prototype of what the component will be; it’s not a final release; but you are free to use it.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://vetoolkit.codeplex.com/SourceControl/ListDownloadableCommits.aspx" target="_blank"&gt;Download the latest Change Set of VEToolkit&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The code is subject to change at any time, since this is currently in a prototype stage, but below is a basic overview of what’s there so far.&lt;/p&gt;  &lt;h3&gt;Include a Basic Map on the Page&lt;/h3&gt;  &lt;p&gt;Include the “VEToolkit.Web.MVC” namespace within the page by adding the following Include directive to the top of the Page:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Import Namespace=&amp;quot;VEToolkit.Web.MVC&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Add the following two JavaScript Includes (the Virtual Earth JavaScript API and jQuery) to the Page Header:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;/Scripts/jquery-1.3.2.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Add the following to the Page to add a basic Virtual Earth map:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Ajax.Map() &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;And that’s it; you’ll have “default” sized Virtual Earth map on the page.&lt;/p&gt;

&lt;h3&gt;Specify you own name for the global VEMap Variable that’s used&lt;/h3&gt;

&lt;p&gt;By default the component autogenerates an ID to use when naming the global VEMap object within the JavaScript that’s generated.&lt;/p&gt;

&lt;p&gt;Here’s an example of how to specify your own ID (or variable name) to be used for the global VEMap object that’s created:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Ajax.Map(&lt;span class="str"&gt;&amp;quot;myMap&amp;quot;&lt;/span&gt;) &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Now to get a hold of the global reference to the VEMap object, you can just access it by name, like so:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Zoom In&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;myMap.ZoomIn();&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Zoom Out&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;myMap.ZoomOut();&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;Set a couple Map Properties&lt;/h3&gt;

&lt;p&gt;Here’s a modified example of the above that sets the Center Location, Zoom Level and Map Style:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Ajax.Map(&lt;span class="str"&gt;&amp;quot;myMap&amp;quot;&lt;/span&gt;)
    .SetCenter(&lt;span class="kwrd"&gt;new&lt;/span&gt; Location(44, -78))
    .SetZoom(6)
    .SetMapStyle(MapStyle.Road)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;Call a JavaScript Function Once the Map is Loaded&lt;/h3&gt;

&lt;p&gt;Also you can specify a JavaScript Function to be called once the Map has finished loading within the Page.&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Ajax.Map(&lt;span class="str"&gt;&amp;quot;myMap&amp;quot;&lt;/span&gt;)
    .SetOnMapLoaded(&lt;span class="str"&gt;&amp;quot;MapLoaded&amp;quot;&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;And, here’s a simple JavaScript Function named “MapLoaded” to match that adds a Pushpin to the Map at it’s Center Point:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; MapLoaded(sender) {
        &lt;span class="rem"&gt;// &amp;quot;sender&amp;quot; = The Map that was Loaded&lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; map = sender;

        &lt;span class="rem"&gt;// Add a Shape to the Center of the Map now it's finished loading&lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; s = &lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Pushpin, sender.GetCenter());
        s.SetTitle(&lt;span class="str"&gt;&amp;quot;Center Point&amp;quot;&lt;/span&gt;);
        s.SetDescription(&lt;span class="str"&gt;&amp;quot;This was the original center point when the Map loaded.&amp;quot;&lt;/span&gt;);
        map.AddShape(s);
    }
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;As stated above, this is just a basic overview of what’s been implemented so far in the VEToolkit ASP.NET MVC Prototype. There are a couple more things in there than I mentioned above, but I thought I’d keep the intro very basic until development moved further along.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7O0YxCg3WQQlbLU3RxckwybuMAo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7O0YxCg3WQQlbLU3RxckwybuMAo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7O0YxCg3WQQlbLU3RxckwybuMAo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7O0YxCg3WQQlbLU3RxckwybuMAo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=J2JbrKiKOBE:d4QOEaQWqbo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=J2JbrKiKOBE:d4QOEaQWqbo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=J2JbrKiKOBE:d4QOEaQWqbo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=J2JbrKiKOBE:d4QOEaQWqbo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=J2JbrKiKOBE:d4QOEaQWqbo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/J2JbrKiKOBE" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/28/Prototype-of-VEToolkit-2b-ASPNET-MVC-10-Component-Checked-In.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/28/Prototype-of-VEToolkit-2b-ASPNET-MVC-10-Component-Checked-In.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=b74f5ac6-44de-4e42-b485-78d44e5be15c</guid>
      <pubDate>Sat, 28 Mar 2009 16:17:06 -0500</pubDate>
      <category>Virtual Earth</category>
      <category>JavaScript</category>
      <category>ASP.NET MVC</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=b74f5ac6-44de-4e42-b485-78d44e5be15c</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=b74f5ac6-44de-4e42-b485-78d44e5be15c</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/28/Prototype-of-VEToolkit-2b-ASPNET-MVC-10-Component-Checked-In.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=b74f5ac6-44de-4e42-b485-78d44e5be15c</wfw:commentRss>
    </item>
    <item>
      <title>ASP.NET MVC: Implement Theme Folders using a Custom ViewEngine</title>
      <description>&lt;p&gt;One of the things that ASP.NET MVC 1.0 is missing is the ability to easily implement Themes. The older, more mature standard ASP.NET framework includes theme support via the App_Themes folder; however limited it can be, it’s still more than ASP.NET MVC currently has. Well, at least until I wrote this little custom ViewEngine and ControllerBase class to help out and allow us to very easily implement Themes within our ASP.NET MVC applications. &lt;/p&gt;  &lt;p&gt;A little history: A few months back I wrote up a post on “&lt;a href="http://pietschsoft.com/post.aspx?id=ee0e253d-c746-4099-9795-81aaf14ad608"&gt;How To Setup Custom Theme Support In ASP.NET MVC Preview 4 using a Custom ViewEngine&lt;/a&gt;”, then a couple weeks later I posted an updated version that added &lt;a href="http://pietschsoft.com/post.aspx?id=5a6945d0-933a-4971-aac1-13dcd73711d9"&gt;Custom Themes to ASP.NET MVC Preview 5&lt;/a&gt;. So I’ve decided to update the code from Preview 5 and make it all work with ASP.NET MVC v1.0 Final Release. &lt;/p&gt;  &lt;p&gt;Also, I took a tip from &lt;a href="http://frugalcoder.us/"&gt;Michael Ryan&lt;/a&gt; and modified my previous theme implementation from Preview 5 to include both Views and Content folders within the Theme folder. &lt;/p&gt;  &lt;h3&gt;Download the Code&lt;/h3&gt;  &lt;p&gt;I know some of you may want to download the code and look at it before reading on, so here's the download link: &lt;/p&gt;  &lt;p&gt;Source Code: &lt;a href="http://pietschsoft.com/file.axd?file=AspNetMvc1CustomThemeImplementation.zip" rel="enclosure"&gt;AspNetMvc1CustomThemeImplementation.zip (262.99 kb)&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;Create “~/Themes” Folder and a “Default” View Theme&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=ASPNETMVC_1_CustomThemeFolderLayout.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=ASPNETMVC_1_CustomThemeFolderLayout.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ASPNETMVC_1_CustomThemeFolderLayout" border="0" alt="ASPNETMVC_1_CustomThemeFolderLayout" align="right" src="http://pietschsoft.com/image.axd?picture=ASPNETMVC_1_CustomThemeFolderLayout_thumb.png" width="275" height="508" /&gt;&lt;/a&gt;First, we’ll make some changes to the Views contained within the default ASP.NET MVC Template. &lt;/p&gt;  &lt;p&gt;Here’s a brief summary of what changes are needed: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a sub-folder named “Themes” within the website root folder &lt;/li&gt;    &lt;li&gt;Create a sub-folder names “Default” within the “Themes” folder &lt;/li&gt;    &lt;li&gt;Cut and Paste the “Views” folder into the new “~/Themes/Default” folder &lt;/li&gt;    &lt;li&gt;Cut and Past the “Content” folder into the new “~/Themes/Default” folder &lt;/li&gt;    &lt;li&gt;Modify the Pages (.aspx) to point correctly to the Master Page (.master) for the Theme their in, now that we moved the files. &lt;/li&gt;    &lt;li&gt;Modify the Master Pages (.master) to point to the CSS file within the “Content” folder correctly, now that we moved the files. &lt;/li&gt;    &lt;li&gt;To create additional Themes, just copy the “Default” folder and name it what you want for the desired Theme, and repeat Steps 5 and 6 above. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;To the right is a screenshot displaying the layout of the Themes folder as described above. &lt;/p&gt;  &lt;h3&gt;Apply the Custom ViewEngine&lt;/h3&gt;  &lt;p&gt;Now that we have our Themes folder created, we can go ahead and implement our Custom ViewEngine. The Custom ViewEngine in this example was created by inheriting the WebFormViewEngine and just overriding/changing the necessary functionality. &lt;/p&gt;  &lt;p&gt;First we need to tell our application to use the new “WebFormThemeViewEngine” ViewEngine class. To do this we’ll need to clear any existing ViewEngines and add a new instance of the ‘WebFormThemeViewEngine”. This needs to be done within the Application_Start method in the Global.asax. Below is what the Application_Start method will look like after we make the necessary changes.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Application_Start()
{
    RegisterRoutes(RouteTable.Routes);

    &lt;span class="rem"&gt;// Replace the Default WebFormViewEngine with our custom WebFormThemeViewEngine&lt;/span&gt;
    System.Web.Mvc.ViewEngines.Engines.Clear();
    System.Web.Mvc.ViewEngines.Engines.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; WebFormThemeViewEngine());
}&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Also, for reference here’s the complete code for the “WebFormThemeViewEngine” class that’s used in this example. I wont be discussing the steps necessary when creating your own custom ViewEngines; that would be a little more involved than I would like to get within the scope of this article. A link to download the entire code for the project I created when writing this article is located at the top of the article.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebFormThemeViewEngine : WebFormViewEngine
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; WebFormThemeViewEngine()
    {
        &lt;span class="kwrd"&gt;base&lt;/span&gt;.MasterLocationFormats = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] {
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/{1}/{0}.master&amp;quot;&lt;/span&gt;, 
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/Shared/{0}.master&amp;quot;&lt;/span&gt;
        };
        &lt;span class="kwrd"&gt;base&lt;/span&gt;.ViewLocationFormats = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] { 
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/{1}/{0}.aspx&amp;quot;&lt;/span&gt;, 
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/{1}/{0}.ascx&amp;quot;&lt;/span&gt;, 
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/Shared/{0}.aspx&amp;quot;&lt;/span&gt;, 
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/Shared/{0}.ascx&amp;quot;&lt;/span&gt; 
        };
        &lt;span class="kwrd"&gt;base&lt;/span&gt;.PartialViewLocationFormats = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] {
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/{1}/{0}.aspx&amp;quot;&lt;/span&gt;,
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/{1}/{0}.ascx&amp;quot;&lt;/span&gt;,
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/Shared/{0}.aspx&amp;quot;&lt;/span&gt;,
            &lt;span class="str"&gt;&amp;quot;~/Themes/{2}/Views/Shared/{0}.ascx&amp;quot;&lt;/span&gt;
        };
    }

    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; FileExists(ControllerContext controllerContext, &lt;span class="kwrd"&gt;string&lt;/span&gt; virtualPath)
    {
        &lt;span class="kwrd"&gt;try&lt;/span&gt;
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; System.IO.File.Exists(controllerContext.HttpContext.Server.MapPath(virtualPath));
        }
        &lt;span class="kwrd"&gt;catch&lt;/span&gt; (HttpException exception)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (exception.GetHttpCode() != 0x194)
            {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
        }
        &lt;span class="kwrd"&gt;catch&lt;/span&gt;
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
        }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; ViewEngineResult FindView(ControllerContext controllerContext, &lt;span class="kwrd"&gt;string&lt;/span&gt; viewName, &lt;span class="kwrd"&gt;string&lt;/span&gt; masterName, &lt;span class="kwrd"&gt;bool&lt;/span&gt; useCache)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt;[] strArray;
        &lt;span class="kwrd"&gt;string&lt;/span&gt;[] strArray2;

        &lt;span class="kwrd"&gt;if&lt;/span&gt; (controllerContext == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
        {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentNullException(&lt;span class="str"&gt;&amp;quot;controllerContext&amp;quot;&lt;/span&gt;);
        }
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(viewName))
        {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;&amp;quot;viewName must be specified.&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;viewName&amp;quot;&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;string&lt;/span&gt; themeName = &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetThemeToUse(controllerContext);

        &lt;span class="kwrd"&gt;string&lt;/span&gt; requiredString = controllerContext.RouteData.GetRequiredString(&lt;span class="str"&gt;&amp;quot;controller&amp;quot;&lt;/span&gt;);

        &lt;span class="kwrd"&gt;string&lt;/span&gt; viewPath = &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetPath(controllerContext, &lt;span class="kwrd"&gt;this&lt;/span&gt;.ViewLocationFormats, &lt;span class="str"&gt;&amp;quot;ViewLocationFormats&amp;quot;&lt;/span&gt;,
                viewName, themeName, requiredString, &lt;span class="str"&gt;&amp;quot;View&amp;quot;&lt;/span&gt;, useCache, &lt;span class="kwrd"&gt;out&lt;/span&gt; strArray);

        &lt;span class="kwrd"&gt;string&lt;/span&gt; masterPath = &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetPath(controllerContext, &lt;span class="kwrd"&gt;this&lt;/span&gt;.MasterLocationFormats, &lt;span class="str"&gt;&amp;quot;MasterLocationFormats&amp;quot;&lt;/span&gt;,
                masterName, themeName, requiredString, &lt;span class="str"&gt;&amp;quot;Master&amp;quot;&lt;/span&gt;, useCache, &lt;span class="kwrd"&gt;out&lt;/span&gt; strArray2);

        &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(viewPath) &amp;amp;&amp;amp; (!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(masterPath) || &lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(masterName)))
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ViewEngineResult(&lt;span class="kwrd"&gt;this&lt;/span&gt;.CreateView(controllerContext, viewPath, masterPath), &lt;span class="kwrd"&gt;this&lt;/span&gt;);
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ViewEngineResult(strArray.Union&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(strArray2));
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; ViewEngineResult FindPartialView(ControllerContext controllerContext, &lt;span class="kwrd"&gt;string&lt;/span&gt; partialViewName, &lt;span class="kwrd"&gt;bool&lt;/span&gt; useCache)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt;[] strArray;
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (controllerContext == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
        {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentNullException(&lt;span class="str"&gt;&amp;quot;controllerContext&amp;quot;&lt;/span&gt;);
        }
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(partialViewName))
        {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;&amp;quot;partialViewName must be specified.&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;partialViewName&amp;quot;&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;string&lt;/span&gt; themeName = &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetThemeToUse(controllerContext);

        &lt;span class="kwrd"&gt;string&lt;/span&gt; requiredString = controllerContext.RouteData.GetRequiredString(&lt;span class="str"&gt;&amp;quot;controller&amp;quot;&lt;/span&gt;);
        &lt;span class="kwrd"&gt;string&lt;/span&gt; partialViewPath = &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetPath(controllerContext, &lt;span class="kwrd"&gt;this&lt;/span&gt;.PartialViewLocationFormats,
                &lt;span class="str"&gt;&amp;quot;PartialViewLocationFormats&amp;quot;&lt;/span&gt;, partialViewName, themeName, requiredString, &lt;span class="str"&gt;&amp;quot;Partial&amp;quot;&lt;/span&gt;, useCache, &lt;span class="kwrd"&gt;out&lt;/span&gt; strArray);
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(partialViewPath))
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ViewEngineResult(strArray);
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ViewEngineResult(&lt;span class="kwrd"&gt;this&lt;/span&gt;.CreatePartialView(controllerContext, partialViewPath), &lt;span class="kwrd"&gt;this&lt;/span&gt;);

    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetThemeToUse(ControllerContext controllerContext)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt; themeName = controllerContext.HttpContext.Items[&lt;span class="str"&gt;&amp;quot;themeName&amp;quot;&lt;/span&gt;] &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;;
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (themeName == &lt;span class="kwrd"&gt;null&lt;/span&gt;) themeName = &lt;span class="str"&gt;&amp;quot;Default&amp;quot;&lt;/span&gt;;
        &lt;span class="kwrd"&gt;return&lt;/span&gt; themeName;
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] _emptyLocations;

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetPath(ControllerContext controllerContext, &lt;span class="kwrd"&gt;string&lt;/span&gt;[] locations, &lt;span class="kwrd"&gt;string&lt;/span&gt; locationsPropertyName,
        &lt;span class="kwrd"&gt;string&lt;/span&gt; name, &lt;span class="kwrd"&gt;string&lt;/span&gt; themeName, &lt;span class="kwrd"&gt;string&lt;/span&gt; controllerName, &lt;span class="kwrd"&gt;string&lt;/span&gt; cacheKeyPrefix, &lt;span class="kwrd"&gt;bool&lt;/span&gt; useCache, &lt;span class="kwrd"&gt;out&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] searchedLocations)
    {
        searchedLocations = _emptyLocations;
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(name))
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        }
        &lt;span class="kwrd"&gt;if&lt;/span&gt; ((locations == &lt;span class="kwrd"&gt;null&lt;/span&gt;) || (locations.Length == 0))
        {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;&amp;quot;locations must not be null or emtpy.&amp;quot;&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;bool&lt;/span&gt; flag = IsSpecificPath(name);
        &lt;span class="kwrd"&gt;string&lt;/span&gt; key = &lt;span class="kwrd"&gt;this&lt;/span&gt;.CreateCacheKey(cacheKeyPrefix, name, flag ? &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty : controllerName, themeName);
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (useCache)
        {
            &lt;span class="kwrd"&gt;string&lt;/span&gt; viewLocation = &lt;span class="kwrd"&gt;this&lt;/span&gt;.ViewLocationCache.GetViewLocation(controllerContext.HttpContext, key);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (viewLocation != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; viewLocation;
            }
        }
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (!flag)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetPathFromGeneralName(controllerContext, locations, name, controllerName, themeName, key, &lt;span class="kwrd"&gt;ref&lt;/span&gt; searchedLocations);
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetPathFromSpecificName(controllerContext, name, key, &lt;span class="kwrd"&gt;ref&lt;/span&gt; searchedLocations);
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsSpecificPath(&lt;span class="kwrd"&gt;string&lt;/span&gt; name)
    {
        &lt;span class="kwrd"&gt;char&lt;/span&gt; ch = name[0];
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (ch != &lt;span class="str"&gt;'~'&lt;/span&gt;)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; (ch == &lt;span class="str"&gt;'/'&lt;/span&gt;);
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;;
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; CreateCacheKey(&lt;span class="kwrd"&gt;string&lt;/span&gt; prefix, &lt;span class="kwrd"&gt;string&lt;/span&gt; name, &lt;span class="kwrd"&gt;string&lt;/span&gt; controllerName, &lt;span class="kwrd"&gt;string&lt;/span&gt; themeName)
    {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture,
            &lt;span class="str"&gt;&amp;quot;:ViewCacheEntry:{0}:{1}:{2}:{3}:{4}&amp;quot;&lt;/span&gt;,
            &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt;[] { &lt;span class="kwrd"&gt;base&lt;/span&gt;.GetType().AssemblyQualifiedName, prefix, name, controllerName, themeName });
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetPathFromGeneralName(ControllerContext controllerContext, &lt;span class="kwrd"&gt;string&lt;/span&gt;[] locations, &lt;span class="kwrd"&gt;string&lt;/span&gt; name,
        &lt;span class="kwrd"&gt;string&lt;/span&gt; controllerName, &lt;span class="kwrd"&gt;string&lt;/span&gt; themeName, &lt;span class="kwrd"&gt;string&lt;/span&gt; cacheKey, &lt;span class="kwrd"&gt;ref&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] searchedLocations)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt; virtualPath = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        searchedLocations = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[locations.Length];
        &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; locations.Length; i++)
        {
            &lt;span class="kwrd"&gt;string&lt;/span&gt; str2 = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, locations[i], &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt;[] { name, controllerName, themeName });

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;.FileExists(controllerContext, str2))
            {
                searchedLocations = _emptyLocations;
                virtualPath = str2;
                &lt;span class="kwrd"&gt;this&lt;/span&gt;.ViewLocationCache.InsertViewLocation(controllerContext.HttpContext, cacheKey, virtualPath);
                &lt;span class="kwrd"&gt;return&lt;/span&gt; virtualPath;
            }
            searchedLocations[i] = str2;
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; virtualPath;
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetPathFromSpecificName(ControllerContext controllerContext, &lt;span class="kwrd"&gt;string&lt;/span&gt; name, &lt;span class="kwrd"&gt;string&lt;/span&gt; cacheKey, &lt;span class="kwrd"&gt;ref&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] searchedLocations)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt; virtualPath = name;
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;this&lt;/span&gt;.FileExists(controllerContext, name))
        {
            virtualPath = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
            searchedLocations = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] { name };
        }
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.ViewLocationCache.InsertViewLocation(controllerContext.HttpContext, cacheKey, virtualPath);
        &lt;span class="kwrd"&gt;return&lt;/span&gt; virtualPath;
    }
}&lt;/pre&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;Create a ThemeControllerBase Class to Initially Set the Theme to Use&lt;/h3&gt;

&lt;p&gt;One additional step that’s necessary when using the above WebFormThemeViewEngine is to create a custom Controller Base Class, and inherit from it with all your Controllers. This ThemeControllerBase class needs to set the Theme to use within the “HttpContext.Items[“themeName”]”. If you miss or skip this step you will get an exception and will not be able to run the website. &lt;/p&gt;

&lt;p&gt;The ThemeControllerBase class used in this example includes code that allows you to specify the Theme to use by passing it in using the QueryString like this: &lt;em&gt;“http://localhost/Default.aspx?theme=Red”&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Here’s the code for the ThemeControllerBase class:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;abstract&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ThemeControllerBase : Controller
{
    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Execute(System.Web.Routing.RequestContext requestContext)
    {
        &lt;span class="rem"&gt;// Add code here to set the Theme based on your database or some other storage&lt;/span&gt;
        requestContext.HttpContext.Items[&lt;span class="str"&gt;&amp;quot;themeName&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;Red&amp;quot;&lt;/span&gt;;


        
        &lt;span class="rem"&gt;// Allow the Theme to be overriden via the querystring&lt;/span&gt;
        &lt;span class="rem"&gt;// If a Theme Name is Passed in the querystring then use it and override the previously set Theme Name&lt;/span&gt;
        &lt;span class="rem"&gt;// http://localhost/Default.aspx?theme=Red&lt;/span&gt;
        var previewTheme = requestContext.HttpContext.Request.QueryString[&lt;span class="str"&gt;&amp;quot;theme&amp;quot;&lt;/span&gt;];
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(previewTheme))
        {
            requestContext.HttpContext.Items[&lt;span class="str"&gt;&amp;quot;themeName&amp;quot;&lt;/span&gt;] = previewTheme;
        }

        &lt;span class="kwrd"&gt;base&lt;/span&gt;.Execute(requestContext);
    }
}&lt;/pre&gt;

&lt;p&gt;Then you need to have all your Controller’s inherit from the ThemeControllerBase like the following: &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HomeController : ThemeControllerBase { }&lt;/pre&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;I’m sure some kind of Themes support is on the list for Microsoft to eventually implement into ASP.NET MVC some time down the road, but I have yet to see anything mentioned. Also, since the Official v1.0 release has already been released, I don’t really expect anything to change until presumably after .NET 4.0 ships; this is assuming the ASP.NET MVC 1.0 bits are what make it into .NET 4.0 and not a newer version of ASP.NET MVC. So, for now if you want to implement Themes into your ASP.NET MVC Website, you’ll just have to use the code I post here, or some other custom implementation. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-nHkhVvBDh_pbRIudXIsq8b1Di8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-nHkhVvBDh_pbRIudXIsq8b1Di8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-nHkhVvBDh_pbRIudXIsq8b1Di8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-nHkhVvBDh_pbRIudXIsq8b1Di8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=b0FsIxWmT98:QC_nvV4fTmM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=b0FsIxWmT98:QC_nvV4fTmM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=b0FsIxWmT98:QC_nvV4fTmM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=b0FsIxWmT98:QC_nvV4fTmM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=b0FsIxWmT98:QC_nvV4fTmM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/b0FsIxWmT98" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/26/ASPNET-MVC-Implement-Theme-Folders-using-a-Custom-ViewEngine.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/26/ASPNET-MVC-Implement-Theme-Folders-using-a-Custom-ViewEngine.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=237305ef-7b41-45f4-af3b-d7b1b116e78b</guid>
      <pubDate>Thu, 26 Mar 2009 18:09:00 -0500</pubDate>
      <category>asp.net</category>
      <category>ASP.NET MVC</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=237305ef-7b41-45f4-af3b-d7b1b116e78b</pingback:target>
      <slash:comments>14</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=237305ef-7b41-45f4-af3b-d7b1b116e78b</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/26/ASPNET-MVC-Implement-Theme-Folders-using-a-Custom-ViewEngine.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=237305ef-7b41-45f4-af3b-d7b1b116e78b</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Silverlight: Using MouseClick Event To Add "Pushpins"</title>
      <description>&lt;p&gt;In previous tutorials I covered the &amp;ldquo;&lt;a href="http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c"&gt;Basics of Adding Polygons and Polylines&lt;/a&gt;&amp;rdquo; and &amp;ldquo;&lt;a href="http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63"&gt;Adding Media (Images, Video, etc.)&lt;/a&gt;&amp;rdquo;, but what about handling user input via Map Events? Well, in this tutorial I&amp;rsquo;ll cover the basics of working with the Map.MouseClick Event (equivalent of the old &amp;ldquo;onclick&amp;rdquo; event in the Virtual Earth JavaScript Control).&lt;/p&gt;
&lt;h3&gt;Adding a MouseClick Event Handler&lt;/h3&gt;
&lt;p&gt;In order to wire things up to manipulate the Map using the MouseClick event, we must first attach an Event Handler to it. The Event Handler for the MouseClick event needs to be just like any other event handler in .NET; it must accept two parameters: 1) a &amp;ldquo;sender&amp;rdquo; object, and 2) an &amp;ldquo;EventArgs&amp;rdquo; object.&lt;/p&gt;
&lt;p&gt;Before we create our event handler, it&amp;rsquo;s worth noting that to be more specific, the value that gets passed to the &amp;ldquo;EventArgs&amp;rdquo; parameter of the Map.MouseClick event is actually of Type MapMouseEventArgs.&lt;/p&gt;
&lt;p&gt;The MapMouseEventArgs object has the following two properties:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Handled&lt;/strong&gt; &amp;ndash; Gets or Sets a value indicating whether the Map event was handled. If you want to prevent the &amp;ldquo;default&amp;rdquo; event handling behavior from executing, then all you need to do is set this to True.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ViewportPoint&lt;/strong&gt; &amp;ndash; Gets the viewport point where the mouse event occurred. This is a System.Windows.Point object that represents the X and Y coordinates where the mouse was clicked.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To declare the MouseClick event handler a method that matched the following signature: void(object sender, MapMouseEventArgs e)&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example Map.MouseClick event handler method:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; myMap_MouseClick(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, MapMouseEventArgs e)
{
}&lt;/pre&gt;
&lt;p&gt;&lt;!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --&gt;&lt;/p&gt;
&lt;p&gt;You can attach the above event handler from within code:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;myMap.MouseClick += &lt;span class="kwrd"&gt;new&lt;/span&gt; EventHandler&amp;lt;MapMouseEventArgs&amp;gt;(myMap_MouseClick);&lt;/pre&gt;
&lt;p&gt;Or, from within XAML:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;m:Map&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="myMap"&lt;/span&gt; &lt;span class="attr"&gt;MouseClick&lt;/span&gt;&lt;span class="kwrd"&gt;="myMap_MouseClick"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;m:Map&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;Get the Location (Lat/Long Coordinate) the Mouse was Clicked&lt;/h3&gt;
&lt;p&gt;One thing that you may have noticed is the MapMouseEventArgs object that is passed to the MouseClick event handler doesn&amp;rsquo;t contain a &amp;ldquo;Location&amp;rdquo; or &amp;ldquo;LatLong&amp;rdquo; property of any kind. It&amp;rsquo;s seems odd at first that there&amp;rsquo;s no direct way of obtaining the Map Location (Lat/Long) of where the mouse was clicked, but with the help of a little helper method on the Map object itself we can pass in the ViewportPoint (X and Y Coordinates) value contained within the MapMouseEventArgs.ViewportPoint property and get back a Location object with Latitude/Longitude.&lt;/p&gt;
&lt;p&gt;To obtain the Location (Lat/Long) where the mouse was clicked, simply invoke the Map.ViewportPointToLocation method by passing in the MapMouseEventArgs.ViewportPoint value.&lt;/p&gt;
&lt;p&gt;The following line of code demonstrates how this can be done within the MouseClick Event Handler we defined above:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;var location = clickedMap.ViewportPointToLocation(e.ViewportPoint);&lt;/pre&gt;
&lt;p&gt;Now that we have the&amp;nbsp; Location of where the mouse was clicked, we can directly access the Latitude and Longitude values.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;var lat = location.Latitude;
var lng = location.Longitude;&lt;/pre&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;Add a &amp;ldquo;Pushpin&amp;rdquo; at the Clicked Location&lt;/h3&gt;
&lt;p&gt;Now that we have a MouseClick Event Handler in place, and we have access to the Location (Latitude/Longitude) where the mouse was clicked; we can go ahead and add a &amp;ldquo;Pushpin&amp;rdquo; to the Map at that Location.&lt;/p&gt;
&lt;p&gt;If you have any questions on how to add a Shape or &amp;ldquo;Pushpin&amp;rdquo; to the Map, I recommend reading the following two tutorials:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c"&gt;Basics of Adding Polygons and Polylines using XAML and Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63"&gt;Adding Media (Images, Video, etc.) to the Map&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this example to keep things simple, we&amp;rsquo;ll add a Square (via the System.Windows.Shapes.Rectangle object) to the Map at the clicked location that is 10x10 in size.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a full code example of the MouseClick event handler we created above, including code that gets the Location clicked and adds the Rectangle Shape to the Map within a new MapLayer:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; myMap_MouseClick(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, MapMouseEventArgs e)
{
    &lt;span class="rem"&gt;// Set a variable equal to the Map that raised the event&lt;/span&gt;
    Map clickedMap = (Map)sender;
    
    &lt;span class="rem"&gt;// Convert the X/Y Coordinate that was Clicked to a Lat/Long Location&lt;/span&gt;
    var location = clickedMap.ViewportPointToLocation(e.ViewportPoint);

    &lt;span class="rem"&gt;// Create new MapLayer&lt;/span&gt;
    var myLayer = &lt;span class="kwrd"&gt;new&lt;/span&gt; MapLayer();

    &lt;span class="rem"&gt;// Create a Rectangle Shape to Show as the "Pushpin"&lt;/span&gt;
    var rectangle = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Windows.Shapes.Rectangle();
    &lt;span class="rem"&gt;// Set it's Size to 10x10&lt;/span&gt;
    rectangle.Width = 10;
    rectangle.Height = 10;
    &lt;span class="rem"&gt;// Color the Rectangle Red&lt;/span&gt;
    rectangle.Fill = &lt;span class="kwrd"&gt;new&lt;/span&gt; SolidColorBrush(Colors.Red);

    &lt;span class="rem"&gt;// Center the Rectangle around the location&lt;/span&gt;
    PositionMethod position = PositionMethod.Center;

    &lt;span class="rem"&gt;// Add Rectangle to MapLayer&lt;/span&gt;
    myLayer.AddChild(rectangle, location, position);

    &lt;span class="rem"&gt;// Add the MapLayer to the Map so the "Pushpin" gets displayed&lt;/span&gt;
    clickedMap.AddChild(myLayer);
}&lt;/pre&gt;
&lt;p&gt;One thing that you may want to do when implementing the above example is create only 1 MapLayer and add all the new &amp;ldquo;Pushpins&amp;rdquo; to that single MapLayer. This will help improve performance on the Map if you are adding MANY pushpins. For the simple example above this just wasn&amp;rsquo;t absolutely necessary.&lt;/p&gt;
&lt;h3&gt;Auto Expand &amp;ldquo;Pushpins&amp;rdquo; using ScaleTransform&lt;/h3&gt;
&lt;p&gt;The best part of the new Virtual Earth Silverlight Map Control is the fact that we can now leverage the full power of Silverlight within our mapping applications/implementations. One of the cool things that can be done are implementing Animations to spice up the user interface.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example that takes the above MouseClick event handler code that adds a Rectangle &amp;ldquo;Pushpin&amp;rdquo; to the Map when the user clicks the Map, and adds a ScaleTransform to &amp;ldquo;Expand&amp;rdquo; the Rectangle when the user moves the mouse over it.&lt;/p&gt;
&lt;p&gt;This is done by setting a ScaleTransform to the Rectangle.RenderTransform during the MouseEnter event, and then removing it during the MouseLeave event. The end result are Rectangle &amp;ldquo;Pushpins&amp;rdquo; that Expand when the user Moves the mouse over them.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the full code for Map.MouseClick, Rectangle.MouseEnter and Rectangle.MouseLeave Event Handlers for this &amp;ldquo;Expand&amp;rdquo; Animation example:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Single MapLayer that will contain all "Pushpins"&lt;/span&gt;
&lt;span class="kwrd"&gt;private&lt;/span&gt; MapLayer myLayer = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; myMap_MouseClick(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, MapMouseEventArgs e)
{
    &lt;span class="rem"&gt;// Set a variable equal to the Map that raised the event&lt;/span&gt;
    Map clickedMap = (Map)sender;

    &lt;span class="rem"&gt;// Convert the X/Y Coordinate that was Clicked to a Lat/Long Location&lt;/span&gt;
    var location = clickedMap.ViewportPointToLocation(e.ViewportPoint);

    &lt;span class="rem"&gt;// Check if MapLayer has already been created&lt;/span&gt;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (myLayer == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
    {
        &lt;span class="rem"&gt;// Create new MapLayer&lt;/span&gt;
        myLayer = &lt;span class="kwrd"&gt;new&lt;/span&gt; MapLayer();

        &lt;span class="rem"&gt;// Add the MapLayer to the Map so the "Pushpin" gets displayed&lt;/span&gt;
        clickedMap.AddChild(myLayer);
    }

    &lt;span class="rem"&gt;// Create a Rectangle Shape to Show as the "Pushpin"&lt;/span&gt;
    var rectangle = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Windows.Shapes.Rectangle();
    &lt;span class="rem"&gt;// Set it's Size to 10x10&lt;/span&gt;
    rectangle.Width = 10;
    rectangle.Height = 10;
    &lt;span class="rem"&gt;// Color the Rectangle Red&lt;/span&gt;
    rectangle.Fill = &lt;span class="kwrd"&gt;new&lt;/span&gt; SolidColorBrush(Colors.Red);

    &lt;span class="rem"&gt;// Attach MouseEnter and MouseLeave Event Handler to the Rectangle&lt;/span&gt;
    &lt;span class="rem"&gt;// This will be used to "Expand" the Rectangle when the user hovers the mouse over it&lt;/span&gt;
    rectangle.MouseEnter += &lt;span class="kwrd"&gt;new&lt;/span&gt; MouseEventHandler(rectangle_MouseEnter);
    rectangle.MouseLeave += &lt;span class="kwrd"&gt;new&lt;/span&gt; MouseEventHandler(rectangle_MouseLeave);

    &lt;span class="rem"&gt;// Center the Rectangle around the location&lt;/span&gt;
    PositionMethod position = PositionMethod.Center;

    &lt;span class="rem"&gt;// Add Rectangle to MapLayer&lt;/span&gt;
    myLayer.AddChild(rectangle, location, position);
}

&lt;span class="kwrd"&gt;void&lt;/span&gt; rectangle_MouseEnter(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, MouseEventArgs e)
{
    &lt;span class="rem"&gt;// Get the Rectangle&lt;/span&gt;
    var rectangle = (Rectangle)sender;

    &lt;span class="rem"&gt;// Create new ScaleTransform&lt;/span&gt;
    var scaleTransform = &lt;span class="kwrd"&gt;new&lt;/span&gt; ScaleTransform();

    &lt;span class="rem"&gt;// Set the Transform to "Expand" the Rectangle&lt;/span&gt;
    &lt;span class="rem"&gt;// equally horizontally and vertically&lt;/span&gt;
    scaleTransform.ScaleX = 2.0;
    scaleTransform.ScaleY = 2.0;

    &lt;span class="rem"&gt;// Set the Scale Center to the Center of the Rectangle&lt;/span&gt;
    &lt;span class="rem"&gt;// This is so it doesn't move when "Expanded"&lt;/span&gt;
    scaleTransform.CenterX = rectangle.Width / 2;
    scaleTransform.CenterY = rectangle.Height / 2;

    &lt;span class="rem"&gt;// Apply the ScaleTransform to the Rectangle&lt;/span&gt;
    rectangle.RenderTransform = scaleTransform;
}

&lt;span class="kwrd"&gt;void&lt;/span&gt; rectangle_MouseLeave(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, MouseEventArgs e)
{
    &lt;span class="rem"&gt;// Get the Rectangle&lt;/span&gt;
    var rectangle = (Rectangle)sender;

    &lt;span class="rem"&gt;// Remove the ScaleTransform&lt;/span&gt;
    rectangle.RenderTransform = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
}&lt;/pre&gt;
&lt;p&gt;The above code example also includes a modification from the previous examples in this tutorial; it adds all the new Rectangle &amp;ldquo;Pushpins&amp;rdquo; to a Single MapLayer instead of adding a new MapLayer for each Rectangle &amp;ldquo;Pushpin&amp;rdquo;.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The Map.MouseClick event is really simple to take advantage of, and it&amp;rsquo;s actually just as easy to add a &amp;ldquo;Pushpin&amp;rdquo; during the &amp;ldquo;onclick&amp;rdquo; event with the Virtual Earth Silverlight Map Control as it is with the Virtual Earth JavaScript Control.&lt;/p&gt;
&lt;p&gt;There are a few other events that the Map object exposes, and I&amp;rsquo;ll be covering some of those in additional tutorials. So, keep an eye out for future posts.&lt;/p&gt;
&lt;h4&gt;Previous Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=88a585cd-f90a-40e1-963d-ca1932ce2535"&gt;Overlay OpenStreetMap, OpenAerialMap and Yahoo Map Imagery using Custom Tile Layers&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/euw-T546LYSB7PWWgldmgDQvlUo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/euw-T546LYSB7PWWgldmgDQvlUo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/euw-T546LYSB7PWWgldmgDQvlUo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/euw-T546LYSB7PWWgldmgDQvlUo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=0nckHfNBRO0:yqaXwXd2e4g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=0nckHfNBRO0:yqaXwXd2e4g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=0nckHfNBRO0:yqaXwXd2e4g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=0nckHfNBRO0:yqaXwXd2e4g:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=0nckHfNBRO0:yqaXwXd2e4g:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/0nckHfNBRO0" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/25/Virtual-Earth-Silverlight-Using-MouseClick-Event-To-Add-Pushpins.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/25/Virtual-Earth-Silverlight-Using-MouseClick-Event-To-Add-Pushpins.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=9f492f0f-8da4-4606-9f43-098074d8b9e9</guid>
      <pubDate>Wed, 25 Mar 2009 22:38:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=9f492f0f-8da4-4606-9f43-098074d8b9e9</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=9f492f0f-8da4-4606-9f43-098074d8b9e9</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/25/Virtual-Earth-Silverlight-Using-MouseClick-Event-To-Add-Pushpins.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=9f492f0f-8da4-4606-9f43-098074d8b9e9</wfw:commentRss>
    </item>
    <item>
      <title>MIX'09: Virtual Earth Silverlight CTP Session Online for Viewing</title>
      <description>&lt;p&gt;The "&lt;a href="http://sessions.visitmix.com/MIX09/T34F"&gt;Introducing the Microsoft Virtual Earth Silverlight Map Control CTP&lt;/a&gt;" session from MIX'09 by Chris Pendlton is now available for your viewing pleasure online.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sessions.visitmix.com/MIX09/T34F"&gt;http://sessions.visitmix.com/MIX09/T34F&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, here it is below:&lt;/p&gt;
&lt;p&gt;
&lt;object width="960" height="540" data="data:application/x-silverlight-2," type="application/x-silverlight-2"&gt;
&lt;param name="source" value="http://sessions.visitmix.com/Skins/mixvideos/Styles/players/VideoPlayer2009_02_11.xap" /&gt;
&lt;param name="initParams" value="m=http://mschannel9.vo.msecnd.net/o9/mix/09/wmv-hq/t34f.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://sessions.visitmix.com/Skins/mixvideos/Styles/players/VideoPlayer2009_02_11.xap, postid=0" /&gt;
&lt;param name="background" value="#00FFFFFF" /&gt; &lt;a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkID=124807"&gt; &lt;img style="border-style: none" src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" /&gt; &lt;/a&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0tkfbgpO1RG15Di1YXh6ZcdKybw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0tkfbgpO1RG15Di1YXh6ZcdKybw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0tkfbgpO1RG15Di1YXh6ZcdKybw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0tkfbgpO1RG15Di1YXh6ZcdKybw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=rjvpL6fZUq8:-3TCQX6SM3Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=rjvpL6fZUq8:-3TCQX6SM3Q:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=rjvpL6fZUq8:-3TCQX6SM3Q:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=rjvpL6fZUq8:-3TCQX6SM3Q:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=rjvpL6fZUq8:-3TCQX6SM3Q:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/rjvpL6fZUq8" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/21/MIX09-Virtual-Earth-Silverlight-CTP-Session-Online-For-Viewing.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/21/MIX09-Virtual-Earth-Silverlight-CTP-Session-Online-For-Viewing.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=096a349c-9fa9-4502-b05b-ad3fecb92d96</guid>
      <pubDate>Sat, 21 Mar 2009 16:46:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=096a349c-9fa9-4502-b05b-ad3fecb92d96</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=096a349c-9fa9-4502-b05b-ad3fecb92d96</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/21/MIX09-Virtual-Earth-Silverlight-CTP-Session-Online-For-Viewing.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=096a349c-9fa9-4502-b05b-ad3fecb92d96</wfw:commentRss>
    </item>
    <item>
      <title>I'm starting a Virtual Earth Developer Resource list</title>
      <description>&lt;p&gt;
I just started a page at the below link that I&amp;#39;m lising a bunch of Virtual Earth Developer Resources that I know of. The reason I&amp;#39;m doing this is because there just aren&amp;#39;t any really good lists of resources out there, and there are a TON of resources that you probably don&amp;#39;t even know about. This isn&amp;#39;t going to be an all inclusive list (that would be impossible), but I&amp;#39;ll try to make it the best list of resources I can. Hope it helps some of you discover great content. 
&lt;/p&gt;
&lt;a href="http://pietschsoft.com/page/Virtual-Earth-Developer-Resources.aspx"&gt;http://pietschsoft.com/page/Virtual-Earth-Developer-Resources.aspx&lt;/a&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gX459duwEl69oBaY6j_V3_S0sKA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gX459duwEl69oBaY6j_V3_S0sKA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gX459duwEl69oBaY6j_V3_S0sKA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gX459duwEl69oBaY6j_V3_S0sKA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=UihKQXOpitM:0ulM_DoWWnE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=UihKQXOpitM:0ulM_DoWWnE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=UihKQXOpitM:0ulM_DoWWnE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=UihKQXOpitM:0ulM_DoWWnE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=UihKQXOpitM:0ulM_DoWWnE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/UihKQXOpitM" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/21/Im-starting-a-Virtual-Earth-Developer-Resource-list.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/21/Im-starting-a-Virtual-Earth-Developer-Resource-list.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=99f42301-b361-4bd0-8968-dd138820d57e</guid>
      <pubDate>Sat, 21 Mar 2009 16:36:00 -0500</pubDate>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=99f42301-b361-4bd0-8968-dd138820d57e</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=99f42301-b361-4bd0-8968-dd138820d57e</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/21/Im-starting-a-Virtual-Earth-Developer-Resource-list.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=99f42301-b361-4bd0-8968-dd138820d57e</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Silverlight: Overlay OpenStreetMap, OpenAerialMap and Yahoo Map Imagery using Custom Tile Layers!</title>
      <description>&lt;p&gt;In the “&lt;a href="http://pietschsoft.com/post.aspx?id=ce8b5456-ef99-4311-8099-16976ebcc5e2" target="_blank"&gt;Using Tile Layers to Overlay Custom Map Imagery&lt;/a&gt;” article I showed you how to overlay your own Custom Map Imagery that you generated using the MapCruncher tool on top of the Map. Now, in this article I’ll show you what you need to know in order to overlay map imagery from other competing mapping services (OpenStreetMap, OpenAerialMap and Yahoo Maps). This allows you to easily build in functionality that allows your users to easily switch (with the click of a button or selection of a dropdown) which mapping service imagery is used to visualize the data in your application. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Beware:&lt;/strong&gt; This article is just a demo of how this is possible. If you do implement this, you need to keep in mind that you’ll need to then adhere to both the Virtual Earth Silverlight Control CTP Terms of Use and the Terms of Use for which ever mapping services data you are displaying.&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;Before I begin, I’d like to thank the awesome guys that are working on the DeepEarth Project. &lt;/p&gt;  &lt;p&gt;Now to the exciting stuff! &lt;/p&gt;  &lt;h3&gt;Overview of What’s Needed&lt;/h3&gt;  &lt;p&gt;The steps to create a Tile Layer that displays Map Imagery from the mentions services is very similar to the method mentioned in the “Using Tile Layers to Overlay Custom Map Imagery” arcticle, with the exception that you need to create your own Custom Tile Source object that inherits from TileSource. &lt;/p&gt;  &lt;p&gt;Here’s the steps needed to do this: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a Custom Tile Source (inheriting from TileSource) object&amp;#160; &lt;ol&gt;       &lt;li&gt;Define the “uriFormat” to be used to generate the Uri of the Map Images. &lt;/li&gt;        &lt;li&gt;Override the”GetUri” method. This method uses the “uriFormat” to generate the Uri of the Map Images. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;Add the Tile Source to the Map      &lt;ol&gt;       &lt;li&gt;Create a MapTileLayer object instance &lt;/li&gt;        &lt;li&gt;Create an instance of you Custom Tile Source object &lt;/li&gt;        &lt;li&gt;Add the Custom Tile Source object to the MapTileLayer &lt;/li&gt;        &lt;li&gt;Set the MapTileLayer’s Opacity to the desired value &lt;/li&gt;        &lt;li&gt;Add the MapTileLayer to the Children collection of the Map &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The TileSource objects “GetUri” method takes the following 3 arguments: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;x&lt;/strong&gt; – The horizontal position of the tile. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;y&lt;/strong&gt; – The vertical position of the tile. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;zoomLevel&lt;/strong&gt; – The zoom level of the tile. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You then need to convert (within this method) the x, y, and zoomLevel values into the correct values to be passed using the uriFormat to load the map imagery tiles. This can take a little work in some cases (as with Yahoo Maps) and it an be straight forward in others (as with OpenStreetMap and OpenAerialMap). &lt;/p&gt;  &lt;p&gt;Also, when you’re showing Map Imagery that will completely overlay over the top of the Virtual Earth Imagery, it’s a good practice to set the Map’s Mode to an “Empty” mode that will prevent the Virtual Earth imagery from even being downloaded for display. This will increase performance a little (whether you notice it or not), and it will prevent you from using up unnecessary transactions using the Virtual Earth Web Service (this is how the control loads the Virtual Earth imagery behind the scenes.) &lt;/p&gt;  &lt;h3&gt;Create a TileSource for OpenStreetMap&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_007_OpenStreetMapImagery.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_007_OpenStreetMapImagery" border="0" alt="VEJS_007_OpenStreetMapImagery" align="right" src="http://pietschsoft.com/image.axd?picture=VEJS_007_OpenStreetMapImagery_thumb.png" width="244" height="215" /&gt;&lt;/a&gt;First we need to create custom TileSource object, set the UriFormat to be used to generate the Imagery Uri, and then override the “GetUri” method with code that generates the appropriate Imagery Uri’s using “String.Format”. &lt;/p&gt;  &lt;p&gt;The resulting Custom Tile Source object is so simple, it’s probably easier to just show you the code. &lt;/p&gt;  &lt;p&gt;namespace VirtualEarthSilverlight01    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class OpenStreetMapTileSource : Microsoft.VirtualEarth.MapControl.TileSource     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public OpenStreetMapTileSource()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : base(&amp;quot;http://tile.openstreetmap.org/{2}/{0}/{1}.png&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override Uri GetUri(int x, int y, int zoomLevel)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return new Uri(String.Format(this.UriFormat, x, y, zoomLevel));     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;If you aren’t familiar with the above method of using “String.Format” to replace certain placeholders within a string with specific values, you can reference the &lt;a href="http://msdn.microsoft.com/en-us/library/b1csw23d.aspx" target="_blank"&gt;MSDN Documentation here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Now using the described overview above, we can add the new OpenStreetMapTileSource object to a MapTileLayer on the Map and display the OpenStreetMap Imagery within the Silverlight Map Control. Here’s an example of doing this with XAML. &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlight01.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:mCore=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl.Core;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:local=&amp;quot;clr-namespace:VirtualEarthSilverlight01&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;1600&amp;quot; Height=&amp;quot;768&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Name=&amp;quot;MainMap&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Mode&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mCore:MercatorMode&amp;gt;&amp;lt;/mCore:MercatorMode&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Mode&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Children&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer.TileSources&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;local:OpenStreetMapTileSource&amp;gt;&amp;lt;/local:OpenStreetMapTileSource&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer.TileSources&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Children&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;&amp;lt;/UserControl&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Also, since the OpenStreetMapTileSource object is contained within the projects namespace (“VirtualEarthSilverlight01”) we need to also add a namespace reference to the XAML file. In the example above I’m giving it the prefix of “local”. Once the namespace is included, we can then use our OpenStreetMapTileSource object within the XAML. &lt;/p&gt;  &lt;h3&gt;Create a TileSource for OpenAerialMap&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_007_OpenAerialMapImagery.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_007_OpenAerialMapImagery" border="0" alt="VEJS_007_OpenAerialMapImagery" align="right" src="http://pietschsoft.com/image.axd?picture=VEJS_007_OpenAerialMapImagery_thumb.png" width="244" height="215" /&gt;&lt;/a&gt;The process of creating a Custom Tile Source and adding it to the Map is identical for OpenAerialMap Imagery as the above example for OpenStreetMap; with the exception of the uriFormat that is used to load the imagery. So, I’m not going to re-explain the process all over again. Instead, I’ll just show you the code. &lt;/p&gt;  &lt;p&gt;The resulting Custom Tile Source object for showing OpenAerialMap Imagery: &lt;/p&gt;  &lt;p&gt;namespace VirtualEarthSilverlight01    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class OpenAerialMapTileSource : Microsoft.VirtualEarth.MapControl.TileSource     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public OpenAerialMapTileSource()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : base(&amp;quot;http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/{2}/{0}/{1}.jpg&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override Uri GetUri(int x, int y, int zoomLevel)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return new Uri(String.Format(this.UriFormat, x, y, zoomLevel));     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Here’s some example XAML that adds the OpenAerialMapTileSource object to the Map: &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlight01.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:mCore=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl.Core;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:local=&amp;quot;clr-namespace:VirtualEarthSilverlight01&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;1600&amp;quot; Height=&amp;quot;768&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Name=&amp;quot;MainMap&amp;quot;&amp;gt;    &lt;br /&gt;&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Mode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mCore:MercatorMode&amp;gt;&amp;lt;/mCore:MercatorMode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Mode&amp;gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Children&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer.TileSources&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;local:OpenAerialMapTileSource&amp;gt;&amp;lt;/local:OpenAerialMapTileSource&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer.TileSources&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Children&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;   &lt;br /&gt;&amp;lt;/UserControl&amp;gt;   &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;h3&gt;Create a TileSource for Yahoo Maps (Street, Aerial and Hybrid)&lt;/h3&gt;  &lt;p&gt;Again, the process for creating a Custom Tile Source for Yahoo Maps and adding it to the Map is almost identical to the above examples. Except, with Yahoo maps there’s a little math that needs to be done to convert the x, y and zoomLevel arguments that are passed in to the “TileSource.GetUri” method to be the correct values need to load the Yahoo Maps Imagery. I’m not going to cover the process of what’s needed to convert them from the Virtual Earth values to the Yahoo Maps values, but the as you’ll see below the code needed is fairly simple. &lt;/p&gt;  &lt;h4&gt;Yahoo Maps – Street Imagery&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_007_YahooMapsStreetImagery.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_007_YahooMapsStreetImagery" border="0" alt="VEJS_007_YahooMapsStreetImagery" align="right" src="http://pietschsoft.com/image.axd?picture=VEJS_007_YahooMapsStreetImagery_thumb.png" width="244" height="215" /&gt;&lt;/a&gt;Here’s the code for the Custom Tile Source for Yahoo Maps Street Imagery: &lt;/p&gt;  &lt;p&gt;namespace VirtualEarthSilverlight01    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class YahooStreetTileSource : Microsoft.VirtualEarth.MapControl.TileSource     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public YahooStreetTileSource()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : base(&amp;quot;http://us.maps2.yimg.com/us.png.maps.yimg.com/png?v=3.52&amp;amp;t=m&amp;amp;x={0}&amp;amp;y={1}&amp;amp;z={2}&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override Uri GetUri(int x, int y, int zoomLevel)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // The math used here was copied from the DeepEarth Project (http://deepearth.codeplex.com)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double posY;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double zoom = 18 - zoomLevel;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double num4 = Math.Pow(2.0, zoomLevel) / 2.0; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (y &amp;lt; num4)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; posY = (num4 - Convert.ToDouble(y)) - 1.0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; posY = ((Convert.ToDouble(y) + 1) - num4) * -1.0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return new Uri(String.Format(this.UriFormat, x, posY, zoom));    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;And, here’s some example XAML that adds the YahooStreetTileSource object to the Map: &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlight01.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:mCore=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl.Core;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:local=&amp;quot;clr-namespace:VirtualEarthSilverlight01&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;1600&amp;quot; Height=&amp;quot;768&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Name=&amp;quot;MainMap&amp;quot;&amp;gt;    &lt;br /&gt;&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Mode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mCore:MercatorMode&amp;gt;&amp;lt;/mCore:MercatorMode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Mode&amp;gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Children&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer.TileSources&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;local:YahooStreetTileSource&amp;gt;&amp;lt;/local:YahooStreetTileSource&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer.TileSources&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Children&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;   &lt;br /&gt;&amp;lt;/UserControl&amp;gt;   &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;h4&gt;Yahoo Maps – Aerial Imagery&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_007_YahooMapsAerialImagery.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_007_YahooMapsAerialImagery" border="0" alt="VEJS_007_YahooMapsAerialImagery" align="right" src="http://pietschsoft.com/image.axd?picture=VEJS_007_YahooMapsAerialImagery_thumb.png" width="244" height="215" /&gt;&lt;/a&gt;Here’s the code for the Custom Tile Source for Yahoo Maps Aerial Imagery: &lt;/p&gt;  &lt;p&gt;namespace VirtualEarthSilverlight01    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class YahooAerialTileSource : Microsoft.VirtualEarth.MapControl.TileSource     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public YahooAerialTileSource()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : base(&amp;quot;http://us.maps3.yimg.com/aerial.maps.yimg.com/tile?v=1.7&amp;amp;t=a&amp;amp;x={0}&amp;amp;y={1}&amp;amp;z={2}&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override Uri GetUri(int x, int y, int zoomLevel)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // The math used here was copied from the DeepEarth Project (http://deepearth.codeplex.com)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double posY;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double zoom = 18 - zoomLevel;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double num4 = Math.Pow(2.0, zoomLevel) / 2.0; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (y &amp;lt; num4)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; posY = (num4 - Convert.ToDouble(y)) - 1.0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; posY = ((Convert.ToDouble(y) + 1) - num4) * -1.0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return new Uri(String.Format(this.UriFormat, x, posY, zoom));    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;And, here’s some example XAML that adds the YahooAerialTileSource object to the Map: &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlight01.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:mCore=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl.Core;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:local=&amp;quot;clr-namespace:VirtualEarthSilverlight01&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;1600&amp;quot; Height=&amp;quot;768&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Name=&amp;quot;MainMap&amp;quot;&amp;gt;    &lt;br /&gt;&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Mode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mCore:MercatorMode&amp;gt;&amp;lt;/mCore:MercatorMode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Mode&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Children&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer.TileSources&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;local:YahooAerialTileSource&amp;gt;&amp;lt;/local:YahooAerialTileSource&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer.TileSources&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Children&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;   &lt;br /&gt;&amp;lt;/UserControl&amp;gt;   &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;h4&gt;Yahoo Maps – Hybrid Imagery&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_007_YahooMapsHybridImagery.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_007_YahooMapsHybridImagery" border="0" alt="VEJS_007_YahooMapsHybridImagery" align="right" src="http://pietschsoft.com/image.axd?picture=VEJS_007_YahooMapsHybridImagery_thumb.png" width="244" height="215" /&gt;&lt;/a&gt;One thing with the Yahoo Maps Hybrid Imagery is it only shows the roads in the imagery, everything else is transparent. So in order to get the same view as the Virtual Earth Hybrid Map Mode, you need to add the Yahoo Maps Aerial Imagery to the Map, then add the Yahoo Maps Hybrid Imagery so it overlays on top of the the Aerial imagery. You’ll see below that this is really simple to do. &lt;/p&gt;  &lt;p&gt;Here’s the code for the Custom Tile Source for Yahoo Maps Hybrid Imagery: &lt;/p&gt;  &lt;p&gt;namespace VirtualEarthSilverlight01    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class YahooHybridTileSource : Microsoft.VirtualEarth.MapControl.TileSource     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public YahooHybridTileSource()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : base(&amp;quot;http://us.maps3.yimg.com/aerial.maps.yimg.com/png?v=2.2&amp;amp;t=h&amp;amp;x={0}&amp;amp;y={1}&amp;amp;z={2}”)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override Uri GetUri(int x, int y, int zoomLevel)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // The math used here was copied from the DeepEarth Project (http://deepearth.codeplex.com)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double posY;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double zoom = 18 - zoomLevel;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; double num4 = Math.Pow(2.0, zoomLevel) / 2.0; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (y &amp;lt; num4)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; posY = (num4 - Convert.ToDouble(y)) - 1.0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; posY = ((Convert.ToDouble(y) + 1) - num4) * -1.0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return new Uri(String.Format(this.UriFormat, x, posY, zoom));    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;And, here’s some example XAML that adds the YahooAerialTileSource and YahooHybridTileSource objects to the Map: &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlight01.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:mCore=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl.Core;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:local=&amp;quot;clr-namespace:VirtualEarthSilverlight01&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;1600&amp;quot; Height=&amp;quot;768&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Name=&amp;quot;MainMap&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Mode&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mCore:MercatorMode&amp;gt;&amp;lt;/mCore:MercatorMode&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Mode&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map.Children&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:MapTileLayer.TileSources&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;local:YahooAerialTileSource&amp;gt;&amp;lt;/local:YahooAerialTileSource&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;local:YahooHybridTileSource&amp;gt;&amp;lt;/local:YahooHybridTileSource&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer.TileSources&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:MapTileLayer&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map.Children&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;&amp;lt;/UserControl&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;As you can see, the ability to overlay custom map imagery of any kind (like OpenStreetMap or Yahoo Maps Imagery) really offers some great flexibility in the control. Plus, it’s easy to do! &lt;/p&gt;  &lt;h4&gt;Previous Tutorial/Article:&lt;strong&gt; &lt;/strong&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=ce8b5456-ef99-4311-8099-16976ebcc5e2"&gt;Using Tile Layers to Overlay Custom Map Imagery&lt;/a&gt;&amp;#160;&lt;/h4&gt;  &lt;h4&gt;Next Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=9f492f0f-8da4-4606-9f43-098074d8b9e9"&gt;Using MouseClick Event To Add &amp;quot;Pushpins&amp;quot; &lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4xU2x9PSJyHFg7KlKooCyu-M3S4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4xU2x9PSJyHFg7KlKooCyu-M3S4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4xU2x9PSJyHFg7KlKooCyu-M3S4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4xU2x9PSJyHFg7KlKooCyu-M3S4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=0y3TK1WYshc:q5b_gQnVdAE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=0y3TK1WYshc:q5b_gQnVdAE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=0y3TK1WYshc:q5b_gQnVdAE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=0y3TK1WYshc:q5b_gQnVdAE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=0y3TK1WYshc:q5b_gQnVdAE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/0y3TK1WYshc" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Overlay-OpenStreetMap2c-OpenAerialMap-and-Yahoo-Map-Imagery-using-Custom-Tile-Layers!.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Overlay-OpenStreetMap2c-OpenAerialMap-and-Yahoo-Map-Imagery-using-Custom-Tile-Layers!.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=88a585cd-f90a-40e1-963d-ca1932ce2535</guid>
      <pubDate>Fri, 20 Mar 2009 18:51:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=88a585cd-f90a-40e1-963d-ca1932ce2535</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=88a585cd-f90a-40e1-963d-ca1932ce2535</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Overlay-OpenStreetMap2c-OpenAerialMap-and-Yahoo-Map-Imagery-using-Custom-Tile-Layers!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=88a585cd-f90a-40e1-963d-ca1932ce2535</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Silverlight: Using Tile Layers to Overlay Custom Map Imagery</title>
      <description>&lt;p&gt;
One of the features that the Virtual Earth JavaScript Control has is the ability to add custom Tile Layers to overlay your own custom imagery over the map. The Virtual Earth Silverlight control also supports this feature.
&lt;/p&gt;
  
&lt;p&gt;
Before I begin to explain how to add custom Tile Layers to the Map it&amp;rsquo;s important to note that you can still use the &lt;a href="http://dev.live.com/virtualearth/mapcruncher/" target="_blank"&gt;MapCruncher&lt;/a&gt; tool to generate Map Imagery Tiles to be used with the custom Tile Layers. The specifics of using the &lt;a href="http://dev.live.com/virtualearth/mapcruncher/" target="_blank"&gt;MapCruncher&lt;/a&gt; tool to generate Map Imagery Tiles isn&amp;rsquo;t within the scope of this article. You can find a tutorial on how to use MapCruncher here: &lt;a href="http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/tutorial/version3.0docs/index.htm" title="http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/tutorial/version3.0docs/index.htm"&gt;http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/tutorial/version3.0docs/index.htm&lt;/a&gt;
&lt;/p&gt;
  
&lt;h3&gt;Add Custom Tile Layer using Code&lt;/h3&gt;  
&lt;p&gt;
&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_006_CustomTileLayer.png"&gt;&lt;img style="border-width: 0px; display: inline" src="http://pietschsoft.com/image.axd?picture=VEJS_006_CustomTileLayer_thumb.png" border="0" alt="VEJS_006_CustomTileLayer" title="VEJS_006_CustomTileLayer" width="244" height="214" align="right" /&gt;&lt;/a&gt;Once you have some custom Map Imagery Tiles generated from using MapCruncher, you can then add them using an instance of the LocationRectTileSource object and adding it to a MapTileLayer on the Map.
&lt;/p&gt;
  
&lt;p&gt;
To do this we will following the below steps:
&lt;/p&gt;
  
&lt;ol&gt;
	   
	&lt;li&gt;Create a MapTileLayer object &lt;/li&gt;    
	&lt;li&gt;Create a LocationRect object that defines the bounding rectangle for our map tile overlay &lt;/li&gt;    
	&lt;li&gt;Create a LocationRectTileSource      
	&lt;ol&gt;
		       
		&lt;li&gt;Point it to the Uri of our custom Map Imagery Tiles &lt;/li&gt;        
		&lt;li&gt;Set the Minimum and Maximum Zoom Levels (ZoomRange) that the imagery is to be visible within &lt;/li&gt;        
		&lt;li&gt;Set the Bouding Rectangle to the LocationRect object we previously created &lt;/li&gt;     
	&lt;/ol&gt;
	   &lt;/li&gt;    
	&lt;li&gt;Add the LocationRectTileSource to the MapTileLayer&amp;rsquo;s TileSources collection property &lt;/li&gt;    
	&lt;li&gt;Set the MapTileLayer&amp;rsquo;s Opacity to the desired value &lt;/li&gt;    
	&lt;li&gt;Add the MapTileLayer to the Children collection of the Map &lt;/li&gt; 
&lt;/ol&gt;
  
&lt;p&gt;
Here&amp;rsquo;s some sample code that will add a custom Tile Layer using the imagery that the JavaScript Map Controls SDK uses as an example for this same thing:
&lt;/p&gt;
  
&lt;p&gt;
// Create a Tile Layer that will display our custom Map Imagery Tiles    &lt;br /&gt;
var customTileLayer = new MapTileLayer(); 
&lt;/p&gt;
  
&lt;p&gt;
// Define the Bounding Rectangle    &lt;br /&gt;
LocationRect boundingRect = new LocationRect(     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(49, -123),&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(47, -121)     &lt;br /&gt;
); 
&lt;/p&gt;
  
&lt;p&gt;
// Create a LocationRectTileSource    &lt;br /&gt;
LocationRectTileSource customTileSource = new LocationRectTileSource(); 
&lt;/p&gt;
  
&lt;p&gt;
// Set the Uri for the custom Map Imagery Tiles    &lt;br /&gt;
customTileSource.UriFormat = &amp;quot;http://dev.live.com/virtualearth/sdk/layers/lidar/{0}.png&amp;quot;;
&lt;/p&gt;
  
&lt;p&gt;
// Set the Min and Max Zoom Levels that the imagery is to be visible within    &lt;br /&gt;
customTileSource.ZoomRange = new Range&amp;lt;double&amp;gt;(10, 18); 
&lt;/p&gt;
  
&lt;p&gt;
// The bounding rectangle area that the tile overaly is valid in.    &lt;br /&gt;
customTileSource.BoundingRectangle = boundingRect; 
&lt;/p&gt;
  
&lt;p&gt;
// Add the Tile Source to the Tile Layer    &lt;br /&gt;
customTileLayer.TileSources.Add(customTileSource); 
&lt;/p&gt;
  
&lt;p&gt;
// Set the Tile Layer Opacity to a desired value    &lt;br /&gt;
customTileLayer.Opacity = 0.7; 
&lt;/p&gt;
  
&lt;p&gt;
Map1.Children.Add(customTileLayer);
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h3&gt;Hide Virtual Earth Imagery From Being Displayed&lt;/h3&gt;  
&lt;p&gt;
Sometimes you may want to hide the Virtual Earth Imagery from being displayed altogether. To do this all you need to do is set the Map&amp;rsquo;s Mode property to a new instance of the MercatorMode object. Doing this allows you to show only your custom map imagery.
&lt;/p&gt;
  
&lt;h4&gt;Using XAML:&lt;/h4&gt;  
&lt;p&gt;
&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mc=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl.Core;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&amp;quot;800&amp;quot; Height=&amp;quot;600&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map Name=&amp;quot;Map1&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map.Mode&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mc:MercatorMode&amp;gt;&amp;lt;/mc:MercatorMode&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map.Mode&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;
&amp;lt;/UserControl&amp;gt;
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h4&gt;Using Code:&lt;/h4&gt;  
&lt;p&gt;
Map1.Mode = new Microsoft.VirtualEarth.MapControl.Core.MercatorMode();
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h4&gt;A little more intuitively&lt;/h4&gt;  
&lt;p&gt;
Alternatively, you can also create your own EmptyMapMode object that inherits from the MercatorMode object. This way your code will be a little more intuitive to read.
&lt;/p&gt;
  
&lt;p&gt;
Here&amp;rsquo;s example of doing this:
&lt;/p&gt;
  
&lt;p&gt;
&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:local=&amp;quot;clr-namespace:VirtualEarthSilverlightApplication1&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&amp;quot;800&amp;quot; Height=&amp;quot;600&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map Name=&amp;quot;Map1&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map.Mode&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;local:EmptyMapMode&amp;gt;&amp;lt;/local:EmptyMapMode&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map.Mode&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;
&amp;lt;/UserControl&amp;gt;
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;p&gt;
As you notice above, since our custom EmptyMapMode object is contained within the &amp;ldquo;VirtualEarthSilverlightApplication1&amp;rdquo; namespace, we need to add that namespace to the XAML file in order to use it.
&lt;/p&gt;
  
&lt;p&gt;
And, here&amp;rsquo;s the EmptyMapMode object shown in use above:
&lt;/p&gt;
  
&lt;p&gt;
public class EmptyMapMode :Microsoft.VirtualEarth.MapControl.Core.MercatorMode    &lt;br /&gt;
{     &lt;br /&gt;
}
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h3&gt;Conclusion&lt;/h3&gt;  
&lt;p&gt;
If you are familiar with the JavaScript Map Control you can see that it&amp;rsquo;s pretty much just as simple to overly your own custom map imagery tiles on the map. One thing to note is that the LocationRectTileSource inherits from the TileSource object; so presumably you could inherit from the TileSource object yourself to create write code that pulls in map imagery from any source using your own custom TileSource object.
&lt;/p&gt;
&lt;h4&gt;Next Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=88a585cd-f90a-40e1-963d-ca1932ce2535"&gt;Overlay OpenStreetMap, OpenAerialMap and Yahoo Maps Imagery using Custom Tile Layers!&lt;/a&gt;&lt;/h4&gt;
&lt;h4&gt;Previous Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63"&gt;Adding Media (Images, Video, etc.) to the Map&lt;/a&gt; &lt;br /&gt;
&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8QZyIa1dSs-jOqtxSV7OwVlXPgU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8QZyIa1dSs-jOqtxSV7OwVlXPgU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8QZyIa1dSs-jOqtxSV7OwVlXPgU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8QZyIa1dSs-jOqtxSV7OwVlXPgU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Lh9o826oxd0:RaUF9si4t1I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Lh9o826oxd0:RaUF9si4t1I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=Lh9o826oxd0:RaUF9si4t1I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Lh9o826oxd0:RaUF9si4t1I:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=Lh9o826oxd0:RaUF9si4t1I:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/Lh9o826oxd0" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Using-Tile-Layers-to-Overlay-Custom-Map-Imagery.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Using-Tile-Layers-to-Overlay-Custom-Map-Imagery.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=ce8b5456-ef99-4311-8099-16976ebcc5e2</guid>
      <pubDate>Fri, 20 Mar 2009 18:47:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=ce8b5456-ef99-4311-8099-16976ebcc5e2</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=ce8b5456-ef99-4311-8099-16976ebcc5e2</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Using-Tile-Layers-to-Overlay-Custom-Map-Imagery.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=ce8b5456-ef99-4311-8099-16976ebcc5e2</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Silverlight: Adding Media (Images, Video, etc.) to the Map</title>
      <description>&lt;p&gt;
In the previous tutorial (&amp;ldquo;&lt;a href="http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c" target="_blank"&gt;Basics of Adding Polygons and Polylines using XAML and Code&lt;/a&gt;&amp;rdquo;) I mentioned that there is no Pushpin Shape Type in the new Virtual Earth Silverlight Map Control SDK CTP. Instead, the Silverlight control has the flexibility of plotting/displaying anything (as long as it inherits from UIElement) you want at a specific Latitude/Longitude Coordinate. This opens up a ton of UI options that can be built to allow the user to interact with the data being displayed.
&lt;/p&gt;
&lt;p&gt;
One thing to keep in mind when adding Images, Video and any other UIElements to the Map is that you&amp;rsquo;ll need to add them to a MapLayer, then add the MapLayer to the Map. This is required so that you can specify the Location to Plot the UIElement at. This is something that you&amp;rsquo;ll probably want to do anyway so you can easily control the layering of the elements that are plotted, or even easily show/hide groups of elements (by having a seperate MapLayer contain the elements for each specific group.)
&lt;/p&gt;
&lt;p&gt;
Let&amp;rsquo;s start plotting some cool stuff on a Map.
&lt;/p&gt;
&lt;h3&gt;Adding Images to the Map (aka &amp;ldquo;Pushpins&amp;rdquo;)&lt;/h3&gt;
&lt;p&gt;
When adding Images to the Map, the process is very similar to adding Polygons or Polylines, except you need to add Images to a MapLayer first, then add the MapLayer to the Map.
&lt;/p&gt;
&lt;p&gt;
The closest thing with the Silverlight Map Control to the &amp;ldquo;Pushpins&amp;rdquo; of the old JavaScript control is the ability to directly plot Images on the Map.
&lt;/p&gt;
&lt;p&gt;
// Create MapLayer &lt;br /&gt;
MapLayer myLayer = new MapLayer(); 
&lt;/p&gt;
&lt;p&gt;
// Create Image &lt;br /&gt;
Image image = new Image(); &lt;br /&gt;
// Set the Image Source &lt;br /&gt;
image.Source = new BitmapImage(new Uri(&amp;quot;pushpinImage.png&amp;quot;, UriKind.Relative)); 
&lt;/p&gt;
&lt;p&gt;
// Set Image Display Properties &lt;br /&gt;
image.Opacity = 0.8; &lt;br /&gt;
image.Stretch = Stretch.None; 
&lt;/p&gt;
&lt;p&gt;
// Create a Location object that defines where the &amp;quot;Shape&amp;quot; will be plotted &lt;br /&gt;
Location location = new Location() { Latitude = -10, Longitude = 10 }; 
&lt;/p&gt;
&lt;p&gt;
// Center the image around the location specified &lt;br /&gt;
PositionMethod position = PositionMethod.Center; 
&lt;/p&gt;
&lt;p&gt;
// Add Image to the Layer &lt;br /&gt;
myLayer.AddChild(image, location, position); 
&lt;/p&gt;
&lt;p&gt;
// Add Layer to the Map &lt;br /&gt;
Map1.AddChild(myLayer);
&lt;/p&gt;
&lt;h3&gt;Adding Video to the Map&lt;/h3&gt;
&lt;p&gt;
Plotting Video content on the Map is a good example of what some of the possibilities are opening up with this new Virtual Earth Silverlight Map Control. To do this all you need to do is create a MediaElement with its Source set to the Uri of a Video and add it to the Map in the same way as shown above with adding Images to the Map.
&lt;/p&gt;
&lt;p&gt;
// Create MapLayer &lt;br /&gt;
MapLayer myLayer = new MapLayer(); 
&lt;/p&gt;
&lt;p&gt;
// Create MediaElement &lt;br /&gt;
MediaElement video = new MediaElement(); 
&lt;/p&gt;
&lt;p&gt;
// Set the MediaElement Source to the Video &lt;br /&gt;
video.Source = new Uri(&amp;quot;http://mschnlnine.vo.llnwd.net/d1/ch9/8/9/1/1/6/4/ScottGuthrieSL3_ch9.wmv&amp;quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UriKind.RelativeOrAbsolute); 
&lt;/p&gt;
&lt;p&gt;
// Set MediaElement Display Properties &lt;br /&gt;
video.Opacity = 0.8; &lt;br /&gt;
video.Width = 200; &lt;br /&gt;
video.Height = 150; 
&lt;/p&gt;
&lt;p&gt;
// Create a Location object that defines where the &amp;quot;Shape&amp;quot; will be plotted &lt;br /&gt;
Location location = new Location() { Latitude = -10, Longitude = 10 }; 
&lt;/p&gt;
&lt;p&gt;
// Center the image around the location specified &lt;br /&gt;
PositionMethod position = PositionMethod.Center; 
&lt;/p&gt;
&lt;p&gt;
// Add Image to the Layer &lt;br /&gt;
myLayer.AddChild(video, location, position); 
&lt;/p&gt;
&lt;p&gt;
// Add Layer to the Map &lt;br /&gt;
Map1.AddChild(myLayer);
&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;
You can add any visual control/object that derives from UIElement to the Map using the same method described above with Images and Video. This really opens up the possibilities to plot/add any kind of Rich Content to the Map. The possibilities are almost endless.
&lt;/p&gt;
&lt;h4&gt;Next Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=ce8b5456-ef99-4311-8099-16976ebcc5e2"&gt;Using Tile Layers to Overlay Custom Map Imagery&lt;/a&gt;&lt;br /&gt;
&lt;/h4&gt;
&lt;h4&gt;Previous Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c"&gt;Basics of Adding Polygons and Polylines using XAML and Code&lt;/a&gt; &lt;br /&gt;
&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RW0VI3N64K8me8S00nWWeWx-Q9U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RW0VI3N64K8me8S00nWWeWx-Q9U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RW0VI3N64K8me8S00nWWeWx-Q9U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RW0VI3N64K8me8S00nWWeWx-Q9U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Oj6_MUGzOD0:fpGMjvW4Y1I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Oj6_MUGzOD0:fpGMjvW4Y1I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=Oj6_MUGzOD0:fpGMjvW4Y1I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Oj6_MUGzOD0:fpGMjvW4Y1I:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=Oj6_MUGzOD0:fpGMjvW4Y1I:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/Oj6_MUGzOD0" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Adding-Media-(Images2c-Video2c-etc)-to-the-Map.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Adding-Media-(Images2c-Video2c-etc)-to-the-Map.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63</guid>
      <pubDate>Fri, 20 Mar 2009 18:43:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=2c25c9bc-e290-41e4-9a03-daa75a912c63</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Adding-Media-(Images2c-Video2c-etc)-to-the-Map.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=2c25c9bc-e290-41e4-9a03-daa75a912c63</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Silverlight: Basics of Adding Polygons and Polylines using XAML and Code</title>
      <description>&lt;p&gt;
Now that we&amp;rsquo;re familiar with the basics of the Virtual Earth Silverlight Map Control SDK CTP (from my &lt;a href="http://pietschsoft.com/post.aspx?id=20736f64-9876-4d0f-b60e-3fe20252d4c4" target="_blank"&gt;Getting Started with Virtual Earth Silverlight CTP&lt;/a&gt; tutorial), we&amp;rsquo;re ready to move on to adding Shapes (Polygons and Polylines). After all what use is a Virtual Earth Map Control without plotting some data on it. If you&amp;rsquo;re not familiar with how to get a Map displayed within a Silverlight Application, I really encourage you to go take a look at my &amp;ldquo;Getting Started with Virtual Earth Silverlight Map Control SDK CTP&amp;rdquo; tutorial.
&lt;/p&gt;
  
&lt;p&gt;
Did you notice that I left out Pushpins? Well, this is actually because the Map control doesn&amp;rsquo;t have a Pushpin Shape Type; the only Shapes Types are Polygon and Polyline. The reason for this is because instead of limiting you to just Pushpins (a small icon of some sort) like the JavaScript Map Control; the Silverlight Control allows you to plot/display anything (as long as it inherits from UIElement) you want at a specific Latitude/Longitude Coordinate. Since, &amp;ldquo;Pushpins&amp;rdquo; are a newly changed concept with the Silverlight Map Control; I&amp;rsquo;ll be covering that is a separate tutorial that covers &amp;ldquo;Adding Media (Images, Video, etc.) to the Map&amp;rdquo;.
&lt;/p&gt;
  
&lt;p&gt;
Now let&amp;rsquo;s get to plotting some Polygons and Polylines!
&lt;/p&gt;
  
&lt;h3&gt;Adding Polygons to the Map&lt;/h3&gt;  
&lt;p&gt;
To add a Polygon to the Map, you will need to create an instance of the MapPolygon object and add a collection of Location objects to its &amp;ldquo;Locations&amp;rdquo; property. You will also need to define the look of your Polygon by setting its &amp;ldquo;Fill&amp;rdquo;, &amp;ldquo;Stroke&amp;rdquo;, &amp;ldquo;StrokeThickness&amp;rdquo; and &amp;ldquo;Opacity&amp;rdquo; properties.
&lt;/p&gt;
  
&lt;p&gt;
The MapPolygon properties and what they do:
&lt;/p&gt;
  
&lt;ul&gt;
	   
	&lt;li&gt;&lt;strong&gt;Fill&lt;/strong&gt; &amp;ndash; A Brush object that defines how the inside of the Polygon is filled in. &lt;/li&gt;    
	&lt;li&gt;&lt;strong&gt;Stroke&lt;/strong&gt; &amp;ndash; A Brush object that defines how the border that outlines the Polygon will be drawn. &lt;/li&gt;    
	&lt;li&gt;&lt;strong&gt;StrokeThickness&lt;/strong&gt; &amp;ndash; A Double value that defines the thickness of the border that outlines the Polygon. &lt;/li&gt;    
	&lt;li&gt;&lt;strong&gt;Opacity&lt;/strong&gt; &amp;ndash; A Double value that defines the Opacity (or Transparency) of the Polygon. &lt;/li&gt; 
&lt;/ul&gt;
  
&lt;p&gt;
When adding Polygons to the Map you add your MapPolygon object instance to the Map.Children collection.
&lt;/p&gt;
  
&lt;h4&gt;Add a Polygon Programmatically using Code&lt;/h4&gt;  
&lt;p&gt;
Here&amp;rsquo;s an example of adding a Polygon to a Map programmatically:
&lt;/p&gt;
  
&lt;p&gt;
MapPolygon polygon = new MapPolygon();    &lt;br /&gt;
polygon.Fill = new SolidColorBrush(Colors.Red);     &lt;br /&gt;
polygon.Stroke = new SolidColorBrush(Colors.Yellow);     &lt;br /&gt;
polygon.StrokeThickness = 5;     &lt;br /&gt;
polygon.Opacity = 0.7;     &lt;br /&gt;
polygon.Locations = new LocationCollection()     &lt;br /&gt;
{     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(20, -20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(20, 20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-20, 20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-20, -20)     &lt;br /&gt;
}; 
&lt;/p&gt;
  
&lt;p&gt;
Map1.AddChild(polygon);    &lt;br /&gt;
// Map1.Children.Add(polygon); // &amp;lt;&amp;mdash;This also works just the same
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h4&gt;Add a Polygon Declaratively using XAML&lt;/h4&gt;  
&lt;p&gt;
One other neat thing that you can do is add Polygons to a Map declaratively using XAML. Here&amp;rsquo;s an example:
&lt;/p&gt;
  
&lt;p&gt;
&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&amp;quot;400&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map Name=&amp;quot;Map1&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map.Children&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:MapPolygon Fill=&amp;quot;Red&amp;quot; Stroke=&amp;quot;Yellow&amp;quot; StrokeThickness=&amp;quot;5&amp;quot; Opacity=&amp;quot;0.7&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:MapPolygon.Locations&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:LocationCollection&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;20, -20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;20, 20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;-20, 20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;-20, -20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:LocationCollection&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:MapPolygon.Locations&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:MapPolygon&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map.Children&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;
&amp;lt;/UserControl&amp;gt;
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h3&gt;Adding Polylines to the Map&lt;/h3&gt;  
&lt;p&gt;
To add a Polyline to the Map, you will need to create an instance of the MapPolyline object and add a collection of Location objects to its &amp;ldquo;Locations&amp;rdquo; property. You will also need to define the look of your Polyline by setting its &amp;ldquo;Stroke&amp;rdquo;, &amp;ldquo;StrokeThickness&amp;rdquo; and &amp;ldquo;Opacity&amp;rdquo; properties.
&lt;/p&gt;
  
&lt;p&gt;
The MapPolyline properties and what they do:
&lt;/p&gt;
  
&lt;ul&gt;
	   
	&lt;li&gt;&lt;strong&gt;Stroke&lt;/strong&gt; &amp;ndash; A Brush object that defines how the Line that represents the Polyline will be drawn on the Map. &lt;/li&gt;    
	&lt;li&gt;&lt;strong&gt;StrokeThickness&lt;/strong&gt; &amp;ndash; A Double value that defines the thickness of the Line. &lt;/li&gt;    
	&lt;li&gt;&lt;strong&gt;Opacity&lt;/strong&gt; &amp;ndash; A Double value that defines the Opacity (or Transparency) of the Polyline. &lt;/li&gt; 
&lt;/ul&gt;
  
&lt;p&gt;
Additionally, the MapPolyline object has one more property that I didn&amp;rsquo;t mention above. This is a little bit of a special property, that you may wonder why a Polyline object has it, but it opens up some possibilities that weren&amp;rsquo;t available before using the JavaScript Map Control.
&lt;/p&gt;
  
&lt;ul&gt;
	   
	&lt;li&gt;&lt;strong&gt;Fill&lt;/strong&gt; - A Brush object that defines how the inside of the Polyline is filled in. This will connect the first and last Location point of the Polyline and Fill in between using the designated Brush. This doesn&amp;rsquo;t draw a Line (or Stroke) from the first Location to the last, it just fills in between the Shape. &lt;/li&gt; 
&lt;/ul&gt;
  
&lt;p&gt;
When adding Polylines to the Map you add your MapPolyline object instance to the Map.Children collection; just the same as is done with Polygons.
&lt;/p&gt;
  
&lt;h4&gt;Add a Polyline Programmatically using Code&lt;/h4&gt;  
&lt;p&gt;
Here&amp;rsquo;s an example of adding a Polyline to a Map programmatically:
&lt;/p&gt;
  
&lt;p&gt;
MapPolyline polyline = new MapPolyline();    &lt;br /&gt;
polyline.Stroke = new SolidColorBrush(Colors.Yellow);     &lt;br /&gt;
polyline.StrokeThickness = 5;     &lt;br /&gt;
polyline.Opacity = 0.7;     &lt;br /&gt;
polyline.Locations = new LocationCollection()     &lt;br /&gt;
{     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(10, -10),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(10, 10),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-10, -10),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-10, 10)     &lt;br /&gt;
}; 
&lt;/p&gt;
  
&lt;p&gt;
Map1.AddChild(polyline);    &lt;br /&gt;
// Map1.Children.Add(polyline); // &amp;lt;&amp;mdash;This also works just the same
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h4&gt;Add a Polyline Declaratively using XAML&lt;/h4&gt;  
&lt;p&gt;
One other neat thing that you can do is add Polylines to a Map declaratively using XAML. Here&amp;rsquo;s an example:
&lt;/p&gt;
  
&lt;p&gt;
&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&amp;quot;400&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map Name=&amp;quot;Map1&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map.Children&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:MapPolyline Stroke=&amp;quot;Yellow&amp;quot; StrokeThickness=&amp;quot;5&amp;quot; Opacity=&amp;quot;0.7&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:MapPolyline.Locations&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:LocationCollection&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;10, -10&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;10, 10&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;-10, -10&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;-10, 10&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:LocationCollection&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:MapPolyline.Locations&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:MapPolyline&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map.Children&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;
&amp;lt;/UserControl&amp;gt;
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h3&gt;Adding Shape Layers&lt;/h3&gt;  
&lt;p&gt;
In the old JavaScript Map Control, you could add your Shapes to different Shape Layers, then you could easily hide/show the Shapes in each Layer by hiding/showing the entire Shape Layer. This is also possible using the Virtual Earth Silverlight Map Control via the MapLayer object.
&lt;/p&gt;
  
&lt;p&gt;
To use the MapLayer object you simply create a new MapLayer, add your Shapes (Polygons or Polylines) to it, then add the MapLayer to the Map.
&lt;/p&gt;
  
&lt;p&gt;
Here&amp;rsquo;s an example of doing this:
&lt;/p&gt;
  
&lt;p&gt;
// Create MapLayer    &lt;br /&gt;
MapLayer myShapeLayer = new MapLayer(); 
&lt;/p&gt;
  
&lt;p&gt;
// Create Polygon    &lt;br /&gt;
MapPolygon polygon = new MapPolygon();     &lt;br /&gt;
polygon.Fill = new SolidColorBrush(Colors.Red);     &lt;br /&gt;
polygon.Stroke = new SolidColorBrush(Colors.Yellow);     &lt;br /&gt;
polygon.StrokeThickness = 5;     &lt;br /&gt;
polygon.Opacity = 0.7;     &lt;br /&gt;
polygon.Locations = new LocationCollection()     &lt;br /&gt;
{     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(20, -20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(20, 20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-20, 20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-20, -20)     &lt;br /&gt;
}; 
&lt;/p&gt;
  
&lt;p&gt;
// Add Polygon to the Layer    &lt;br /&gt;
myShapeLayer.AddChild(polygon); 
&lt;/p&gt;
  
&lt;p&gt;
// Add the Layer to the Map    &lt;br /&gt;
Map1.AddChild(myShapeLayer); 
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h3&gt;Easily Add a &amp;ldquo;Hover Over&amp;rdquo; Effect Via Tooltips&lt;/h3&gt;  
&lt;p&gt;
If you want to quickly and easily add some content that gets displayed when the user hovers the mouse over the Polygon or Polyline; you can implement it very easily by taking advantage of Silverlights Tooltip feature.
&lt;/p&gt;
  
&lt;p&gt;
&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_PolygonShapeTooltip.png"&gt;&lt;img style="border-width: 0px; display: inline" src="http://pietschsoft.com/image.axd?picture=VEJS_PolygonShapeTooltip_thumb.png" border="0" alt="VEJS_PolygonShapeTooltip" title="VEJS_PolygonShapeTooltip" width="489" height="304" /&gt;&lt;/a&gt; 
&lt;/p&gt;
  
&lt;p&gt;
Here are some code examples of doing this that add to the above Polygon examples (the exact same can be done with Polylines).
&lt;/p&gt;
  
&lt;h4&gt;Add Tooltip Declaratively using XAML&lt;/h4&gt;  
&lt;p&gt;
&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&amp;quot;400&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map Name=&amp;quot;Map1&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Map.Children&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:MapPolygon Fill=&amp;quot;Red&amp;quot; Stroke=&amp;quot;Yellow&amp;quot; StrokeThickness=&amp;quot;5&amp;quot; Opacity=&amp;quot;0.7&amp;quot;&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ToolTipService.ToolTip&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock FontWeight=&amp;quot;Bold&amp;quot;&amp;gt;A Huge Square Title&amp;lt;/TextBlock&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock&amp;gt;This is an arbitrary description of the &amp;quot;Huge Square&amp;quot; to be displayed within the Tooltip.&amp;lt;/TextBlock&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/StackPanel&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ToolTipService.ToolTip&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:MapPolygon.Locations&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:LocationCollection&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;20, -20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;20, 20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;-20, 20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:Location&amp;gt;-20, -20&amp;lt;/m:Location&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:LocationCollection&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:MapPolygon.Locations&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:MapPolygon&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map.Children&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:Map&amp;gt;     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;
&amp;lt;/UserControl&amp;gt;
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h4&gt;Add Tooltip Programmatically using Code&lt;/h4&gt;  
&lt;p&gt;
// Declare Polygon    &lt;br /&gt;
MapPolygon polygon = new MapPolygon();     &lt;br /&gt;
polygon.Fill = new SolidColorBrush(Colors.Red);     &lt;br /&gt;
polygon.Stroke = new SolidColorBrush(Colors.Yellow);     &lt;br /&gt;
polygon.StrokeThickness = 5;     &lt;br /&gt;
polygon.Opacity = 0.7;     &lt;br /&gt;
polygon.Locations = new LocationCollection()     &lt;br /&gt;
{     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(20, -20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(20, 20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-20, 20),     &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; new Location(-20, -20)     &lt;br /&gt;
}; 
&lt;/p&gt;
  
&lt;p&gt;
// Add Tooltip    &lt;br /&gt;
var tooltipObject = new StackPanel(); 
&lt;/p&gt;
  
&lt;p&gt;
var title = new TextBlock();    &lt;br /&gt;
title.FontWeight = FontWeights.Bold;     &lt;br /&gt;
title.Text = &amp;quot;A Huge Square Title&amp;quot;;     &lt;br /&gt;
tooltipObject.Children.Add(title); 
&lt;/p&gt;
  
&lt;p&gt;
var description = new TextBlock();    &lt;br /&gt;
description.Text = &amp;quot;This is an arbitrary description of the \&amp;quot;Huge Square\&amp;quot; to be displayed within the Tooltip.&amp;quot;;     &lt;br /&gt;
tooltipObject.Children.Add(description); 
&lt;/p&gt;
  
&lt;p&gt;
ToolTipService.SetToolTip(polygon, tooltipObject); 
&lt;/p&gt;
  
&lt;p&gt;
// Add Polygon to Map    &lt;br /&gt;
Map1.AddChild(polygon);     &lt;br /&gt;
// Map1.Children.Add(polygon); // &amp;lt;&amp;mdash;This also works just the same
&lt;/p&gt;
  
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
  
&lt;h3&gt;Conclusion&lt;/h3&gt;  
&lt;p&gt;
As you can see, it&amp;rsquo;s fairly simple to add Polygons and Polylines to the Map. In the next tutorial I&amp;rsquo;ll cover how to add Image (also &amp;ldquo;Pushpins&amp;rdquo;) and Video to the Map.
&lt;/p&gt;
&lt;h4&gt;Next Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63"&gt;Adding Media (Images, Video, etc.) to the Map&lt;/a&gt;&lt;/h4&gt;
&lt;h4&gt;Previous Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=20736f64-9876-4d0f-b60e-3fe20252d4c4"&gt;Getting Started with Virtual Earth Silverlight Map Control SDK CTP&lt;/a&gt;&lt;br /&gt;
&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-xUfmUGsJmxoa9o69wA02_NbSBs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-xUfmUGsJmxoa9o69wA02_NbSBs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-xUfmUGsJmxoa9o69wA02_NbSBs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-xUfmUGsJmxoa9o69wA02_NbSBs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=ninNVwxx5C8:PJuzGUpVE80:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=ninNVwxx5C8:PJuzGUpVE80:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=ninNVwxx5C8:PJuzGUpVE80:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=ninNVwxx5C8:PJuzGUpVE80:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=ninNVwxx5C8:PJuzGUpVE80:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/ninNVwxx5C8" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Basics-of-Adding-Polygons-and-Polylines-using-XAML-and-Code.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Basics-of-Adding-Polygons-and-Polylines-using-XAML-and-Code.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c</guid>
      <pubDate>Fri, 20 Mar 2009 18:40:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=6a098f41-2df4-4362-a577-606863de838c</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/20/Virtual-Earth-Silverlight-Basics-of-Adding-Polygons-and-Polylines-using-XAML-and-Code.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=6a098f41-2df4-4362-a577-606863de838c</wfw:commentRss>
    </item>
    <item>
      <title>Getting Started with Virtual Earth Silverlight Map Control SDK CTP</title>
      <description>&lt;p&gt;It seems like forever since MIX’08 when a demo was shown of a new Silverlight-based Virtual Earth Map Control. Well, now FINALLY we actually have a version of the control to “play” around with. The reason I say “play” is because it’s still a CTP (Community Technology Preview). If you read the license file you’ll see that basically the most important points of Microsoft’s position on CTP’s are: 1) You can NOT use it in a production environment, and 2) It’s a Preview, so anything can change from now until the next release (CTP, Beta, whatever). Well, anyway… &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I introduce you to the Virtual Earth Silverlight Map Control SDK CTP!&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;Before I dig into what’s needed to begin development, and show you how simple it is to use; here’s a few highlights of what’s so Awesome about the control. &lt;/p&gt;  &lt;h3&gt;Why is the Virtual Earth Silverlight Map Control so Awesome?!?&lt;/h3&gt;  &lt;p&gt;Here’s a few reason: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Silverlight!&lt;/strong&gt; – Silverlight itself is truly a high point with this new control. You can now Plot/Overlay Rich Media Content (Images, Video, and any Silverlight/XAML content you can think of!) over the Map! &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Performance!&lt;/strong&gt; – If you’ve used the Virtual Earth JavaScript Map Control, then you must be familiar with the fact that the Map really starts to slow down when you try to plot something around 300+ Pushpins or a hand full of Polygons with 1000+ points each. With the new Silverlight control you can literally plot THOUSANDS of Pushpins on the Map and you wont render it useless like you would with the previous JavaScript control. Your limit is really only based on the Client Computer that is running the application, and I expect that it’ll probably improve a bit with Silverlight 3’s ability to utilize the local GPU. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;No More JavaScript or Browser Inconsistencies! – &lt;/strong&gt;You no longer need to worry or hassle yourself with JavaScript and making sure it runs/works as expected in all the different web browsers (Internet Explorer, Firefox, Safari, etc.) No you can manipulate the map using pure .NET code. Don’t fret if you need to integrate with existing JavaScript code; you can always use Silverlight’s HTML Bridge to interact back and forth as needed. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Virtual Earth!&lt;/strong&gt; – And, last but not least, we can not forget that part of the Vast Awesomeness of this control is just due to the fact that it’s Virtual Earth Mapping!! &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;What’s Needed to Get Started?&lt;/h3&gt;  &lt;p&gt;Firstly, Download the &lt;a href="http://connect.microsoft.com/silverlightmapcontrolctp" target="_blank"&gt;Virtual Earth Silverlight Map Control SDK CTP from Microsoft Connect&lt;/a&gt;: &lt;a title="http://connect.microsoft.com/silverlightmapcontrolctp" href="http://connect.microsoft.com/silverlightmapcontrolctp"&gt;http://connect.microsoft.com/silverlightmapcontrolctp&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strike&gt;&lt;em&gt;Note: At the time of posting this (3/20/2009 6:26PM CST) the CTP Download is currently down. You can still go to the Microsoft Connect website and Register, then you’ll be able to download the bits when they’re back up.&lt;/em&gt;&lt;/strike&gt; The download issue has been fixed. &lt;/p&gt;  &lt;p&gt;There is also a &lt;a href="https://sharepoint.connect.microsoft.com/silverlightmapcontrolctp/iSDK/default.htm" target="_blank"&gt;Virtual Earth Silverlight Map Control CTP Interactive SDK&lt;/a&gt; (in the same style of the Virtual Earth JavaScript control) here: &lt;a title="https://sharepoint.connect.microsoft.com/silverlightmapcontrolctp/iSDK/default.htm" href="https://sharepoint.connect.microsoft.com/silverlightmapcontrolctp/iSDK/default.htm"&gt;https://sharepoint.connect.microsoft.com/silverlightmapcontrolctp/iSDK/default.htm&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Secondly, you’ll need a couple Tools installed first: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;amp;displaylang=en" target="_blank"&gt;Visual Studio 2008 SP1&lt;/a&gt;&amp;#160;&lt;strong&gt;–or-&lt;/strong&gt; &lt;a href="http://go.microsoft.com/?linkid=7653519" target="_blank"&gt;Visual Web Developer 2008 Express with SP1&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&amp;amp;displaylang=en" target="_blank"&gt;Silverlight Tools for Visual Studio 2008 SP1&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Of course you’ll also need to at least be familiar with the basics of Silverlight development. I’m referring to XAML for the most part, so if your familiar with WPF that should be enough to get you started. &lt;/p&gt;  &lt;p&gt;For those Virtual Earth developers new to Silverlight; If you need help getting started with learning the basics of Silverlight development, here are some resources that will help: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://silverlight.net/getstarted/" target="_blank"&gt;Get Started Building Silverlight Applications at http://silverlight.net&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://silverlight.net/Learn/" target="_blank"&gt;Silverlight Learning Resources at http://silverlight.net&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Let’s Display a Map in Silverlight&lt;/h3&gt;  &lt;h5&gt;Create a New Silverlight Application Project&lt;/h5&gt;  &lt;ol&gt;   &lt;li&gt;Run Visual Studio 2008 and create a New Project using the &lt;strong&gt;Silverlight Application&lt;/strong&gt; template.       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=CreateSilverlightApplicationProject.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CreateSilverlightApplicationProject" border="0" alt="CreateSilverlightApplicationProject" src="http://pietschsoft.com/image.axd?picture=CreateSilverlightApplicationProject_thumb.png" width="706" height="486" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;In the “Add Silverlight Application” dialog box, select the “&lt;strong&gt;Add a new ASP.NET Web project to the solution to host Silverlight&lt;/strong&gt;” option and click “OK”. You must select this option to create an ASP.NET Web Application Project or ASP.NET Website because the &lt;a href="http://msdn.microsoft.com/en-us/library/cc189008(VS.95).aspx" target="_blank"&gt;URL Access Restrictions in Silverlight&lt;/a&gt; require the page that hosts the Map control to be hosted using HTTP in order to load/access the Virtual Earth Map Tiles.       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=AddNewASP.NETWebProject.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AddNewASP.NETWebProject" border="0" alt="AddNewASP.NETWebProject" src="http://pietschsoft.com/image.axd?picture=AddNewASP.NETWebProject_thumb.png" width="457" height="409" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;h4&gt;Add a Reference to Microsoft.VirtualEarth.MapControl.dll&lt;/h4&gt;  &lt;ol&gt;   &lt;li&gt;Go to the “&lt;strong&gt;Solution Explorer&lt;/strong&gt;” and Right-Click “&lt;strong&gt;References&lt;/strong&gt;” in the Silverlight Project (not the ASP.NET Web Application Project), and Select “&lt;strong&gt;Add Reference…&lt;/strong&gt;”       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_003_AddReferenceToMapControlDLL.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_003_AddReferenceToMapControlDLL" border="0" alt="VEJS_003_AddReferenceToMapControlDLL" src="http://pietschsoft.com/image.axd?picture=VEJS_003_AddReferenceToMapControlDLL_thumb.png" width="365" height="354" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Within the “Add Reference” Dialog, Select the “&lt;strong&gt;Browse&lt;/strong&gt;” tab and navigate to the folder where the SDK is installed, and select the “&lt;strong&gt;Microsoft.VirtualEarth.MapControl.dll&lt;/strong&gt;”.       &lt;br /&gt;      &lt;br /&gt;&lt;em&gt;Note: By Default the SDK is installed in this folder “C:\Program Files (x86)\Microsoft Virtual Earth Silverlight Map Control\CTP\Libraries”        &lt;br /&gt;        &lt;br /&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_004_AddReferenceToMapControlDLL_SelectDLLFile.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_004_AddReferenceToMapControlDLL_SelectDLLFile" border="0" alt="VEJS_004_AddReferenceToMapControlDLL_SelectDLLFile" src="http://pietschsoft.com/image.axd?picture=VEJS_004_AddReferenceToMapControlDLL_SelectDLLFile_thumb.png" width="735" height="450" /&gt;&lt;/a&gt; &lt;/em&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h4&gt;Display a Virtual Earth Map&lt;/h4&gt;  &lt;ol&gt;   &lt;li&gt;Add a Namespace declaration to to Page.xaml for the Microsoft.VirtualEarth.MapControl namespace.      &lt;br /&gt;To do this add the following to the &amp;lt;UserControl&amp;gt; tag:       &lt;br /&gt;&lt;em&gt;xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;        &lt;br /&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Add the Map Control to Page by adding the following tag within the Grid in the Page:      &lt;br /&gt;&lt;em&gt;&amp;lt;m:Map&amp;gt;&amp;lt;/m:Map&amp;gt;&lt;/em&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The resulting Page.xaml will look like this: &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;400&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map&amp;gt;&amp;lt;/m:Map&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;&amp;lt;/UserControl&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Now, when you run the application (press F5) you will see a fully interactive Virtual Earth Map displayed: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_005_SimpleMapDisplayed.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_005_SimpleMapDisplayed" border="0" alt="VEJS_005_SimpleMapDisplayed" src="http://pietschsoft.com/image.axd?picture=VEJS_005_SimpleMapDisplayed_thumb.png" width="489" height="304" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Change/Set Map Properties Declaratively using XAML and Programatically using C#&lt;/h3&gt;  &lt;p&gt;You can change/set the Map Control’s properties Declaratively using XAML and Programatically using C# (or any other .NET language). &lt;/p&gt;  &lt;p&gt;Below are examples using XAML and C#. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;XAML:&lt;/strong&gt; You can change the Map Mode declaratively using XAML by just setting the “Mode” property. For Example, setting it to “Aerial” will change the Map Mode to AerialMapMode. &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;400&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Mode=&amp;quot;Aerial&amp;quot;&amp;gt;&amp;lt;/m:Map&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;&amp;lt;/UserControl&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;C#:&lt;/strong&gt; You can also change the Map Mode just as easily programatically using C#. Here’s the same example of setting the Map Mode to AerialMapMode within the Page constructor: &lt;/p&gt;  &lt;p&gt;using System.Windows.Controls;    &lt;br /&gt;using Microsoft.VirtualEarth.MapControl; &lt;/p&gt;  &lt;p&gt;namespace VirtualEarthSilverlightApplication1    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public partial class Page : UserControl     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public Page()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; InitializeComponent(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Map1.Mode = new AerialMode();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;First, in order to access the Map Control programatically you’ll need to set it’s “Name” property within XAML; like the following: &lt;/p&gt;  &lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;VirtualEarthSilverlightApplication1.Page&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:m=&amp;quot;clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Width=&amp;quot;400&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;m:Map Name=&amp;quot;Map1&amp;quot;&amp;gt;&amp;lt;/m:Map&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;     &lt;br /&gt;&amp;lt;/UserControl&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;I hope your as psyched about the new Virtual Earth Silverlight control as I am. I’m really looking forward to exploring all the capabilities of the new control; most of which just weren’t possible with the old JavaScript control. One downside is we’ll have to wait until a future release for a “Go Live” license, but until then I’m sure the guys on the Virtual Earth team will be making this control the absolute best it can be; after all it’s pretty darn awesome already. &lt;/p&gt;  &lt;p&gt;Keep an eye out, I’ll be posting more articles/tutorials to help you out in exploring this new control. &lt;/p&gt;  &lt;h4&gt;Next Tutorial/Article: &lt;a href="http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c"&gt;Basics of Adding Polygons and Polylines using XAML and Code &lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/i32PaGWUI6IDRtBSEVb_g4h4XPk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i32PaGWUI6IDRtBSEVb_g4h4XPk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/i32PaGWUI6IDRtBSEVb_g4h4XPk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i32PaGWUI6IDRtBSEVb_g4h4XPk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=44Nla1rfPPQ:1epTC4zMsdg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=44Nla1rfPPQ:1epTC4zMsdg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=44Nla1rfPPQ:1epTC4zMsdg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=44Nla1rfPPQ:1epTC4zMsdg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=44Nla1rfPPQ:1epTC4zMsdg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/44Nla1rfPPQ" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/20/Getting-Started-Virtual-Earth-Silverlight-Map-Control-SDK-CTP.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/20/Getting-Started-Virtual-Earth-Silverlight-Map-Control-SDK-CTP.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=20736f64-9876-4d0f-b60e-3fe20252d4c4</guid>
      <pubDate>Fri, 20 Mar 2009 18:27:00 -0500</pubDate>
      <category>Silverlight</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=20736f64-9876-4d0f-b60e-3fe20252d4c4</pingback:target>
      <slash:comments>9</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=20736f64-9876-4d0f-b60e-3fe20252d4c4</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/20/Getting-Started-Virtual-Earth-Silverlight-Map-Control-SDK-CTP.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=20736f64-9876-4d0f-b60e-3fe20252d4c4</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Silverlight Control CTP Teaser and Some Initial Thoughts</title>
      <description>&lt;p&gt;Yesterday, the &lt;a href="http://blogs.msdn.com/virtualearth/archive/2009/03/18/introducing-the-virtual-earth-silverlight-map-control.aspx" target="_blank"&gt;Virtual Earth Silverlight Control CTP (Community Technology Preview) was announced at MIX’09&lt;/a&gt;. I was also fortunate to get early access to the CTP, so I’ve been playing with it for a few days. I can’t show you any code yet (until it’s released publicly), but I can tell you a little about it for now. Once it’s released I’ll be posting some articles that range from Basic How-To to Implementing Some Cool Stuff; but you’ll have to wait a little bit for those.&lt;/p&gt;  &lt;p&gt;For now, here’s a little info…&lt;/p&gt;  &lt;p&gt;Combining the power of Silverlight and Virtual Earth Mapping makes for a pretty awesome combination. You can now build all the cool stuff you wanted to build with the JavaScript Map Control, Plus TONS More!&lt;/p&gt;  &lt;p&gt;Here’s a couple key feature points:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Cross-Platform Support. No more hacky JavaScript to write; unless of course you want to use the Silverlight HTML Bridge to interface with existing JavaScript code (think about how you could upgrade existing mapping web applications with this). &lt;/li&gt;    &lt;li&gt;Ability to Plot ANY Rich Content on the Map. Including Videos or any other Custom Controls. &lt;/li&gt;    &lt;li&gt;Increased Performance! Since the control uses Silverlight it takes full advantage of the performance benefits that Silverlight has to offer. Remember how slow the JavaScript Map Control can become?&lt;/li&gt;    &lt;li&gt;Map wraps across the International Date Line. This is an issue with the JavaScript Map Control, since it doesn’t allow you to plot Polygons or Polylines that span across the International Date Line. This is no longer an issue with the Silverlight Map Control.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here’s a couple screenshots of the Map in action:&lt;/p&gt;  &lt;p&gt;The first one shows a Polygon, Polyline and a Video plotted on the Map.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_Teaser_001_PolygonPolylineVideo.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_Teaser_001_PolygonPolylineVideo" border="0" alt="VEJS_Teaser_001_PolygonPolylineVideo" src="http://pietschsoft.com/image.axd?picture=VEJS_Teaser_001_PolygonPolylineVideo_thumb.png" width="244" height="214" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The second one shows a Tooltip being displayed from the mouse hovering over a Polygon.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VEJS_Teaser_002_PolygonWithTooltip.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VEJS_Teaser_002_PolygonWithTooltip" border="0" alt="VEJS_Teaser_002_PolygonWithTooltip" src="http://pietschsoft.com/image.axd?picture=VEJS_Teaser_002_PolygonWithTooltip_thumb.png" width="244" height="152" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Not a final release, and the JavaScript Map Control does offer some features that the Silverlight control does not:&lt;/p&gt;  &lt;p&gt;For example, the Silverlight control does not have Birdseye or 3D map modes. They haven’t mentioned when/if the Silverlight control may have these, but I’m hoping they do make it into the control before RTW to keep it on par with the existing JavaScript Control.&lt;/p&gt;  &lt;p&gt;Also keep in mind that this is just a CTP (Community Technology Preview); which means: 1) You can NOT use it in Production, and 2) The next release (CTP, Beta, Whatever) may contain (and probably will) breaking changes. So, if you’re looking for a Silverlight Map Control you can roll into Production Today, then you’ll want to check out the &lt;a href="http://deepearth.codeplex.com" target="_blank"&gt;DeepEarth Project&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Keep an eye out for my tutorials as I release them, starting tomorrow as soon as the CTP is Released To Web (RTW).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YlhnllkQhiHyVg0qq3wg2LXoTVY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YlhnllkQhiHyVg0qq3wg2LXoTVY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YlhnllkQhiHyVg0qq3wg2LXoTVY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YlhnllkQhiHyVg0qq3wg2LXoTVY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=OuxMYoUvgK0:DuoF0mTUmgs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=OuxMYoUvgK0:DuoF0mTUmgs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=OuxMYoUvgK0:DuoF0mTUmgs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=OuxMYoUvgK0:DuoF0mTUmgs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=OuxMYoUvgK0:DuoF0mTUmgs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/OuxMYoUvgK0" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/19/Virtual-Earth-Silverlight-Control-CTP-Teaser-Some-Initial-Thoughts.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/19/Virtual-Earth-Silverlight-Control-CTP-Teaser-Some-Initial-Thoughts.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=6b2b935a-f941-4357-8e30-2d5f61644935</guid>
      <pubDate>Thu, 19 Mar 2009 18:12:21 -0500</pubDate>
      <category>Virtual Earth</category>
      <category>Silverlight</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=6b2b935a-f941-4357-8e30-2d5f61644935</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=6b2b935a-f941-4357-8e30-2d5f61644935</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/19/Virtual-Earth-Silverlight-Control-CTP-Teaser-Some-Initial-Thoughts.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=6b2b935a-f941-4357-8e30-2d5f61644935</wfw:commentRss>
    </item>
    <item>
      <title>Windows 7 Beta: Change the Logon UI Background Image</title>
      <description>&lt;p&gt;
&lt;img style="padding-left: 5px" src="http://pietschsoft.com/image.axd?picture=Windows7Beta_CustomLogonUIBackground.png" alt="" align="right" /&gt;Apparently, &lt;a href="http://www.withinwindows.com/2009/03/15/windows-7-to-officially-support-logon-ui-background-customization/"&gt;Windows 7 will &amp;quot;officially&amp;quot; support Logon UI Background Customization&lt;/a&gt;. The previous link describes what needs to be in place (a registry key and image file) for you to be able to have Windows 7 use any image you want as the Logon UI Background. What the previous link doesn&amp;#39;t specify is if this works with the Windows 7 Beta (build 7000). Actually, I just test and confirmed that it does work perfectly in the Windows 7 Beta. Good news for us of whom can&amp;#39;t (or don&amp;#39;t want to) run a newer (possibly more buggy), &amp;quot;leaked&amp;quot; build of Windows 7.
&lt;/p&gt;
&lt;p&gt;
I&amp;#39;ll describe the 2 basic steps needed to do this with the Windows 7 Beta, but to get more detail I recommend reading the article linked above. 
&lt;/p&gt;
&lt;h3&gt;Step 1: Add the Following Registry Key&lt;/h3&gt;
&lt;p&gt;
Go to the &amp;quot;&lt;strong&gt;HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background&lt;/strong&gt;&amp;quot; Registry location using Regedit.exe and add a DWORD value named &amp;quot;&lt;strong&gt;OEMBackground&lt;/strong&gt;&amp;quot; and set it&amp;#39;s value to &lt;strong&gt;1&lt;/strong&gt; (enabled).
&lt;/p&gt;
&lt;h3&gt;Step 2: Add an Image (JPG) file to be used&lt;/h3&gt;
&lt;p&gt;
Add any image file you want to the &amp;quot;&lt;strong&gt;%windir%\system32\oobe\info\backgrounds&lt;/strong&gt;&amp;quot; folder, and rename it to &amp;quot;&lt;strong&gt;backgroundDefault.jpg&lt;/strong&gt;&amp;quot;. Also, you&amp;#39;ll want to make sure the image file is less than 256Kb in size. If the file size is bigger it wont use it.
&lt;/p&gt;
&lt;p&gt;
And, it&amp;#39;s that simple to set the Windows 7 Beta to use your own background image for the Logon UI. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zF4qQK8nEtUmQag9D3j2MCRkprM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zF4qQK8nEtUmQag9D3j2MCRkprM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zF4qQK8nEtUmQag9D3j2MCRkprM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zF4qQK8nEtUmQag9D3j2MCRkprM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vHVibwex2AA:ahvFhBTdCtA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vHVibwex2AA:ahvFhBTdCtA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vHVibwex2AA:ahvFhBTdCtA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vHVibwex2AA:ahvFhBTdCtA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vHVibwex2AA:ahvFhBTdCtA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/vHVibwex2AA" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/16/Windows-7-Beta-Change-the-Logon-UI-Background-Image.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/16/Windows-7-Beta-Change-the-Logon-UI-Background-Image.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=bc314f2b-930f-48b4-9d8b-3bc84cc69f45</guid>
      <pubDate>Mon, 16 Mar 2009 19:03:00 -0500</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=bc314f2b-930f-48b4-9d8b-3bc84cc69f45</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=bc314f2b-930f-48b4-9d8b-3bc84cc69f45</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/16/Windows-7-Beta-Change-the-Logon-UI-Background-Image.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=bc314f2b-930f-48b4-9d8b-3bc84cc69f45</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth: Modify the Opacity of an Existing Custom Tile Layer</title>
      <description>&lt;p&gt;
One of the features that the Custom Tile Layer functionality of the Virtual Earth JavaScript control is the ability to modify the Tile Layers Opacity after it&amp;#39;s been added to the Map. It does include HideTileLayer and ShowTileLayer methods to dynamically toggle the display of Custom Tile Layers, but sometimes that&amp;#39;s just not enough customization. However, I do have some good news, there is a small technique that you can use to modify the Tile Layer Opacity as necessary.
&lt;/p&gt;
&lt;h3&gt;How to Change Custom Tile Layer Opacity&lt;/h3&gt;
&lt;p&gt;
To change the Opacity of a Custom Tile Layer you basically need to Delete and then Re-Add the Custom Tile Layer. However, the technique shown below gets the existing Tile Layer by ID, changes it&amp;#39;s Opacity value only, then deletes and re-adds it.
&lt;/p&gt;
&lt;p&gt;
Here&amp;#39;s the main javascript method that does the work for you: 
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
&lt;span class="kwrd"&gt;function&lt;/span&gt; SetTileLayerOpacity(tileLayerID, newOpacity) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Get TileLayer&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; layer = map.GetTileLayerByID(tileLayerID);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Set new Opacity Value&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.Opacity = newOpacity;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Delete Existing TileLayer from Map&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.DeleteTileLayer(tileLayerID);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Re-Add the TileLayer with new Opacity&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.AddTileLayer(layer);&lt;br /&gt;
} 
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
And, here&amp;#39;s the simple code needed to change a Custom Tile Layer&amp;#39;s Opacity as needed:
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
SetTileLayerOpacity(&amp;quot;tilerLayerID&amp;quot;, 0.5); 
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;h3&gt;Complete Code Example&lt;/h3&gt;
&lt;p&gt;
Here&amp;#39;s a full example page that implements the javascript method above. To build this example I actually copied the &amp;quot;Add a tile layer&amp;quot; example from the Virtual Earth Interactive SDK and added the SetTileLayerOpacity methed/functionality to it.
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-&lt;span class="rem"&gt;//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http:&lt;span class="rem"&gt;//dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; map = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; tileLayer;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;function&lt;/span&gt; GetMap()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = &lt;span class="kwrd"&gt;new&lt;/span&gt; VEMap(&amp;#39;myMap&amp;#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.LoadMap(&lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(48.03,-122.4),12,&amp;#39;r&amp;#39; ,&lt;span class="kwrd"&gt;false&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetTiles();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;function&lt;/span&gt; GetTiles()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; bounds = [&lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLongRectangle(&lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(49,-123),&lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(47,-121))];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; tileSourceSpec = &lt;span class="kwrd"&gt;new&lt;/span&gt; VETileSourceSpecification(&amp;quot;lidar&amp;quot;, &amp;quot;http:&lt;span class="rem"&gt;//dev.live.com/virtualearth/sdk/layers/lidar/%4.png&amp;quot;);&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tileSourceSpec.NumServers = 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tileSourceSpec.Bounds = bounds;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tileSourceSpec.MinZoomLevel = 10;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tileSourceSpec.MaxZoomLevel = 18;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tileSourceSpec.Opacity = 0.5; &lt;span class="rem"&gt;//opacity;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tileSourceSpec.ZIndex = 100;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.AddTileLayer(tileSourceSpec, &lt;span class="kwrd"&gt;true&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;function&lt;/span&gt; DeleteTileLayer()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.DeleteTileLayer(&amp;quot;lidar&amp;quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;function&lt;/span&gt; SetTileLayerOpacity(tileLayerID, newOpacity) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Get TileLayer&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; layer = map.GetTileLayerByID(tileLayerID);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Set new Opacity Value&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.Opacity = newOpacity;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Delete Existing TileLayer from Map&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.DeleteTileLayer(tileLayerID);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Re-Add the TileLayer with new Opacity&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.AddTileLayer(layer);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;body onload=&amp;quot;GetMap();&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id=&amp;#39;myMap&amp;#39; style=&amp;quot;position:relative; width:400px; height:400px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;SetTileLayerOpacity(&amp;#39;lidar&amp;#39;, 0.5);&amp;quot;&amp;gt;Set Opacity to 0.5&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;SetTileLayerOpacity(&amp;#39;lidar&amp;#39;, 1.0);&amp;quot;&amp;gt;Set Opacity to 1.0&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;hr /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;DeleteTileLayer();&amp;quot;&amp;gt;Remove the tile layer&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt; 
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XFSagXHoAMbGbnE6Yerkvas4cPE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XFSagXHoAMbGbnE6Yerkvas4cPE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XFSagXHoAMbGbnE6Yerkvas4cPE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XFSagXHoAMbGbnE6Yerkvas4cPE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lwldJKkM6p0:wAhMvgOH7uM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lwldJKkM6p0:wAhMvgOH7uM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=lwldJKkM6p0:wAhMvgOH7uM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lwldJKkM6p0:wAhMvgOH7uM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=lwldJKkM6p0:wAhMvgOH7uM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/lwldJKkM6p0" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/13/Virtual-Earth-Modify-the-Opacity-of-an-Existing-Custom-Tile-Layer.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/13/Virtual-Earth-Modify-the-Opacity-of-an-Existing-Custom-Tile-Layer.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=ea0010eb-d51d-406a-82b1-3d1c6031a34c</guid>
      <pubDate>Fri, 13 Mar 2009 19:27:00 -0500</pubDate>
      <category>JavaScript</category>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=ea0010eb-d51d-406a-82b1-3d1c6031a34c</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=ea0010eb-d51d-406a-82b1-3d1c6031a34c</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/13/Virtual-Earth-Modify-the-Opacity-of-an-Existing-Custom-Tile-Layer.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=ea0010eb-d51d-406a-82b1-3d1c6031a34c</wfw:commentRss>
    </item>
    <item>
      <title>Cheap PC 2009 - Custom Built PC under $500 that includes Windows Vista Home Premium</title>
      <description>&lt;p&gt;
Two years ago I posted &amp;quot;&lt;a href="http://pietschsoft.com/post.aspx?id=a0e03135-de80-4cdb-8b9e-f53c846f5189"&gt;Cheap PC - Build a Vista Premium Ready system for under $500 including the OS&lt;/a&gt;&amp;quot;. I can&amp;#39;t believe that was two years ago already! Anyway, the original premise of the post was to point out that you could build a &amp;quot;cheap&amp;quot; PC for under $500 that included and could run Windows Vista with &amp;quot;Aero&amp;quot; Glass Enabled. After I wrote that post I decided that I would try to remember to write a post like that every year to serve two purposes: 1) chronicle what kind of PC $500 can buy you, and 2) to help other people realize that it&amp;#39;s possible to build a custom pc for cheap that isn&amp;#39;t total crap. Well, it seems I skipped a year, so here&amp;#39;s the &amp;quot;Cheap PC 2009&amp;quot; post.
&lt;/p&gt;
&lt;p&gt;
One thing I decided to change from the previous post is I&amp;#39;m going to factor the shipping into the total price. So basically when &amp;quot;all said and done&amp;quot; the overall total price you&amp;#39;ll pay for what I list will be No More Than $500 (US). 
&lt;/p&gt;
&lt;h3&gt;
&lt;strong&gt;Total Cost: $491.48 &lt;/strong&gt;(this includes shipping)
&lt;/h3&gt;
&lt;p&gt;
Now for the parts breakout: 
&lt;/p&gt;
&lt;p&gt;
Motherboard - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813131338"&gt;$49.99 - ASUS P5N73-AM LGA775 with Integrated GeForce 7050 Graphics&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Processor (CPU) - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16819115206"&gt;$119.99 - Intel Core 2 Duo E7400 Wolfdale 2.8Ghz 65W Dual-Core&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Memory (RAM) - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16820231122"&gt;$39.99 - G.SKILL 4GB (2 x 2GB) F2-6400CL5D-4GBBPQ DDR2 800 (PC2 6400) Dual Channel Memory&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Hard Drive - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822136098"&gt;$49.99 - Western Digital Caviar SE 320GB SATA 3.0Gb/s WD3200AAJS &lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Optical Drive - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16827136152"&gt;$24.99 - LG 22X DVD&amp;plusmn;R Burner SATA Model GH22NS30&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Case - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16811147095"&gt;$26.99 - Rosewill R222-P-BK Black Steel ATX Mid Tower Case&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Power Supply - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16817182009"&gt;$49.99 - Rosewill RP500 500W ATX Power Supply&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Operating System - &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16832116488"&gt;$99.99 - Windows Vista Home Premium SP1 64-bit OEM&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;A couple things to note:&lt;/h3&gt;
&lt;p&gt;
There are a couple things I want to note about the parts I spec&amp;#39;d out above, and I want to explain my reasoning a little bit.
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;One thing I did differently this time is I spec&amp;#39;d out the Case and Power Supply seperately. The reason for this is when you buy a cheap case, most times you&amp;#39;ll get an even cheaper power supply included that is essentially not the most reliable. I have actually gotten bitten in the past by the super cheap power supply that came with my case burning out and having to buy a new one. On the other hand I have had super cheap power supplies that have lasted for years. It&amp;#39;s better to be on the safe side and buy a power supply seperately to make sure you get a much better one that&amp;#39;ll last; at least it should last.&lt;/li&gt;
	&lt;li&gt;To save on cost a little I only spec&amp;#39;d a 320GB hard drive. To many that may seem a little small, but it is on par with the likes of Dell and others.&lt;/li&gt;
	&lt;li&gt;The amount of Ram that I&amp;#39;ve spec&amp;#39;d (4GB) is actually twice that of what I&amp;#39;ve seen comparable systems from Dell come with. From my experiences 4GB of Ram is pretty much the sweet spot for Windows Vista where it performs the best and you still have plenty of Ram for the things you want to do. &lt;/li&gt;
	&lt;li&gt;Integrated Graphics Really? I chose a motherboard in this spec that has integrated GeForce 7050 Graphics. The reason for this is because it makes the build cheaper, and the GeForce 7050 does support DirectX 9. Plus, the motherboard does have a PCI-Express 2.0 x16 expansion slot, so you&amp;#39;ll be able to upgrade to a better dedicated graphics card at some future point if you want. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Also, this &amp;quot;system&amp;quot; Will run Windows 7 perfectly. The reason I know this is because it&amp;#39;ll run Vista perfectly, and Windows 7 will (when it comes out) require less Processor Power and Memory to run the operating system; at least the Beta currently does!
&lt;/p&gt;
&lt;h3&gt;Upgrading Notes &lt;/h3&gt;
&lt;p&gt;
If you are thinking of upgrading an existing system (rather than build a completely new one), remember if your system is only a few years old you may be able to save some money by only upgrading the parts that need it.
&lt;/p&gt;
&lt;p&gt;
Here&amp;#39;s an upgrade scenario:
&lt;/p&gt;
&lt;p&gt;
&amp;quot;I bought a &amp;quot;pre-built&amp;quot; system from the store a couple few years ago. It only has a single-core processor, 1GB of Ram and is running Windows XP. My hard drive space is sufficient and the DVD drive in it works fine.&amp;quot; 
&lt;/p&gt;
&lt;p&gt;
In this case, you really only need to upgrade the Motherboard, Processor (CPU) and RAM. You&amp;#39;ll be able to reuse all your other hardware (Hard Drives, CD/DVD Drives, Case and Power Supply).
&lt;/p&gt;
&lt;p&gt;
One thing you&amp;#39;ll really need to make sure of first, though, is that the case is a standard ATX (Mid or Full) case. From my experience most are, but some aren&amp;#39;t. If it isn&amp;#39;t a standard ATX case, then you&amp;#39;ll need to buy a new Power Supply and Case for your new system.
&lt;/p&gt;
&lt;p&gt;
Also, if the case is a standard ATX case, then you&amp;#39;ll also need to verify that the power supply is sufficient. Generally with the system I&amp;#39;ve spec&amp;#39;d above, you&amp;#39;ll want at least a 400 Watt (W) power supply; the bigger the better. In the spec&amp;#39;d system above I have a 500W power supply liste, this is because you may need more power if you add more hard drives or even if you use this system as the basis for a future upgrade.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Happy System Building!&lt;/strong&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_mHw1iQBFJUrbQac6O6zciaIWpo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_mHw1iQBFJUrbQac6O6zciaIWpo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_mHw1iQBFJUrbQac6O6zciaIWpo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_mHw1iQBFJUrbQac6O6zciaIWpo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=NLNYbs46jdI:GbuNihsMNjU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=NLNYbs46jdI:GbuNihsMNjU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=NLNYbs46jdI:GbuNihsMNjU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=NLNYbs46jdI:GbuNihsMNjU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=NLNYbs46jdI:GbuNihsMNjU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/NLNYbs46jdI" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/13/Cheap-PC-2009-Custom-Built-PC-under-500-that-includes-Windows-Vista-Home-Premium.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/13/Cheap-PC-2009-Custom-Built-PC-under-500-that-includes-Windows-Vista-Home-Premium.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=1625d128-ad68-4466-94d7-2439fa5354a3</guid>
      <pubDate>Fri, 13 Mar 2009 13:15:00 -0500</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=1625d128-ad68-4466-94d7-2439fa5354a3</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=1625d128-ad68-4466-94d7-2439fa5354a3</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/13/Cheap-PC-2009-Custom-Built-PC-under-500-that-includes-Windows-Vista-Home-Premium.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=1625d128-ad68-4466-94d7-2439fa5354a3</wfw:commentRss>
    </item>
    <item>
      <title>Live Framework: Connecting to the Local Live Operating Environment (LOE) for Offline Applications</title>
      <description>&lt;p&gt;
One of the things the &lt;a href="http://dev.live.com/liveframework/"&gt;Live Framework&lt;/a&gt; has to offer is a Local Live Operating Environment you can connect to so that you can Offline Enable your Live Framework Enabled Desktop Applications. I found the process of getting it to work a little tricky (especially since I was running Win7 Beta; I&amp;#39;ll explain down further) so I&amp;#39;ve decided to write up a summary of my experience to help anyone else interested.
&lt;/p&gt;
&lt;p&gt;
This was written using the Live Framework CTP. 
&lt;/p&gt;
&lt;h3&gt;Connecting to the Live Operating Environment&lt;/h3&gt;
&lt;p&gt;
The &amp;quot;Live Operating Environment&amp;quot; is the main service that is hosted in the cloud by Microsoft. To connect to it and use it you are required to be connected to the Internet.
&lt;/p&gt;
&lt;p&gt;
Basically to connect to the Live Operating Environment you need to prompt the user for their Windows Live ID and Password. Below is a very simple example of what is needed to create an instance of the LiveOperatingEnvironment object in C# and connect to the Live Operating Environment server. 
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
var credentials = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Net.NetworkCredentials(windowsLiveID, password);&lt;br /&gt;
&lt;br /&gt;
var LOE = &lt;span class="kwrd"&gt;new&lt;/span&gt; LiveOperatingEnvironment();&lt;br /&gt;
&lt;br /&gt;
LOE.Connect(credentials);
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
I you haven&amp;#39;t really looked in to how this works, you can look at the ConnectCloud method of the Login.xaml.cs file of the Project Manager sample code within the Live Framework CTP SDK. 
&lt;/p&gt;
&lt;h3&gt;Connecting to the Local Live Operating Environment&lt;/h3&gt;
&lt;p&gt;
Now, to connect to the &lt;strong&gt;Local &lt;/strong&gt;Live Operating Environment instead, you basically just call the &lt;a href="http://msdn.microsoft.com/en-us/library/dd139363.aspx"&gt;LiveOperatingEnvironment.ConnectLocal()&lt;/a&gt; method instead of the &lt;a href="http://msdn.microsoft.com/en-us/library/dd157894.aspx"&gt;Connect()&lt;/a&gt; method shown above. Also, another big difference is you don&amp;#39;t need to prompt the user for their Windows Live ID and Password, since the Local Live Operating Environment handles all the authentication for you.
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
var LOE = &lt;span class="kwrd"&gt;new&lt;/span&gt; LiveOperatingEnvironment();&lt;br /&gt;
&lt;br /&gt;
LOE.ConnectLocal();
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt; 
&lt;/p&gt;
&lt;p&gt;
This also has the benefit of only requiring the user to type in their Windows Live ID and Password once when they login with the Live Framework Client; which can actually save their password and auto log them in when they login to Windows. 
&lt;/p&gt;
&lt;h3&gt;Mesh Client or Live Framework Client? What&amp;#39;s the difference?&lt;/h3&gt;
&lt;p&gt;
When you go to &lt;a href="http://mesh.com"&gt;http://mesh.com&lt;/a&gt;, login, and click &amp;quot;Add Device&amp;quot; so you can Sync files with Mesh Folders, it has you install the Mesh Client. This install does not contain the Local Live Operating Environment you need when programming against the Live Framework SDK. 
&lt;/p&gt;
&lt;p&gt;
When you go to &lt;a href="http://developer.mesh-ctp.com"&gt;http://developer.mesh-ctp.com&lt;/a&gt;, login, and click &amp;quot;Add Device&amp;quot; so you can Sync files with the &amp;quot;dev&amp;quot; version of Mesh, it has you install the Live Framework Client. This is in fact the install you want that contains the Local Live Operating Environment.
&lt;/p&gt;
&lt;h3&gt;&lt;strike&gt;Beware &lt;/strike&gt;the Mesh Client and Live Framework Client &lt;strike&gt;don&amp;#39;t&lt;/strike&gt; play well together&lt;/h3&gt;
&lt;p&gt;
Actually, the latest update (April CTP) to the Live Framework Client does install and work correctly along-side the Mesh Client.AND, it now works on the Windows 7 Beta. 
&lt;/p&gt;
&lt;p&gt;
&lt;strike&gt;There is a known issue of running the Live Framework Client and Mesh Client on the same machine; they simply don&amp;#39;t work as installed out of the box. You need to perform a little registry edit to fix the issue. It sounds bad, but it is actually quite painless. 
&lt;/strike&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strike&gt;
Here&amp;#39;s instructions on how to get the Mesh Client and Live Framework Client to run Side By Side:
&lt;/strike&gt;
&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;strike&gt;Uninstall Live Framework Client.&lt;/strike&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strike&gt;Install Mesh Client Beta from &lt;a href="http://mesh.com"&gt;http://mesh.com&lt;/a&gt;&lt;/strike&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strike&gt;Add the following registry item: HKCU\Software\Microsoft\Live Framework Client\AllowSxS = 1 (DWORD)&lt;/strike&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strike&gt;Install Live Framework Client from &lt;a href="http://developer.mesh-ctp.com"&gt;http://developer.mesh-ctp.com&lt;/a&gt;&lt;br /&gt;
	&lt;/strike&gt;
	&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strike&gt;
The original posting of these instructions and a little more detail about them can be found here:
&lt;/strike&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strike&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/2fa9d3f1-029e-44af-9568-1cea81ca78a9/"&gt;http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/2fa9d3f1-029e-44af-9568-1cea81ca78a9/&lt;/a&gt;&lt;/strike&gt; 
&lt;/p&gt;
&lt;h3&gt;&lt;strike&gt;Current Live Framework Client does not work on the Windows 7 Beta&lt;/strike&gt;&lt;/h3&gt;
&lt;p&gt;
&lt;strike&gt;
One thing to note before you start trying to develop against the Local Live Operating Environment is it does NOT run correctly on the Windows 7 Beta. In order to develop for it and use it you&amp;#39;ll need to install it on Windows Vista (or presumably Windows XP). 
&lt;/strike&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5Rlh58nAA1HjozcDGtu13LMVaR0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Rlh58nAA1HjozcDGtu13LMVaR0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5Rlh58nAA1HjozcDGtu13LMVaR0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Rlh58nAA1HjozcDGtu13LMVaR0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Jtspm-zTKCs:JnS8FQQcACM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Jtspm-zTKCs:JnS8FQQcACM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=Jtspm-zTKCs:JnS8FQQcACM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=Jtspm-zTKCs:JnS8FQQcACM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=Jtspm-zTKCs:JnS8FQQcACM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/Jtspm-zTKCs" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/03/07/Live-Framework-Connecting-to-the-Local-Live-Operating-Environment-LOE.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/03/07/Live-Framework-Connecting-to-the-Local-Live-Operating-Environment-LOE.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=047fae73-c0f0-457c-a0ec-9d7454f6810e</guid>
      <pubDate>Sat, 07 Mar 2009 20:28:00 -0500</pubDate>
      <category>Live Framework</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=047fae73-c0f0-457c-a0ec-9d7454f6810e</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=047fae73-c0f0-457c-a0ec-9d7454f6810e</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/03/07/Live-Framework-Connecting-to-the-Local-Live-Operating-Environment-LOE.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=047fae73-c0f0-457c-a0ec-9d7454f6810e</wfw:commentRss>
    </item>
    <item>
      <title>I've jumped on the "Anti-IE6" band wagon</title>
      <description>&lt;p&gt;
&lt;img src="http://pietschsoft.com/image.axd?picture=pushuptheweb.png" alt="Pushup The Web" align="right" /&gt;There have been a lot of talk online for a while now about the much desired demise of Internet Explorer 6, and other out dated web browsers. I don&amp;#39;t think I&amp;#39;ve used IE6 since the first Beta of IE7, and I haven&amp;#39;t used Firefox 2.0 since Firefox 3.0 was released. However, I can see that there are still a few users that visit this blog of whom are still using some of these OLD versions of these web browsers. So, I am joining the effort to &amp;quot;Push up the web&amp;quot; by including the script found at &lt;a href="http://www.pushuptheweb.com"&gt;http://www.pushuptheweb.com&lt;/a&gt; in my website to kindly remind any visitor using an out dated web browser that they may want to update.
&lt;/p&gt;
&lt;p&gt;
The first Anti-IE6 campaign website I was directed to was &lt;a href="http://iedeathmarch.org"&gt;http://iedeathmarch.org&lt;/a&gt; where they point out the fact that there are a ton of things younger than IE6 (which was released August 27th 2001.)
&lt;/p&gt;
&lt;p&gt;
For example, these things are ALL Younger than IE6:
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Google Adsense&lt;/li&gt;
	&lt;li&gt;Friendster&lt;br /&gt;
	&lt;/li&gt;
	&lt;li&gt;iPod&lt;/li&gt;
	&lt;li&gt;Original XBox&lt;/li&gt;
	&lt;li&gt;Halo&lt;br /&gt;
	&lt;/li&gt;
	&lt;li&gt;Nintendo Gamecube&lt;/li&gt;
	&lt;li&gt;Hummer H2&lt;/li&gt;
	&lt;li&gt;Windows XP&lt;/li&gt;
	&lt;li&gt;Internet Explorer 5 for Mac OS&lt;/li&gt;
	&lt;li&gt;Canon Digital SLR Cameras&lt;br /&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
We&amp;#39;ve actually seen a ton of stuff happen since IE6 was released. IE6 has been around longer than the 6+ years the U.S. has had troops in Iraq. IE6 has been around longer than the 7+ years it&amp;#39;s been since the 9/11 attacks.
&lt;/p&gt;
&lt;p&gt;
Now, why are people still using these old browsers? Why haven&amp;#39;t they updated to the latest, safest, most secure versions? Well, regardless the reason, it&amp;#39;s about time. 
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gxmNPE0087f6FwCu8htbJMsGs1I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gxmNPE0087f6FwCu8htbJMsGs1I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gxmNPE0087f6FwCu8htbJMsGs1I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gxmNPE0087f6FwCu8htbJMsGs1I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=qw1XRtVv2Ig:XPYjdayugi8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=qw1XRtVv2Ig:XPYjdayugi8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=qw1XRtVv2Ig:XPYjdayugi8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=qw1XRtVv2Ig:XPYjdayugi8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=qw1XRtVv2Ig:XPYjdayugi8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/qw1XRtVv2Ig" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/02/24/Ive-jumped-on-the-Anti-IE6-band-wagon.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/02/24/Ive-jumped-on-the-Anti-IE6-band-wagon.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=9b6e1082-e828-40dd-a470-7896a4569776</guid>
      <pubDate>Tue, 24 Feb 2009 22:18:00 -0500</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=9b6e1082-e828-40dd-a470-7896a4569776</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=9b6e1082-e828-40dd-a470-7896a4569776</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/02/24/Ive-jumped-on-the-Anti-IE6-band-wagon.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=9b6e1082-e828-40dd-a470-7896a4569776</wfw:commentRss>
    </item>
    <item>
      <title>.NET Framework: Communicate through NAT Router via UPnP (Universal Plug and Play)</title>
      <description>&lt;p&gt;
I&amp;#39;ve been working on an application recently that needs to be able to communicate through a router/firewall using TCP. I&amp;#39;ve read/heard a bit of information about NAT Routers and UPnP; the technoligies used in almost every router sold commercially. So, I knew that you could use the Universal Plug and Play (UPnP) features of the NAT Router to automatically open up the firewall via Port Forwarding to allow other computers on the Internet to connect directly to the one your application is running on. One thing I didn&amp;#39;t know what that Windows (since Windows XP) has the NATUPnP 1.0 Type Library (NATUPNP.DLL) COM Component that you can utilize within your applications to do this for you.
&lt;/p&gt;
&lt;p&gt;
I haven&amp;#39;t found very many articles online (via Google search) on using the NATUPnP 1.0 Type Library; there&amp;#39;s pretty much only small code snippets available. So, I&amp;#39;ve decided to explain a little further, in this article, the What and Why of communicating through a NAT Router utilizing UPnP.
&lt;/p&gt;
&lt;h3&gt;What is NAT (Network Address Translation)?&lt;/h3&gt;
&lt;p&gt;
Network Address Translation is the method employed by a Network Router (and Wireless Routers) that allows you to have multiple computers connected to the internet using your home/work broadband internet connection. Your Router gets assigned an Internet IP Address by your Internet Service Provider, and then the Router assigns a Private IP Address to each computer on your network. The Router then &amp;quot;routes&amp;quot; Incoming and Outgoing network traffic from the Internet to the appropriate computer on your Private Network. This technique is also known as &amp;quot;IP masquerading&amp;quot;, since it hides your entire Private Network from the Internet making it appear as if it were only a single computer connected to the Internet.
&lt;/p&gt;
&lt;p&gt;
One of the biggest side effets of NAT is that it essentially turns your Router into a Firewall. This is because when any unsolicited incoming traffic gets sent you the Router, it has no idea which computer on the Private Network might be the intended recipient. So, consiquentially, it just ignores or blocks the unsolicited incoming traffic. This is also the feature that allows you to safely enable File and Printer Sharing between the computers on the Private Network without the risk of any computer/server on the Internet being able to copy your files.
&lt;/p&gt;
&lt;p&gt;
Also worth noting that NAT can be implemented by other devices than a Network Router, such as: a computer running Windows with Internet Connection Sharing and Windows Firewall, or a computer running software that provides NAT. 
&lt;/p&gt;
&lt;p&gt;
You can read more about NAT at the following links:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Network_address_translation"&gt;http://en.wikipedia.org/wiki/Network_address_translation&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/NAT_traversal"&gt;http://en.wikipedia.org/wiki/NAT_traversal&lt;/a&gt; 
&lt;/p&gt;
&lt;h3&gt;What is Port Forwarding / Static NAT?&lt;/h3&gt;
&lt;p&gt;
Port Forwarding, also called &amp;quot;Static NAT&amp;quot;, allows computers on the Internet to connect directly to a specific computer on your Private Network. This works by configuring your NAT Router to forward any incoming traffic on a specific Port to a specific computer on your network. For example you can run a Web Server by setting the NAT Router to forward all incoming traffic on Port 80 to your Web Server on your Private Network. 
&lt;/p&gt;
&lt;p&gt;
You can read more aboug Port Forwarding at the following link:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Port_forwarding"&gt;http://en.wikipedia.org/wiki/Port_forwarding&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;What is Universal Plug and Play (UPnP)?&lt;/h3&gt;
&lt;p&gt;
Universal Plug and Play (UPnP) is a simple communications mechanism that allows computers and network appliances to auto-configure Port Forwarding on a NAT Router. This greatly simplifies the setup of P2P networks such that the user doesn&amp;#39;t need to configure the NAT Router, instead the computer can connect directly to the Router and setup the appropriate Port Forwarding to allow it to accept direct connections from external computers on the Internet.
&lt;/p&gt;
&lt;p&gt;
This is essentially the technology that allows Peer-to-Peer Software (like Bit Torrent) to communicate through a NAT Router (Firewall) and connect directly to other computers across the Internet. There is also alot of Software and Devices that rely on this to function, such as Windows Live Messenger and XBox 360.
&lt;/p&gt;
&lt;p&gt;
You can read more about UPnP at the following link:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Universal_Plug_and_Play"&gt;http://en.wikipedia.org/wiki/Universal_Plug_and_Play&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Other Resources on Network Address Translation (NAT)&lt;/h3&gt;
&lt;p&gt;
Including the above links there are many articles online that discuss in further detail what NAT and UPnP is. One resource that I really recommend is Episode #42 of the Security Now Podcast with Steve Gibson. If you prefer not to listen to the podcast, there is also a full transcript available for you to read. I really encourage you to read or listen to this.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.grc.com/securitynow.htm#42"&gt;Security Now! #42 - NAT Traversal&lt;/a&gt; 
&lt;/p&gt;
&lt;h3&gt;Using the NATUPnP 1.0 Type Library to Setup Port Forwarding&lt;/h3&gt;
&lt;p&gt;
The NATUPnP 1.0 Type Library (NATUPNP.DLL) COM Component, which is part of Windows (since Windows XP), makes it possible to easily manage Network Address Translation (NAT) through Universal Plug and Play (UPnP). This library provides the ability to configure port mappings on a remote Gateway Device (IGD) that uses NAT. It is worth mentioning that the remote Gateway Device could be another computer running Windows with Internet Connection Sharing and Windows Firewall, or a dedicated hardware device. 
&lt;/p&gt;
&lt;p&gt;
The API Reference for the NATUPnP 1.0 Type Library can be found here: &lt;a href="http://msdn.microsoft.com/en-us/library/aa366276(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa366276(VS.85).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In order to use the NATUPnP Library you need to first add a reference to it to your project within Visual Studio. To do so open the Add Reference dialog, click the COM tab and select the &amp;quot;NATUPnP 1.0 Type Library&amp;quot;. The resulting reference that&amp;#39;s added will be named &amp;quot;NATUPNPLib&amp;quot; and will be the namespace that contains all the functionality contained within the library (all Interfaces and Classes). 
&lt;/p&gt;
&lt;img src="http://pietschsoft.com/image.axd?picture=NATUPNPCOMLibrary_001.png" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
The NATUPnP 1.0 Type Library makes it so easy to setup Port Forwarding it literally only requires a couple lines of code.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Get a listing of all existing Static Port Mappings &lt;/h3&gt;
&lt;p&gt;
To get a list of all the Static Port Mappings that are already setup in your NAT enabled Internet Gateway Device (such as Router) you simply create an instance of the UPnPNATClass object and access its StaticPortMappingCollection property.
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
NATUPNPLib.UPnPNATClass upnpnat = &lt;span class="kwrd"&gt;new&lt;/span&gt; NATUPNPLib.UPnPNATClass();&lt;br /&gt;
NATUPNPLib.IStaticPortMappingCollection mappings = upnpnat.StaticPortMappingCollection;
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
Once you get the collection of existing port mapping, you can iterate through them just as you would any normal Collection of objects:
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
&lt;span class="kwrd"&gt;foreach&lt;/span&gt;(NATUPNPLib.IStaticPortMapping portMapping &lt;span class="kwrd"&gt;in&lt;/span&gt; mappings)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// do something with the port mapping, such as displaying it in a listbox&lt;br /&gt;&lt;/span&gt;
}
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;h3&gt;Add New Static Port Mapping&lt;/h3&gt;
&lt;p&gt;
To add a new Static Port Mapping you simply call the Add method of the IStaticPortMappingCollection object that is returned by the UPnPNATClass.StaticPortMappingCollection property.
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
&lt;span class="rem"&gt;// Here&amp;#39;s an example of opening up TCP Port 80 to forward to a specific Computer on the Private Network&lt;br /&gt;&lt;/span&gt;
mappings.Add(80, &amp;quot;TCP&amp;quot;, 80, &amp;quot;192.168.1.100&amp;quot;, &lt;span class="kwrd"&gt;true&lt;/span&gt;, &amp;quot;Local Web Server&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class="rem"&gt;// Here&amp;#39;s an example of forwarding the UDP traffic of Internet Port 80 to Port 8080 on a Computer on the Private Network&lt;br /&gt;&lt;/span&gt;
mappings.Add(80, &amp;quot;UDP&amp;quot;, 8080, &amp;quot;192.168.1.100&amp;quot;, &lt;span class="kwrd"&gt;true&lt;/span&gt;, &amp;quot;Local Web Server&amp;quot;); 
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt; 
&lt;/p&gt;
&lt;h3&gt;Remove Existing Static Port Mapping&lt;/h3&gt;
&lt;p&gt;
To remove an existing Static Port Mapping you simply call the Remove method of the IStaticPortMappingCollection object that is returned by the UPnPNATClass.StaticPortMappingCollection property.
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;

&lt;/p&gt;
&lt;p&gt;
&lt;span class="rem"&gt;// Remove TCP forwarding for Port 80&lt;br /&gt;&lt;/span&gt;
mappings.Remove(80, &amp;quot;TCP&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class="rem"&gt;// Remove UDP forwarding for Port 8080&lt;br /&gt;&lt;/span&gt;
mappings.Remove(8080, &amp;quot;UDP&amp;quot;);
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt; 
&lt;/p&gt;
&lt;h3&gt;Example Port Forwarding Management Application&lt;/h3&gt;
&lt;p&gt;
While working with the NATUPnP 1.0 Type Library I created a simple application that allows you to maintain the Static Port Mappings that are setup on your Private Networks NAT Router.
&lt;/p&gt;
&lt;p&gt;
Download Sample: &lt;a rel="enclosure" href="http://pietschsoft.com/file.axd?file=NATUPnPPortForwardManager.zip"&gt;NATUPnPPortForwardManager.zip (20.68 kb)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://pietschsoft.com/image.axd?picture=NATUPNPCOMLibrary_002.png" alt="" /&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;
Setup up Port Forwarding on your local router via UPnP makes it extremely convenient for users of your networking application. Instead of requiring them to manually setup Port Forwarding, we can automatically set it up for them. Many popular P2P applications have utilized this functionality for years, and I&amp;#39;m positive you&amp;#39;ve used at least one of these applications already at some point.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3454_NOl1vmuY297IG_36UXKL0A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3454_NOl1vmuY297IG_36UXKL0A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3454_NOl1vmuY297IG_36UXKL0A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3454_NOl1vmuY297IG_36UXKL0A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vr6PjQr8_BQ:oY6Hc4dWQ2I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vr6PjQr8_BQ:oY6Hc4dWQ2I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vr6PjQr8_BQ:oY6Hc4dWQ2I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vr6PjQr8_BQ:oY6Hc4dWQ2I:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vr6PjQr8_BQ:oY6Hc4dWQ2I:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/vr6PjQr8_BQ" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/02/05/NET-Framework-Communicate-through-NAT-Router-via-UPnP.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/02/05/NET-Framework-Communicate-through-NAT-Router-via-UPnP.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=31200e6d-4b61-48b8-a9cb-91e3dd8e97f3</guid>
      <pubDate>Thu, 05 Feb 2009 19:27:00 -0500</pubDate>
      <category>C#</category>
      <category>vb.net</category>
      <category>Win32API</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=31200e6d-4b61-48b8-a9cb-91e3dd8e97f3</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=31200e6d-4b61-48b8-a9cb-91e3dd8e97f3</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/02/05/NET-Framework-Communicate-through-NAT-Router-via-UPnP.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=31200e6d-4b61-48b8-a9cb-91e3dd8e97f3</wfw:commentRss>
    </item>
    <item>
      <title>Using LINQ to SQL with SQL Server Compact Edition</title>
      <description>&lt;p&gt;
I&amp;#39;m currently building a desktop application that needs to store a bunch of data on the users computer, so I&amp;#39;ve decided to use &lt;a href="http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx"&gt;SQL Server Compact 3.5&lt;/a&gt; for this. There&amp;#39;s only one problem, Visual Studio 2008 doesn&amp;#39;t support using LINQ to SQL with SQL Server Compact. However, the .NET Framework does and there&amp;#39;s a work around to get it working in VS&amp;#39;08 that I&amp;#39;ll describe below.
&lt;/p&gt;
&lt;p&gt;
In case you aren&amp;#39;t aware of what &lt;a href="http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx"&gt;SQL Server Compact 3.5&lt;/a&gt; is, here&amp;#39;s the short description that Microsoft gives on their website: &amp;quot;Microsoft SQL Server Compact is a free SQL Server embedded database ideal for building standalone and occasionally connected applications for mobile devices, desktops, and Web clients.&amp;quot; You can download it and view more information here: &lt;a href="http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx"&gt;http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Steps to create a LINQ to SQL application using SQL Server Compact&lt;/h3&gt;
&lt;p&gt;
To make this easy to follow I&amp;#39;m going to start with Creating a Solution in Visual Studio and go through all the steps needed to get it running off of SQL Server Compact.
&lt;/p&gt;
&lt;p&gt;
Also, you&amp;#39;ll first want to make sure you have SQL Server Compact 3.5 installed. It may have been installed when Visual Studio 2008 installed; I&amp;#39;m not sure which editions install SQL Server Compact 3.5, when I installed Visual Studio 2008 Team Suite it did install SQL Server Compact 3.5 too. If you need to install it, you can find the installer here: &lt;a href="http://www.microsoft.com/Sqlserver/2005/en/us/compact-downloads.aspx"&gt;http://www.microsoft.com/Sqlserver/2005/en/us/compact-downloads.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Step 1: Create your new project within Visual Studio&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
It doesn&amp;#39;t matter if it&amp;#39;s a Windows Forms or WPF applciation. For this example, I&amp;#39;ll be creating a WPF application. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Step 2: Create your SQL Server Compact database. For Example: MyDatabase.sdf&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
You can do this by right-clicking on your Solution within the Solution Explorer and selecting &amp;quot;Add - New Item...&amp;quot; then select the &amp;quot;Data&amp;quot; category on the left and &amp;quot;Local Database&amp;quot; on the right.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://pietschsoft.com/image.axd?picture=LINQSQLCompact_CreateDatabaseFile.png" alt="" /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Step 3: Add some Tables to the Database&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
You can do this within Visual Studio 2008 using the &amp;quot;Server Explorer&amp;quot;. The easiest way to open up the Database within the Server Explorer is to just double click it withinthe Solution Explorer.
&lt;/p&gt;
&lt;p&gt;
Also, in this example I&amp;#39;m just going to create a &amp;quot;Person&amp;quot; table with ID, FirstName and LastName columns. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Step 4: Create a .dbml descriptor file for the Database&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
To do this you need to use the &lt;a href="http://msdn.microsoft.com/en-us/library/bb386987.aspx"&gt;SqlMetal.exe tool&lt;/a&gt;. Just type the following into the Visual Studio 2008 Command Prompt:
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;SqlMetal.exe MyDatabase.sdf /dbml:MyDatabase.dbml&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
By default, the SqlMetal.exe is located at &lt;em&gt;drive&lt;/em&gt;:\Progream Files\Microsoft SDKs\Windows\v&lt;em&gt;n.nn&lt;/em&gt;\bin. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Step 5: Add the Existing .dbml file to your project&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Once you add the .dbml file, Visual Studio 2008 will automatically generate the .NET code (C# or VB.NET) for the System.Data.Linq.DataContext class that you&amp;#39;ll use to access your data.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;img src="http://pietschsoft.com/image.axd?picture=LINQSQLCompact_DataContextClass.png" alt="" /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Step 6: Start Coding away using LINQ to SQL! &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
You can now code using LINQ and your new System.Data.Linq.DataContext class against your database.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://pietschsoft.com/image.axd?picture=LINQSQLCompact_LinqCode.png" alt="" /&gt;
&lt;/p&gt;
&lt;h3&gt;A GUI UI for SqlMetal.exe &lt;/h3&gt;
&lt;p&gt;
The &lt;a href="http://www.codeplex.com/sqlmetalosui"&gt;SQL Metal Open Source User Interface&lt;/a&gt; Project over on CodePlex has been built just for the purpose of making it easier to generate mapping files for SQL Server Compact databases. 
&lt;/p&gt;
&lt;p&gt;
You can download it here: &lt;a href="http://www.codeplex.com/sqlmetalosui"&gt;http://www.codeplex.com/sqlmetalosui&lt;/a&gt; 
&lt;/p&gt;
&lt;h3&gt;Related Links&lt;/h3&gt;
&lt;p&gt;
Here are some related links on this topic:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/sqlservercompact/archive/2007/08/21/linq-with-sql-server-compact-a-ka-dlinq-over-sql-ce.aspx"&gt;LINQ with SQL Server Compact (a.k.a. DLINQ with SQL CE)&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://geekswithblogs.net/steveclements/archive/2007/11/13/linq-to-sql.compact.aspx"&gt;LINQ to SQL...compact!&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/18/50753.aspx"&gt;Using LINQ to Access SQL Server Compact Directly - A follow up&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/82qWk35lt0PqXsNvjA5fjw2ddWU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/82qWk35lt0PqXsNvjA5fjw2ddWU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/82qWk35lt0PqXsNvjA5fjw2ddWU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/82qWk35lt0PqXsNvjA5fjw2ddWU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=HOyrIVjh4pA:0UTTYJHXHV0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=HOyrIVjh4pA:0UTTYJHXHV0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=HOyrIVjh4pA:0UTTYJHXHV0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=HOyrIVjh4pA:0UTTYJHXHV0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=HOyrIVjh4pA:0UTTYJHXHV0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/HOyrIVjh4pA" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/01/30/Using-LINQ-to-SQL-with-SQL-Server-Compact-Edition.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/01/30/Using-LINQ-to-SQL-with-SQL-Server-Compact-Edition.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=006d7ee4-ac7d-4fc4-a748-3ba8d846deeb</guid>
      <pubDate>Fri, 30 Jan 2009 20:31:00 -0500</pubDate>
      <category>database</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=006d7ee4-ac7d-4fc4-a748-3ba8d846deeb</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=006d7ee4-ac7d-4fc4-a748-3ba8d846deeb</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/01/30/Using-LINQ-to-SQL-with-SQL-Server-Compact-Edition.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=006d7ee4-ac7d-4fc4-a748-3ba8d846deeb</wfw:commentRss>
    </item>
    <item>
      <title>C#: Flash Window in Taskbar via Win32 FlashWindowEx</title>
      <description>&lt;p&gt;
The Windows API (Win32) has the FlashWindowEx method within the User32 library; this method allows you (the developer) to Flash a Window, signifying to the user that some major event occurred within the application that requires their attention. The most common use of this is to flash the window until the user returns focus to the application. However, you can also flash the window a specified number of times, or just keep flashing it until you decide when to stop. 
&lt;/p&gt;
&lt;p&gt;
The use of the FlashWindowEx method however isn&amp;#39;t built into the .NET Framework anywhere. In order to access it you need to use the Platform Invoke (PInvoke) features of .NET to &amp;quot;drop&amp;quot; down to the Windows API (Win32) and call it directly. Also, as with many other functionalities in&amp;nbsp;the Windows API&amp;nbsp;(that aren&amp;#39;t directly exposed by .NET) the FlashWindowEx method can be a little tricky to use if you aren&amp;#39;t familiar with working with the Windows API from within .NET. 
&lt;/p&gt;
&lt;p&gt;
Now rather than go too deep into the specifics of PInvoke or the Win32 FlashWindowEx method, below is a simple static class in C# that allows you to easily utilize this method. There is actually quite a bit of information needed to explain how to use PInvoke to utilize the Windows API (Win32), so maybe I&amp;#39;ll cover that in a future article. 
&lt;/p&gt;
&lt;p&gt;
Here&amp;#39;s some example usage of this static class: 
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;
 
&lt;/p&gt;
&lt;p&gt;
&lt;span class="rem"&gt;// One this to note with this example usage code, is the &amp;quot;this&amp;quot; keyword is referring to&lt;br /&gt;&lt;/span&gt;
&lt;span class="rem"&gt;// the current System.Windows.Forms.Form.&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span class="rem"&gt;// Flash window until it recieves focus&lt;br /&gt;&lt;/span&gt;
FlashWindow.Flash(&lt;span class="kwrd"&gt;this&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class="rem"&gt;// Flash window 5 times&lt;br /&gt;&lt;/span&gt;
FlashWindow.Flash(&lt;span class="kwrd"&gt;this&lt;/span&gt;, 5);&lt;br /&gt;
&lt;br /&gt;
&lt;span class="rem"&gt;// Start Flashing &amp;quot;Indefinately&amp;quot;&lt;br /&gt;&lt;/span&gt;
FlashWindow.Start(&lt;span class="kwrd"&gt;this&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class="rem"&gt;// Stop the &amp;quot;Indefinate&amp;quot; Flashing&lt;br /&gt;&lt;/span&gt;
FlashWindow.Stop(&lt;span class="kwrd"&gt;this&lt;/span&gt;); 
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt; 
&lt;/p&gt;
&lt;p&gt;
One thing to note about the FlashWindowEx method is that it requires (and will only work on) Windows 2000 or later. 
&lt;/p&gt;
&lt;p&gt;
Here&amp;#39;s the code for the static class in C#: 
&lt;/p&gt;
&lt;p&gt;
&lt;div class="code"&gt;
 
&lt;/p&gt;
&lt;p&gt;
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; FlashWindow&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [DllImport(&amp;quot;user32.dll&amp;quot;)]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;span class="kwrd"&gt;return&lt;/span&gt;: MarshalAs(UnmanagedType.Bool)]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; FlashWindowEx(&lt;span class="kwrd"&gt;ref&lt;/span&gt; FLASHWINFO pwfi); 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [StructLayout(LayoutKind.Sequential)]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;struct&lt;/span&gt; FLASHWINFO&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// The size of the structure in bytes.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; cbSize;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// A Handle to the Window to be Flashed. The window can be either opened or minimized.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; IntPtr hwnd;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// The Flash Status.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; dwFlags;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// The number of times to Flash the window.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; uCount;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// The rate at which the Window is to be flashed, in milliseconds. If Zero, the function uses the default cursor blink rate.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; dwTimeout;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Stop flashing. The system restores the window to its original stae.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; FLASHW_STOP = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash the window caption.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; FLASHW_CAPTION = 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash the taskbar button.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; FLASHW_TRAY = 2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash both the window caption and taskbar button.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; FLASHW_ALL = 3; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash continuously, until the FLASHW_STOP flag is set.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; FLASHW_TIMER = 4; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash continuously until the window comes to the foreground.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; FLASHW_TIMERNOFG = 12; 
&lt;/p&gt;
&lt;p&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash the spacified Window (Form) until it recieves focus.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;form&amp;quot;&amp;gt;The Form (Window) to Flash.&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Flash(System.Windows.Forms.Form form)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Make sure we&amp;#39;re running under Windows 2000 or later&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (Win2000OrLater)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASHWINFO fi = Create_FLASHWINFO(form.Handle, FLASHW_ALL | FLASHW_TIMERNOFG, &lt;span class="kwrd"&gt;uint&lt;/span&gt;.MaxValue, 0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; FlashWindowEx(&lt;span class="kwrd"&gt;ref&lt;/span&gt; fi);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; FLASHWINFO Create_FLASHWINFO(IntPtr handle, &lt;span class="kwrd"&gt;uint&lt;/span&gt; flags, &lt;span class="kwrd"&gt;uint&lt;/span&gt; count, &lt;span class="kwrd"&gt;uint&lt;/span&gt; timeout)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASHWINFO fi = &lt;span class="kwrd"&gt;new&lt;/span&gt; FLASHWINFO();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.cbSize = Convert.ToUInt32(Marshal.SizeOf(fi));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.hwnd = handle;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.dwFlags = flags;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.uCount = count;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.dwTimeout = timeout;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; fi;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Flash the specified Window (form) for the specified number of times&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;form&amp;quot;&amp;gt;The Form (Window) to Flash.&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;count&amp;quot;&amp;gt;The number of times to Flash.&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Flash(System.Windows.Forms.Form form, &lt;span class="kwrd"&gt;uint&lt;/span&gt; count)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (Win2000OrLater)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASHWINFO fi = Create_FLASHWINFO(form.Handle, FLASHW_ALL, count, 0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; FlashWindowEx(&lt;span class="kwrd"&gt;ref&lt;/span&gt; fi);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Start Flashing the specified Window (form)&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;form&amp;quot;&amp;gt;The Form (Window) to Flash.&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Start(System.Windows.Forms.Form form)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (Win2000OrLater)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASHWINFO fi = Create_FLASHWINFO(form.Handle, FLASHW_ALL, &lt;span class="kwrd"&gt;uint&lt;/span&gt;.MaxValue, 0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; FlashWindowEx(&lt;span class="kwrd"&gt;ref&lt;/span&gt; fi);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// Stop Flashing the specified Window (form)&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;form&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Stop(System.Windows.Forms.Form form)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (Win2000OrLater)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASHWINFO fi = Create_FLASHWINFO(form.Handle, FLASHW_STOP, &lt;span class="kwrd"&gt;uint&lt;/span&gt;.MaxValue, 0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; FlashWindowEx(&lt;span class="kwrd"&gt;ref&lt;/span&gt; fi);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// A boolean value indicating whether the application is running on Windows 2000 or later.&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Win2000OrLater&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get { &lt;span class="kwrd"&gt;return&lt;/span&gt; System.Environment.OSVersion.Version.Major &amp;gt;= 5; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
} 
&lt;/p&gt;
&lt;p&gt;
&lt;/div&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mf_u1FMSAIBXgfvHaF2w6oLvBio/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mf_u1FMSAIBXgfvHaF2w6oLvBio/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mf_u1FMSAIBXgfvHaF2w6oLvBio/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mf_u1FMSAIBXgfvHaF2w6oLvBio/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lPgiKS-mAuQ:EoR0oDXV_U4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lPgiKS-mAuQ:EoR0oDXV_U4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=lPgiKS-mAuQ:EoR0oDXV_U4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lPgiKS-mAuQ:EoR0oDXV_U4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=lPgiKS-mAuQ:EoR0oDXV_U4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/lPgiKS-mAuQ" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/01/26/CSharp-Flash-Window-in-Taskbar-via-Win32-FlashWindowEx.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/01/26/CSharp-Flash-Window-in-Taskbar-via-Win32-FlashWindowEx.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=bbbd744b-f793-45ce-9036-a6518b5f7db8</guid>
      <pubDate>Mon, 26 Jan 2009 23:19:00 -0500</pubDate>
      <category>C#</category>
      <category>Win32API</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=bbbd744b-f793-45ce-9036-a6518b5f7db8</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=bbbd744b-f793-45ce-9036-a6518b5f7db8</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/01/26/CSharp-Flash-Window-in-Taskbar-via-Win32-FlashWindowEx.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=bbbd744b-f793-45ce-9036-a6518b5f7db8</wfw:commentRss>
    </item>
    <item>
      <title>VEToolkit - Virtual Earth Toolkit v6.2.012509.1053 Released!</title>
      <description>&lt;p&gt;
This is the first official release of the &lt;a href="http://codeplex.com/VEToolkit"&gt;Virtual Earth Toolkit&lt;/a&gt;. The toolkit is by no means complete, but this is a &amp;quot;stable&amp;quot; collection of the Controls, Extenders and Methods that have been implemented thus far.
&lt;/p&gt;
&lt;p&gt;
Project: &lt;a href="http://codeplex.com/VEToolkit" title="Virtual Earth Toolkit"&gt;http://codeplex.com/VEToolkit&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Download the Release: &lt;a href="http://www.codeplex.com/VEToolkit/Release/ProjectReleases.aspx"&gt;http://www.codeplex.com/VEToolkit/Release/ProjectReleases.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;What is the Virtual Earth Toolkit?&lt;/h3&gt;
&lt;p&gt;
&lt;em&gt;&lt;span&gt;The
Virtual Earth Toolkit is a set of JavaScript-based Controls/Tools that
Extend Virtual Earth with functionality that is commonly implemented,
but hasn&amp;#39;t been implemented within the Virtual Earth JavaScript Map
Control.&lt;br /&gt;
&lt;br /&gt;
The Controls/Tools in the VEToolkit library are
completely self contained, and don&amp;#39;t require the use of any other
JavaScript library to use other than Virtual Earth 6.2 (current
version). This allows you to use this toolkit along-side any other
JavaScript library (jQuery, ASP.NET AJAX, etc.); plus you can make use
of it with any server-side framework of you choice (ASP.NET, ASP.NET
MVC, PHP, etc.).&lt;/span&gt;&lt;/em&gt; 
&lt;/p&gt;
&lt;h3&gt;Features &lt;br /&gt;
&lt;/h3&gt;
&lt;p&gt;
Below is a summary of what&amp;#39;s included in this release:
&lt;/p&gt;
&lt;p&gt;
&lt;span&gt;
&lt;ul&gt;
	&lt;li&gt;Controls &lt;br /&gt;
	&lt;ul&gt;
		&lt;li&gt;VEToolkit.ShapeListControl
		&lt;ul&gt;
			&lt;li&gt;A simple control that displays a list of Shapes that are currently plotted on the VEMap.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Extenders
	&lt;ul&gt;
		&lt;li&gt;VEToolkit.ContextMenuExtender
		&lt;ul&gt;
			&lt;li&gt;This extends the VEMap with Context Menu (right click menu) support.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.DragShapeExtender
		&lt;ul&gt;
			&lt;li&gt;This extends the VEMap to allow the user to reposition Shapes by
			simply clicking and dragging them around the map. It also implements
			functionality that allows you (the programmer) to determine at runtime
			which Shapes are draggable.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.MiniMapExtender
		&lt;ul&gt;
			&lt;li&gt;This extends the VEMap with better MiniMap support; allowing the
			MiniMap to easily be positioned and aligned into any side/corner of the
			VEMap display.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Helper Methods
	&lt;ul&gt;
		&lt;li&gt;VEToolkit.LoadAPI
		&lt;ul&gt;
			&lt;li&gt;This methods allows you to easily load the Virtual Earth JavaScript API On-Demand at runtime.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.Drawing.DrawCircle
		&lt;ul&gt;
			&lt;li&gt;This method returns a collection of VELatLong objects that
			represent a Circle with a given radius surrounding a specific VELatLong
			center point.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.Math.CalculateBearing
		&lt;ul&gt;
			&lt;li&gt;This method calculates the bearing (in degrees) between two
			VELatLong coordinates. This can be used to calculate the direction an
			object is pointing or traveling.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.Math.CalculateInverseCoordinate
		&lt;ul&gt;
			&lt;li&gt;This method calculates the Inverse VELatLong coordinate for a given VELatLong coordinate. (Or opposite position on the globe)&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.Math.CalculateMidPoint
		&lt;ul&gt;
			&lt;li&gt;This method calculates the Mid Point (Center Point) in between two VELatLong coordinates.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.Math.GetPolygonCentroid
		&lt;ul&gt;
			&lt;li&gt;This method calculates the approximate Centroid (Center Point) of a Polygon.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;VEToolkit.Math.IsInPolygon
		&lt;ul&gt;
			&lt;li&gt;This method calculates whether a given VELatLong coordinate exists
			within a given Polygon made up of an Array/collection of VELatLong
			coordinates.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;h3&gt;JavaScript Intellisense&lt;br /&gt;
&lt;/h3&gt;
&lt;p&gt;
&lt;span&gt;The VEToolkit also includes full Visual Studio 2008 JavaScript Intellisense Support &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=VEToolkit&amp;amp;DownloadId=56200" alt="VEToolkit" /&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nrd6JV6Tia2DvNPxv9K_V4bwUEo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nrd6JV6Tia2DvNPxv9K_V4bwUEo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nrd6JV6Tia2DvNPxv9K_V4bwUEo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nrd6JV6Tia2DvNPxv9K_V4bwUEo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=9kjjqfPQiEI:VsGqApOVsVc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=9kjjqfPQiEI:VsGqApOVsVc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=9kjjqfPQiEI:VsGqApOVsVc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=9kjjqfPQiEI:VsGqApOVsVc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=9kjjqfPQiEI:VsGqApOVsVc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/9kjjqfPQiEI" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/01/25/VEToolkit-Virtual-Earth-Toolkit-v620125091053-Released.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/01/25/VEToolkit-Virtual-Earth-Toolkit-v620125091053-Released.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=76ef247b-9a57-4577-b45e-34ebb506bdac</guid>
      <pubDate>Sun, 25 Jan 2009 11:56:00 -0500</pubDate>
      <category>Virtual Earth</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=76ef247b-9a57-4577-b45e-34ebb506bdac</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=76ef247b-9a57-4577-b45e-34ebb506bdac</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/01/25/VEToolkit-Virtual-Earth-Toolkit-v620125091053-Released.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=76ef247b-9a57-4577-b45e-34ebb506bdac</wfw:commentRss>
    </item>
  </channel>
</rss>
