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

<channel>
	<title>Jim Lynn</title>
	<atom:link href="http://jimlynn.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimlynn.wordpress.com</link>
	<description>Stuff I've learned. Stuff I think.</description>
	<lastBuildDate>Thu, 26 Jan 2012 15:18:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jimlynn.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Jim Lynn</title>
		<link>http://jimlynn.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jimlynn.wordpress.com/osd.xml" title="Jim Lynn" />
	<atom:link rel='hub' href='http://jimlynn.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Silverlight Grid Row Gradients</title>
		<link>http://jimlynn.wordpress.com/2010/07/01/silverlight-grid-row-gradients/</link>
		<comments>http://jimlynn.wordpress.com/2010/07/01/silverlight-grid-row-gradients/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 00:54:16 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=175</guid>
		<description><![CDATA[I just had to implement a design where a table of data, in Silverlight, had to have cell backgrounds where each cell is slightly darker than the cell above. Here it is in situ: As you can see, not only does each row have a descending gradient, but each column has a different gradient. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=175&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just had to implement a design where a table of data, in Silverlight, had to have cell backgrounds where each cell is slightly darker than the cell above. Here it is<em> in situ</em>:</p>
<p><a href="http://jimlynn.files.wordpress.com/2010/06/gridgradient.png"><img class="aligncenter size-full wp-image-177" title="gridgradient" src="http://jimlynn.files.wordpress.com/2010/06/gridgradient.png" alt="" width="344" height="240" /></a></p>
<p>As you can see, not only does each row have a descending gradient, but each column has a different gradient.</p>
<h3>The easy way</h3>
<p>The simple way is to just put in a border or background rectangle into each cell. This is what I did originally. But it&#8217;s a lot of work no matter how you do it. Neither Blend nor Visual Studio lend themselves to this kind of thing, and even hand-editing the Xaml can lead to cut&amp;paste errors.</p>
<h3>The even easier way</h3>
<p>I decided to have some kind of automated way to do this. I needed something that you could call that would put in the right rectangles in the right places with the right colours but was easy to manage, so I wrote a behavior. If you&#8217;re unfamiliar with Silverlight Behaviors (apologies for the American spelling, but that&#8217;s what they&#8217;re called) then <a href="http://electricbeach.org/?p=147">read this post by Christian Schormann from the Blend team</a>.</p>
<p>I realised that all I needed was something where I can specify which column I&#8217;m interested in, and what the start and end colours are. So this is the code I came up with:</p>
<p><pre class="brush: csharp;">

/// &lt;summary&gt;
 /// A behaviour which targets a Grid to put background rectangles
 /// into column cells creating a gradient.
 /// &lt;/summary&gt;
 public class GridGradientBehavior : Behavior&lt;Grid&gt;
 {
   /// &lt;summary&gt;
   /// Somewhere to keep track of the items we've added to the grid
   /// &lt;/summary&gt;
   List&lt;Rectangle&gt; rectangles = new List&lt;Rectangle&gt;();

   /// &lt;summary&gt;
   /// Called when this behaviour is attached to the grid.
   /// &lt;/summary&gt;
   protected override void OnAttached()
   {
     base.OnAttached();

     /// Just in case, clear any rectangles we've already put in
     foreach (var rect in rectangles)
       {
         AssociatedObject.Children.Remove(rect);
       }
       rectangles.Clear();

       // Check the RowDefinitions. If there aren't any, just put in a single rectangle
       if (AssociatedObject.RowDefinitions == null
           || AssociatedObject.RowDefinitions.Count &lt;= 1)
       {
         InsertRectangle(new SolidColorBrush(StartColour), 0);
       }
       else
       {
         // We need to interpolate between the two colours. I make use
         // of the SolidColorBrushInterpolator from System.Windows.Controls.DataVisualization
         // since my project already uses the toolkit.
         var interpolator = new SolidColorBrushInterpolator();
         interpolator.From = StartColour;
         interpolator.To = EndColour;
         interpolator.DataMinimum = 0;
         interpolator.DataMaximum = AssociatedObject.RowDefinitions.Count - 1;
         for (int i = 0; i &lt; AssociatedObject.RowDefinitions.Count; i++)
         {
           InsertRectangle((Brush)interpolator.Interpolate(i),i);
         }
       }
     }

     /// &lt;summary&gt;
     /// For each grid row, insert a rectangle of the appropriate colour into the ]
     /// appropriate row and column slot.
     /// &lt;/summary&gt;
     /// &lt;param name=&quot;color&quot;&gt;The brush to use, interpolated between Start and End&lt;/param&gt;
     /// &lt;param name=&quot;i&quot;&gt;&lt;/param&gt;
     private void InsertRectangle(Brush color, int i)
     {
       Rectangle rect = new Rectangle();
       rect.HorizontalAlignment = HorizontalAlignment.Stretch;
       rect.VerticalAlignment = VerticalAlignment.Stretch;
       rect.Fill = color;
       Grid.SetRow(rect, i);
       Grid.SetColumn(rect, Column);

       // This should ensure these rectangles are behind everything else in the grid
       Canvas.SetZIndex(rect, -1);

       // and if it doesn't, we insert our rectangles at the lowest point
       // in the visual tree
       AssociatedObject.Children.Insert(0, rect);
       rectangles.Add(rect);
     }

     /// &lt;summary&gt;
     /// Called when the behavior detaches. Remove all our rectangles from
     /// the grid.
     /// &lt;/summary&gt;
     protected override void OnDetaching()
     {
       base.OnDetaching();
       foreach (var rect in rectangles)
       {
         AssociatedObject.Children.Remove(rect);
       }
       rectangles.Clear();
     }

     /// &lt;summary&gt;
     /// Dependency property telling us which column to apply this behaviour to
     /// &lt;/summary&gt;
     public int Column
     {
       get { return (int)GetValue(ColumnProperty); }
       set { SetValue(ColumnProperty, value); }
     }
     public static readonly DependencyProperty ColumnProperty =
       DependencyProperty.Register(&quot;Column&quot;, typeof(int), typeof(GridGradientBehavior),
         new PropertyMetadata(0));

     /// &lt;summary&gt;
     /// Dependency property for the start colour of our gradient
     /// &lt;/summary&gt;
     public Color StartColour
     {
       get { return (Color)GetValue(StartColourProperty); }
       set { SetValue(StartColourProperty, value); }
     }
     public static readonly DependencyProperty StartColourProperty =
       DependencyProperty.Register(&quot;StartColour&quot;, typeof(Color), typeof(GridGradientBehavior),
         new PropertyMetadata(Colors.White));

     /// &lt;summary&gt;
     /// Dependency property for the end colour of our gradient
     /// &lt;/summary&gt;
     public Color EndColour
     {
       get { return (Color)GetValue(EndColourProperty); }
       set { SetValue(EndColourProperty, value); }
     }
     public static readonly DependencyProperty EndColourProperty =
       DependencyProperty.Register(&quot;EndColour&quot;, typeof(Color), typeof(GridGradientBehavior),
         new PropertyMetadata(Colors.Black));

   }

</pre></pre>
<p>The easiest way to apply this to a grid is to drag and drop it from the Behaviors section of the Assets pane. Then set the three parameters (StartColour, EndColour and Column) as appropriate. If (as in my example) you have two columns you want this to affect, you ust have to drop a second behavior onto the same grid.</p>
<p>There are a million ways you might want to extend this - letting you style rows instead of columns, or changing the rectangle to a border and having the ability to define different borders for top and bottom for example. Or you could use this to do alternating row colours. There's quite a lot of scope for such a simple idea.</p>
<p>What I <em>really</em> want, though, is a way to get the same effect in an ItemsControl, but that's a whole different problem.</p>
<p>Feel free to use this if it's helpful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=175&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/07/01/silverlight-grid-row-gradients/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>

		<media:content url="http://jimlynn.files.wordpress.com/2010/06/gridgradient.png" medium="image">
			<media:title type="html">gridgradient</media:title>
		</media:content>
	</item>
		<item>
		<title>Are Videogames Art?</title>
		<link>http://jimlynn.wordpress.com/2010/06/11/are-videogames-art/</link>
		<comments>http://jimlynn.wordpress.com/2010/06/11/are-videogames-art/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 23:47:30 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=168</guid>
		<description><![CDATA[The film critic Roger Ebert states they are not, and can never be. Ignoring the fact that he doesn&#8217;t play games himself, so couldn&#8217;t possibly experience any engagement that might indicate whether he&#8217;s right or not, one of his main points is that their interactive nature precludes videogames from ever being art. Could a game [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=168&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The film critic Roger Ebert states <a title="Roger Ebert: Video Games Can Never Be Art" href="http://blogs.suntimes.com/ebert/2010/04/video_games_can_never_be_art.html">they are not, and can never be</a>. Ignoring the fact that he doesn&#8217;t play games himself, so couldn&#8217;t possibly experience any engagement that might indicate whether he&#8217;s right or not, one of his main points is that their interactive nature precludes videogames from ever being art. Could a game of Chess be considered art, he asks.</p>
<p>I think by making this assertion he&#8217;s actually missed something quite important, and to illustrate this, I have an example.</p>
<p><a href="http://jimlynn.files.wordpress.com/2010/06/bioshock.jpg"><img class="aligncenter size-full wp-image-169" title="bioshock" src="http://jimlynn.files.wordpress.com/2010/06/bioshock.jpg" alt="" width="400" height="186" /></a></p>
<p>In the game <em>Bioshock</em>, your character is exploring a beautiful art-deco underwater city, having pitched up there after a plane crash. <em><strong>Note: This will contain major spoilers for the game. Please don&#8217;t continue if you haven&#8217;t played it and intend to at some time &#8211; the revelations are worth discovering on your own.</strong></em></p>
<p>As you explore you (and the character you&#8217;re controlling) learn more about the city&#8217;s backstory, about the mysterious Andrew Ryan, who created the city, and about his social and biochemical attempts to create a perfect city.</p>
<p>The visual look of the game is fantastic, and wouldn&#8217;t disgrace any hollywood movie, but that&#8217;s not the reason I think it qualifies as art. Art isn&#8217;t about the quality of the rendering, or many modern artists wouldn&#8217;t qualify.</p>
<p>The true art in this game comes from its effect on you, the player (the audience, if you like) but I would argue that the effect it has on you is enhanced, rather than diminished, by the fact it is interactive. Here&#8217;s why.</p>
<p>Early on in the game, you meet a creepy little girl, known as a &#8216;Little Sister&#8217;. You learn that she&#8217;s been genetically engineered, and she stalks the city looking for dead people from whom she can extract a vital drug. The first time you meet one of these girls you&#8217;re told several things by the character who&#8217;s guiding your progress through the game:</p>
<ul>
<li>They aren&#8217;t really little girls, because they&#8217;ve been enetically engineered</li>
<li>The drug they extract is something you need to improve your abilities within the game</li>
<li>To get hold of that drug you have to kill the little girl</li>
</ul>
<p>At the same time, another character who you&#8217;ve never met before implores you not to harm the girl. She tells you:</p>
<ul>
<li>You don&#8217;t have to kill her &#8211; you can &#8216;rescue&#8217; her which frees her from the need to extract the drug</li>
<li>Rescuing her will still give you some of the drug she&#8217;s carrying, but not as much</li>
<li>If you rescue them, she will make sure you&#8217;re rewarded later (although she doesn&#8217;t specify how)</li>
</ul>
<p>So as a player you have a clear choice: Kill what looks like a little girl for an instant reward, or rescue her, and hope that your future reward is worth it. Your ability to progress in the game wight well be affected by your decision &#8211; the game involves various weapons and abilities, some of which can become more powerful the more of the drug you get.</p>
<p>Now obviously, this is a game, a fairly violent one where you&#8217;ve already been killing plenty of other characters (think of &#8216;fast zombies&#8217; from 28 days later for the kinds of enemies you have to kill) but this choice your given is very different. The game designers have very deliberately chosen to make these characters little girls, then offered you this choice of ways to play the game. (I don&#8217;t think you can also choose to do neither &#8211; to move past this point in the game, I think you have to choose, but later in the game you could choose to ignore the girls. But you have to make the choice at least once).</p>
<p>So as you play the rest of the game, each time you encounter a little sister, you make the same choice. When I played it, I always chose to rescue them.</p>
<p>The important thing here is that your choice has a profound effect on the ending of the game, which I&#8217;ll come to in a moment.</p>
<p>Much later in the game, <a title="Andrew Ryan Plot Twist" href="http://www.youtube.com/watch?v=qDcY-z2bi-8">there is a significant twist</a>. You confront Andrew Ryan, and he reveals that the character you are playing as was actually born in the city, and was psychologically engineered to be controlled by a key phrase, and has been controlled by the character in the game who has, up to this point, been guiding you around the city, telling you where to go and what to do.</p>
<p>Then Ryan orders you to kill himself. With a golf club.</p>
<p>Which you do.</p>
<p>This is a fairly shocking moment, but interestingly, one over which you have no choice. The game is in a &#8216;cut scene&#8217; at this point, and you have no control over what happens. Andrew Ryan is killed, by you, and you can&#8217;t stop it happening.</p>
<p>The first time I played this I thought I&#8217;d acidentally hit the &#8216;Fire&#8217; button, and was horrified. I reloaded the game from an earlier point to check, but it all still happened the same way.</p>
<p>This is the first point in the game where I think the fact it&#8217;s a game <em>makes</em> it art. We&#8217;re used to killing or destroying things and people in games. But at this point, the designers chose not to give you a choice. The narrative happens regardless, and yet you feel shocked and culpable. This is a reaction which is <em>amplified</em> by it being a game. If you were seeing the same story play out in a linear form, it would still be a shocking moment, but your emotional reaction to it would be less. Or at least, different.</p>
<p>This is an example of being art <em>because</em> it&#8217;s a game, not despite.</p>
<p>And the second example, from the same game, is the ending.</p>
<p>Having killed Ryan, your game character is eventually freed from the psychological influence of Ryan&#8217;s nemesis, Frank Fontaine, and the last section requires you to fight him and kill him. Frankly, this is a typical &#8216;End of game Boss Level&#8217; &#8211; you confront someone stronger than anyone you&#8217;ve previously encountered, and have to defeat them to complete the game. This is a convention of video games, almost like the ride into the sunset in cowboy movies, and is nothing remarkable until you finally overpower him. You then get the endgame.</p>
<p>And it&#8217;s different, depending on that choice you made early in the game. If you chose to rescue the little sisters, <a title="Bioshock endings" href="http://www.youtube.com/watch?v=f3nBbo-uyZo">the game shows you one ending</a>. After they&#8217;ve helped you kill Fontaine, one of the sisters approaches you, handing you something, and the following narration is spoken by the female doctor who looked after the sisters:</p>
<blockquote><p>They offered you their city.</p>
<p>And you refused it.</p>
<p>And what did you do instead?</p>
<p>What I have come to expect of you.</p>
<p>You saved them.</p>
<p>You gave them the one thing that was stolen from them: A chance.</p>
<p>A chance to learn. To find love. To live.</p>
<p>And in the end what was your reward?</p>
<p>You never said, but I think I know.</p>
<p>A family.</p></blockquote>
<p>It&#8217;s quite beautiful. I&#8217;m not ashamed to say, I cried at that ending. Someone once said that games could not be classed as art until you truly care about the characters, in which case, job done.</p>
<p>But I think this offers something slightly deeper. Because this ending is a <em>direct response</em> to your behaviour during the game. You only get this ending if you rescued the little sisters. You get a different ending (see previous link) if you harvested them, a far more prosaic ending (in my view).</p>
<p>But the truly interesting thing is that that happy ending is your &#8216;reward&#8217;. You&#8217;ve earned it. The game gives you this emotional response because of the way you&#8217;ve played it. No linear art form could do this &#8211; it&#8217;s only possible <em>because</em> a game is a thing to be played.</p>
<p>And that is why games can truly be art. Because they have a wholly unique way to affect you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=168&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/06/11/are-videogames-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>

		<media:content url="http://jimlynn.files.wordpress.com/2010/06/bioshock.jpg" medium="image">
			<media:title type="html">bioshock</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight Top Tip: Startup page for Navigation Apps</title>
		<link>http://jimlynn.wordpress.com/2010/05/21/silverlight-top-tip-startup-page-for-navigation-apps/</link>
		<comments>http://jimlynn.wordpress.com/2010/05/21/silverlight-top-tip-startup-page-for-navigation-apps/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:51:06 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=163</guid>
		<description><![CDATA[If you&#8217;re working on a Silverlight Navigation Framework application, you&#8217;ll often want to debug a specific page, rather than always start at your home page and navigate to it. My previous solution was just to edit the Source attribute in the Frame, setting it to the initial Url I wanted. But this is dodgy, as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=163&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re working on a Silverlight Navigation Framework application, you&#8217;ll often want to debug a specific page, rather than always start at your home page and navigate to it.</p>
<p>My previous solution was just to edit the Source attribute in the Frame, setting it to the initial Url I wanted. But this is dodgy, as if you forget to reset it before doing a release, your customers will end up confused.</p>
<p>The better way, which has only just occurred to me, is to change the default startup path in the associated Web application. In the Properties for your web application, choose the Web section, then edit the Start Action section, choose &#8216;Specific Page&#8217; then edit the url. By default (in my app at least) it&#8217;s just set to the html page. I changed it like this:</p>
<p><a href="http://jimlynn.files.wordpress.com/2010/05/startup.png"><img class="aligncenter size-full wp-image-164" title="startup" src="http://jimlynn.files.wordpress.com/2010/05/startup.png" alt="Add #/&lt;url&gt; to your Specific Page url" width="565" height="121" /></a>And my app now starts up on the Advanced page.Just add whatever you want your initial start parameters to be &#8211; you can include query string params or anything else that would make a valid url.</p>
<p>Much safer.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=163&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/05/21/silverlight-top-tip-startup-page-for-navigation-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>

		<media:content url="http://jimlynn.files.wordpress.com/2010/05/startup.png" medium="image">
			<media:title type="html">startup</media:title>
		</media:content>
	</item>
		<item>
		<title>Why does Visual Studio always break on user-handled exceptions?</title>
		<link>http://jimlynn.wordpress.com/2010/04/15/why-does-visual-studio-always-break-on-user-handled-exceptions/</link>
		<comments>http://jimlynn.wordpress.com/2010/04/15/why-does-visual-studio-always-break-on-user-handled-exceptions/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 10:59:26 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=157</guid>
		<description><![CDATA[I&#8217;ve been suffering this for ages. I can&#8217;t believe it&#8217;s taken this long to find the simple answer. Does your Debug-&#62;Exceptions dialog box look like this? Mine does. And when you want to debug and catch your exceptions in Silverlight, you have to check the &#8216;Thrown&#8217; box next to Common Language Runtime Exceptions. Easy. Except [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=157&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been suffering this for ages. I can&#8217;t believe it&#8217;s taken this long to find the simple answer.</p>
<p>Does your Debug-&gt;Exceptions dialog box look like this?</p>
<p><a href="http://jimlynn.files.wordpress.com/2010/04/debugbefore.png"><img class="alignnone size-full wp-image-158" title="debugbefore" src="http://jimlynn.files.wordpress.com/2010/04/debugbefore.png" alt="" width="623" height="321" /></a></p>
<p>Mine does. And when you want to debug and catch your exceptions in Silverlight, you have to check the &#8216;Thrown&#8217; box next to Common Language Runtime Exceptions. Easy.</p>
<p>Except that now, the debugger will break on <em>every single exception</em> thrown while your app is running. Not just exceptions in your code that you&#8217;re not handling, but exceptions in the framework too. These are perfectly normal, and are all handled, but they are being caught before any handling code is executed.</p>
<p>This is particularly annoying when doing WebClient operations, or using Isolated Storage. You often get exceptions thrown when using these features, which are always handled before your code even sees them, but the debugger catches them anyway and stops.</p>
<p>I <em>knew</em> there was a way around this, because I&#8217;d seen it on other installations of Visual Studio. This is what the Exceptions dialog <em>could</em> look like:</p>
<p><a href="http://jimlynn.files.wordpress.com/2010/04/debugafter.png"><img class="alignnone size-full wp-image-159" title="debugafter" src="http://jimlynn.files.wordpress.com/2010/04/debugafter.png" alt="" width="623" height="321" /></a></p>
<p>With this, the debugger will only break on exceptions that aren&#8217;t handled elsewhere in your app. Which is what you usually want. I knew this option existed, but my Bing-Fu failed me, and I couldn&#8217;t find how to enable it. (Partly because I couldn&#8217;t remember what the extra column was called &#8211; if you search for user-unhandled you can find the answer).</p>
<p>You enable it in the Tools-&gt;Options dialog, in the Debugging section:</p>
<p><a href="http://jimlynn.files.wordpress.com/2010/04/toolsoptions.png"><img class="alignnone size-full wp-image-160" title="toolsoptions" src="http://jimlynn.files.wordpress.com/2010/04/toolsoptions.png" alt="" width="644" height="382" /></a></p>
<p>Just check &#8216;Enable Just My Code (Managed only)&#8217; and magically, the Debug-&gt;Exceptions dialog will light up with the User-unhandled column.</p>
<p>I wish I knew this months ago.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=157&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/04/15/why-does-visual-studio-always-break-on-user-handled-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>

		<media:content url="http://jimlynn.files.wordpress.com/2010/04/debugbefore.png" medium="image">
			<media:title type="html">debugbefore</media:title>
		</media:content>

		<media:content url="http://jimlynn.files.wordpress.com/2010/04/debugafter.png" medium="image">
			<media:title type="html">debugafter</media:title>
		</media:content>

		<media:content url="http://jimlynn.files.wordpress.com/2010/04/toolsoptions.png" medium="image">
			<media:title type="html">toolsoptions</media:title>
		</media:content>
	</item>
		<item>
		<title>Expression Blend 3 and Visual Studio 2010 RC</title>
		<link>http://jimlynn.wordpress.com/2010/03/06/expression-blend-3-and-visual-studio-2010-rc/</link>
		<comments>http://jimlynn.wordpress.com/2010/03/06/expression-blend-3-and-visual-studio-2010-rc/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 12:31:30 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=151</guid>
		<description><![CDATA[I installed VS2010 RC several weeks ago, and I&#8217;m now using it as my principal Silverlight dev environment. However, the sacrifice I made was that I could no longer use Blend 3 on my Silverlight 3 projects because the solution version number had changed. I was wrong. True, when you load your solution into Blend, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=151&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I installed VS2010 RC several weeks ago, and I&#8217;m now using it as my principal Silverlight dev environment. However, the sacrifice I made was that I could no longer use Blend 3 on my Silverlight 3 projects because the solution version number had changed.</p>
<p>I was wrong.</p>
<p>True, when you load your solution into Blend, it <em>does</em> complain that it&#8217;s a newer version, and <em>might</em> not work, but if you continue, Blend <em>will</em> successfully load a Silverlight 3 project. I tried two different projects, one which had been converted from VS2008 to VS2010 &#8211; which loaded properly &#8211; and one which I had created from scratch in VS2010. This one failed to load the web project, probably because VS2010 had created a .NET 4 web project, which Blend can&#8217;t load. But since Blend doesn&#8217;t care about the web project, this wouldn&#8217;t prove a problem.</p>
<p>So that&#8217;s useful &#8211; I can now use Blend again without resorting to weird hackery.</p>
<p>Of course, in just over a week, we might well have new versions of all the Silveright tools, as Mix10 opens in Las Vegas (I&#8217;ll be there!) and, if Microsoft follow their usual pattern, they&#8217;ll announce Silverlight 4 RTW. I think a lot of people will be disappointed if the tools aren&#8217;t available as soon as the announcement happens, although it won&#8217;t coincide with the RTM of Visual Studio 2010, because that launch isn&#8217;t scheduled until April (and that&#8217;s a launch, not necessarily the RTM date).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=151&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/03/06/expression-blend-3-and-visual-studio-2010-rc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>
	</item>
		<item>
		<title>InvalidOperation_EnumFailedVersion when binding data to a Silverlight Chart</title>
		<link>http://jimlynn.wordpress.com/2010/02/22/invalidoperation_enumfailedversion-when-binding-data-to-a-silverlight-chart/</link>
		<comments>http://jimlynn.wordpress.com/2010/02/22/invalidoperation_enumfailedversion-when-binding-data-to-a-silverlight-chart/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:41:52 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=148</guid>
		<description><![CDATA[This one was a pain. We&#8217;re releasing an analytics application in Silverlight to people inside the BBC. Today is release day, and we had some last-minute tweaks we wanted to roll out. Unfortunately, some of our customers were reporting a strange error when they tried this new version. [InvalidOperation_EnumFailedVersion] Arguments: Debugging resource strings are unavailable. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=148&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This one was a pain.</p>
<p>We&#8217;re releasing an analytics application in Silverlight to people inside the BBC. Today is release day, and we had some last-minute tweaks we wanted to roll out. Unfortunately, some of our customers were reporting a strange error when they tried this new version.</p>
<p><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-GB X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-alt:"Calisto MT"; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-alt:"Century Gothic"; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin;} a:link, span.MsoHyperlink 	{mso-style-noshow:yes; 	mso-style-priority:99; 	color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{mso-style-noshow:yes; 	mso-style-priority:99; 	color:purple; 	mso-themecolor:followedhyperlink; 	text-decoration:underline; 	text-underline:single;} p 	{mso-style-noshow:yes; 	mso-style-priority:99; 	mso-margin-top-alt:auto; 	margin-right:0cm; 	mso-margin-bottom-alt:auto; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]--></p>
<p>[InvalidOperation_EnumFailedVersion]<br />
Arguments:<br />
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See <a href="http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=3.0.40723.0&amp;File=mscorlib.dll&amp;Key=InvalidOperation_EnumFailedVersion">http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=3.0.40723.0&amp;File=mscorlib.dll&amp;Key=InvalidOperation_EnumFailedVersion</a></p>
<p>Nice.</p>
<p>I could identify roughly where it was coming from from the stack trace, but the real pain was, this didn&#8217;t happen on my development machine, nor on any other machine in our immediate vicinity. But it happened on the machines of both our main stakeholders.</p>
<p>We narrowed it down to the version of the runtime. All the errors were happening on machines with version 3.0.40723.0 while I was running 3.0.40818.0 (and others in my department were running an even newer version).</p>
<p>The problem happened when binding data to a Silverlight Toolkit chart. It worked fine when using a pie chart, but we&#8217;d changed that chart to be a bar chart, which is when the errors appeared. Playing with it, Pie Charts work fine but Line, Bar or Column charts would throw this error.</p>
<p>The stack trace showed a lot of <!--[if gte mso 9]&gt;  Normal 0     false false false  EN-GB X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--> &lt;!&#8211;  /* Font Definitions */  @font-face 	{font-family:&#8221;Cambria Math&#8221;; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-alt:&#8221;Calisto MT&#8221;; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-alt:&#8221;Century Gothic&#8221;; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:&#8221;"; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&#8221;Times New Roman&#8221;,&#8221;serif&#8221;; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&#8221;Times New Roman&#8221;; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} &#8211;&gt; <!--[if gte mso 10]&gt;--><br />
 /* Style Definitions */<br />
 table.MsoNormalTable<br />
	{mso-style-name:&#8221;Table Normal&#8221;;<br />
	mso-tstyle-rowband-size:0;<br />
	mso-tstyle-colband-size:0;<br />
	mso-style-noshow:yes;<br />
	mso-style-priority:99;<br />
	mso-style-qformat:yes;<br />
	mso-style-parent:&#8221;";<br />
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
	mso-para-margin:0cm;<br />
	mso-para-margin-bottom:.0001pt;<br />
	mso-pagination:widow-orphan;<br />
	font-size:11.0pt;<br />
	font-family:&#8221;Calibri&#8221;,&#8221;sans-serif&#8221;;<br />
	mso-ascii-font-family:Calibri;<br />
	mso-ascii-theme-font:minor-latin;<br />
	mso-fareast-font-family:&#8221;Times New Roman&#8221;;<br />
	mso-fareast-theme-font:minor-fareast;<br />
	mso-hansi-font-family:Calibri;<br />
	mso-hansi-theme-font:minor-latin;}<br />
 <span style="font-size:12pt;font-family:&quot;">OnAncestorDataContextChanged and </span><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-GB X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--> &lt;!&#8211;  /* Font Definitions */  @font-face 	{font-family:&#8221;Cambria Math&#8221;; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-alt:&#8221;Calisto MT&#8221;; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-alt:&#8221;Century Gothic&#8221;; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:&#8221;"; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&#8221;Times New Roman&#8221;,&#8221;serif&#8221;; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&#8221;Times New Roman&#8221;; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} &#8211;&gt; <!--[if gte mso 10]&gt;--><br />
 /* Style Definitions */<br />
 table.MsoNormalTable<br />
	{mso-style-name:&#8221;Table Normal&#8221;;<br />
	mso-tstyle-rowband-size:0;<br />
	mso-tstyle-colband-size:0;<br />
	mso-style-noshow:yes;<br />
	mso-style-priority:99;<br />
	mso-style-qformat:yes;<br />
	mso-style-parent:&#8221;";<br />
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
	mso-para-margin:0cm;<br />
	mso-para-margin-bottom:.0001pt;<br />
	mso-pagination:widow-orphan;<br />
	font-size:11.0pt;<br />
	font-family:&#8221;Calibri&#8221;,&#8221;sans-serif&#8221;;<br />
	mso-ascii-font-family:Calibri;<br />
	mso-ascii-theme-font:minor-latin;<br />
	mso-fareast-font-family:&#8221;Times New Roman&#8221;;<br />
	mso-fareast-theme-font:minor-fareast;<br />
	mso-hansi-font-family:Calibri;<br />
	mso-hansi-theme-font:minor-latin;}<br />
 <span style="font-size:12pt;font-family:&quot;">NotifyDataContextChanged event handling before the error hit. The binding wasn&#8217;t complex. I&#8217;d set the chart&#8217;s DataContext to a list of keyvalue pairs, and set the BarSeries ItemsSource property to {Binding Mode=OneWay}.</span></p>
<p><span style="font-size:12pt;font-family:&quot;">To fix this (well, work around it, really) I stopped setting the DataContext of the chart in the code altogether, and in place of that, set the ItemsSource property of the BarSeries directly to the list of pairs. This worked fine, and seemed to avoid the error.</span></p>
<p><span style="font-size:12pt;font-family:&quot;">The <em>really</em> mysterious thing is why we never come across issues like this until we&#8217;re actually launching it? There&#8217;s clearly a Universal law at work.<br />
</span></p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:0;width:1px;height:1px;"><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-GB X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-alt:"Calisto MT"; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-alt:"Century Gothic"; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin;} a:link, span.MsoHyperlink 	{mso-style-noshow:yes; 	mso-style-priority:99; 	color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{mso-style-noshow:yes; 	mso-style-priority:99; 	color:purple; 	mso-themecolor:followedhyperlink; 	text-decoration:underline; 	text-underline:single;} p 	{mso-style-noshow:yes; 	mso-style-priority:99; 	mso-margin-top-alt:auto; 	margin-right:0cm; 	mso-margin-bottom-alt:auto; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]-->[InvalidOperation_EnumFailedVersion]<br />
Arguments:<br />
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See <a href="http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=3.0.40723.0&amp;File=mscorlib.dll&amp;Key=InvalidOperation_EnumFailedVersion">http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=3.0.40723.0&amp;File=mscorlib.dll&amp;Key=InvalidOperation_EnumFailedVersion</a></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=148&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/02/22/invalidoperation_enumfailedversion-when-binding-data-to-a-silverlight-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8216;Cannot register duplicate name &#8216;XXX&#8217; in this scope&#8217; in VS 2010</title>
		<link>http://jimlynn.wordpress.com/2010/02/12/cannot-register-duplicate-name-xxx-in-this-scope-in-vs-2010/</link>
		<comments>http://jimlynn.wordpress.com/2010/02/12/cannot-register-duplicate-name-xxx-in-this-scope-in-vs-2010/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 20:28:46 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=143</guid>
		<description><![CDATA[Here&#8217;s a gotcha that was puzzling me yesterday. I&#8217;ve just installed Visual Studio 2010 RC, and was trying it out on my current project. It&#8217;s a Silverlight Navigation-style project, but that&#8217;s not important to the bug. I found one page where the Xaml designer wouldn&#8217;t handle the page properly &#8211; it was throwing exceptions, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=143&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a gotcha that was puzzling me yesterday.</p>
<p>I&#8217;ve just installed Visual Studio 2010 RC, and was trying it out on my current project. It&#8217;s a Silverlight Navigation-style project, but that&#8217;s not important to the bug.</p>
<p>I found one page where the Xaml designer wouldn&#8217;t handle the page properly &#8211; it was throwing exceptions, and the editor was showing an error in the Xaml. The line looked like this:</p>
<p><pre class="brush: xml;">

&lt;local:SimpleConverter x:Name=&quot;SimpleConverter&quot;/&gt;

</pre></p>
<p>This is a value converter, designed to convert bindings from one type to another. The error it was showing was &#8216;Cannot register duplicate name &#8216;SimpleConverter&#8217; in this scope&#8217;. This foxed me for a while &#8211; I thought perhaps because I was throwing exceptions when I didn&#8217;t recognise the type being converted, but even removing that and simplifying didn&#8217;t remove the error.</p>
<p>Then I noticed the key word in the error message: &#8216;Name&#8217;.</p>
<p>In Xaml you can use x:Name if you want something in the Xaml linked up to a class variable in your code-behind. But that was clearly causing issues with whatever the designer was doing behind the scenes. However, if you don&#8217;t need code-behind access (as I don&#8217;t in this case) you can use x:Key &#8211; and that&#8217;s the usual mechanism for naming resources.</p>
<p>Changing the resource to:</p>
<p><pre class="brush: xml;">

&lt;local:SimpleConverter x:Key=&quot;SimpleConverter&quot;/&gt;

</pre></p>
<p>then the errors from the visual designer stop happening.</p>
<p>Of course, I&#8217;ve no idea if the errors are a bug in the designer, or if it&#8217;s just wrong to use x:Name in resources, but since I didn&#8217;t need the autowiring up of objects, it&#8217;s no problem to change it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=143&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/02/12/cannot-register-duplicate-name-xxx-in-this-scope-in-vs-2010/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>
	</item>
		<item>
		<title>My Presentation to the Bing Maps UK User Group</title>
		<link>http://jimlynn.wordpress.com/2010/01/29/my-presentation-to-the-bing-maps-uk-user-group/</link>
		<comments>http://jimlynn.wordpress.com/2010/01/29/my-presentation-to-the-bing-maps-uk-user-group/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 15:46:32 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=137</guid>
		<description><![CDATA[Here&#8217;s the video of my presentation to the first Bing Maps UK User Group earlier this month. There&#8217;s a short piece missing during the Ambleside walking demo, which is a shame, but otherwise it&#8217;s fine. Sorry about saying &#8216;umm&#8217; a lot.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=137&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the video of my presentation to the first Bing Maps UK User Group earlier this month. There&#8217;s a short piece missing during the Ambleside walking demo, which is a shame, but otherwise it&#8217;s fine.</p>
<p>Sorry about saying &#8216;umm&#8217; a lot.</p>
<p><a href="http://exposureroom.com/members/earthware/784d6c4b204e4cb1bcde7ffb1e0e330b/" target="_blank"><img src="http://exposureroom.com/getassetthumbnailimage.aspx?id=784d6c4b204e4cb1bcde7ffb1e0e330b&amp;size=md" border="0" alt="Click Here to View The Video Titled: UK Bing Maps User Group Meeting #1 : Video #2" title="Click Here to View The Video Titled: UK Bing Maps User Group Meeting #1 : Video #2" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=137&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2010/01/29/my-presentation-to-the-bing-maps-uk-user-group/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>

		<media:content url="http://exposureroom.com/getassetthumbnailimage.aspx?id=784d6c4b204e4cb1bcde7ffb1e0e330b&#38;size=md" medium="image">
			<media:title type="html">Click Here to View The Video Titled: UK Bing Maps User Group Meeting #1 : Video #2</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight 4 Beta Released</title>
		<link>http://jimlynn.wordpress.com/2009/11/19/silverlight-4-beta-released/</link>
		<comments>http://jimlynn.wordpress.com/2009/11/19/silverlight-4-beta-released/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 00:30:03 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=134</guid>
		<description><![CDATA[As I was expecting, Scott Guthrie presented the Beta of Silverlight 4 at PDC today. The number of new features it offers is fairly impressive, some of which appear to enable some really exciting possiblities, although playing with the beta bits, there are a few important restrictions. Let&#8217;s look at some of the new features [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=134&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I was expecting, Scott Guthrie presented the Beta of Silverlight 4 at PDC today. The number of new features it offers is fairly impressive, some of which appear to enable some really exciting possiblities, although playing with the beta bits, there are a few important restrictions. Let&#8217;s look at some of the new features first.</p>
<ul>
<li>Printing support
<ul>
<li>Silverlight hasn&#8217;t had any real printing support. Silverlight 4 offers a Printing API, including print preview. This is pretty important for business apps, and will definitely be important for the things I&#8217;m currently working on.</li>
</ul>
</li>
<li>Rich Text Editing
<ul>
<li>Something that could be done by rolling your own editing, this will enable a lot of interesting applications. So many apps require rich text input, and this will be a great help</li>
</ul>
</li>
<li>Elevated Out of Browser
<ul>
<li>You can set your app to ask for &#8216;elevated&#8217; privileges, and then you get access to a lot more goodies &#8211; full keyboard in full screen, no cross-browser restrictions, more (but not unrestricted) access to the user&#8217;s filesystem</li>
</ul>
</li>
<li>WebBrowser control
<ul>
<li>lets you embed another web page in your silverlight app. This looks amazing, but there are some restrictions which might make it less useful. It only works in Out of Browser (for security), and loading HTML from any website requires elevated rights. But you can do things like use the browser output as a brush onto any elements. Scott demonstrated this by putting YouTube into an interactive jigsaw &#8211; a demo that I found particularly amusing, given that one of my first silverlight apps was a jigsaw. <a href="http://uslot.com/JigsawTestPage.html">Here&#8217;s the Silverlight 2 version.</a></li>
</ul>
</li>
<li>Webcam and microphone support &#8211; not something I desperately need, but it&#8217;s always been a top request</li>
<li>Clipboard support &#8211; something that almost works in SL3 but not in all browsers</li>
<li>Drag and drop support
<ul>
<li>this is something I&#8217;ve wanted for previous demos. Being able to drag &amp; drop pictures on the app is a lot better than having to fire up a Load dialog.</li>
</ul>
</li>
</ul>
<p>There&#8217;s an awful lot more in there, too. <a href="http://silverlight.net/getstarted/silverlight-4-beta/">Here&#8217;s the info on Silverlight.net</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=134&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2009/11/19/silverlight-4-beta-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>
	</item>
		<item>
		<title>Ordnance Survey maps in Bing Maps Silverlight control</title>
		<link>http://jimlynn.wordpress.com/2009/11/12/ordnance-survey-maps-in-bing-maps-silverlight-control/</link>
		<comments>http://jimlynn.wordpress.com/2009/11/12/ordnance-survey-maps-in-bing-maps-silverlight-control/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 00:44:43 +0000</pubDate>
		<dc:creator>jimlynn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jimlynn.wordpress.com/?p=131</guid>
		<description><![CDATA[The latest incarnation of Bing Maps (the web version) has the option of showing certain levels using Ordnance Survey mapping. This was of interest to me, because I&#8217;ve spent the last year working on prototypes of mapping applications using the Ordnance Survey 25k layer (the classic Rambling maps). Here&#8217;s an example. They&#8217;ve also just released [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=131&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The latest incarnation of Bing Maps (the web version) has the option of showing certain levels using Ordnance Survey mapping. This was of interest to me, because I&#8217;ve spent the last year working on prototypes of mapping applications using the Ordnance Survey 25k layer (the classic Rambling maps). <a href="http://www.bing.com/maps/?v=2&amp;cp=54.431681299114395~-2.96231746673584&amp;lvl=15&amp;sty=s&amp;eo=0&amp;where1=Ambleside%2C%20Cumbria">Here&#8217;s an example</a>.</p>
<p>They&#8217;ve also just released the <a href="http://www.bing.com/community/blogs/maps/archive/2009/11/09/bing-maps-silverlight-control-1-0-released.aspx">Silverlight Map Component</a> (which has been in CTP since March) as a V1.0 release. I&#8217;ve played quite a bit with the CTP, so I was interested to see how much it had changed. Turns out, not so much. My own OS map layer needed only a handful of changes, almost all around their (sensible) decision to remove the MapViewSpecification object (which made animating the map difficult, so it was good to see it go). But I also wanted to see if the Silverlight component could use the OS maps.</p>
<p>It doesn&#8217;t support them out of the box &#8211; the only modes offered are the standard RoadMode, and the two Aerial modes (with or without labels) so it&#8217;s necessary to roll your own.</p>
<p>The easiest way to put different tiles on the map is to create a custom TileLayer. All you really need to know, then, is how to construct the URL for the tiles you want.</p>
<h2>Where do you find the tiles?</h2>
<p>A little snooping is required. I fired up a browser, and a copy of <a href="http://www.fiddler2.com/fiddler2/">Fiddler</a> to watch the requests it was sending. For the OS map tiles, here&#8217;s what a typical URL looks like:</p>
<p>http://ecn.t3.tiles.virtualearth.net/tiles/r031313112303.png?g=41&#038;productSet=mmOS</p>
<p>This is a fairly typical tile Url. The long number in the name of the image is something called a QuadKey &#8211; a way to encode x, y and zoom values in a single value. <a href="http://msdn.microsoft.com/en-us/library/bb259689.aspx">Here&#8217;s a good explanation</a>. Luckily, the map control supplies a QuadKey object to do all the work.</p>
<p>To create a custom tile layer, here&#8217;s the code I used:</p>
<p><pre class="brush: csharp;">

public class OsTileSource : TileSource
 {
 public override Uri GetUri(int x, int y, int zoomLevel)
 {
 QuadKey key = new QuadKey(x, y, zoomLevel);
 // http://ecn.t3.tiles.virtualearth.net/tiles/r031313112303.png?g=41&amp;productSet=mmOS

 if (zoomLevel &lt; 12)
 {
 return new Uri(&quot;http://ecn.t2.tiles.virtualearth.net/tiles/r&quot; + key.Key + &quot;.png?g=373&amp;mkt=en-gb&amp;shading=hill&quot;, UriKind.Absolute);
 }
 else
 {
 return new Uri(&quot;http://ecn.t2.tiles.virtualearth.net/tiles/r&quot; + key.Key + &quot;.png?g=41&amp;productSet=mmOS&quot;, UriKind.Absolute);
 }
 }
 }
</pre></p>
<p>You&#8217;ll notice that I had to do something different with lower zoom levels. The OS maps only exist above level 12, so below that, I use the normal road tiles.</p>
<p>To use this in the map, here&#8217;s what you do:</p>
<p><pre class="brush: csharp;">

// Mercator mode means no underlying tiles
 map.Mode = new MercatorMode();
 MapTileLayer layer = new MapTileLayer();
 layer.TileSources.Add(new OsTileSource());
 map.Children.Add(layer);

</pre></p>
<p>And it all works fine.</p>
<p>Of course, this is probably breaking the Bing Maps terms, but only slightly, since the same maps are available in the Ajax component. I&#8217;m sure they&#8217;ll turn up officially in the Silverlight component at some point.</p>
<p><a href="http://uslot.com/NewBingTestPage.html">Here&#8217;s a live example</a>.</p>
<p>One final thought. It&#8217;s interesting that the Bing tiles are not the exact map tiles that the OS use. You can tell that by looking at the slightly lower zoom levels &#8211; the OS grid lines are not perpendicular. This is because the maps are originally projected onto the <a href="http://www.ordnancesurvey.co.uk/oswebsite/gps/information/coordinatesystemsinfo/guidetonationalgrid/page1.html">OS Grid Projection</a> (which is ideal for a country the size of the UK), while Bing maps uses a <a href="http://msdn.microsoft.com/en-us/library/cc749633.aspx">Mercator projection</a> (which is easier to manage for a world map). So for the Bing maps, the OS tiles have to be &#8216;crunched&#8217; to project them onto the Mercator projection, hence the non-perpendicular grid lines.</p>
<p>The <a href="http://openspace.ordnancesurvey.co.uk/openspace/">OS OpenSpace service</a> provides an uncrunched set of map tiles, although it looks like they miss out the really nice 25k layer, so it would probably be possible to use those tiles, but you&#8217;d have to do more work, because those tiles are in the OS Grid Projection, which isn&#8217;t compatible with the Mercator projection.</p>
<p>How much more work? That&#8217;s a subject for another post. I&#8217;ve done exactly that as part of my BBC prototypes, so I have a Bing Maps component working in OSGB coordinates, using uncrunched 25K imagery (<a href="http://jimlynn.wordpress.com/2009/02/12/wrangling-very-large-deep-zoom-images/">see this previous post</a> talking about the problems of hosting map tiles) but the project isn&#8217;t yet available for public consumption. However, I&#8217;m hoping to give a presentation on the subject at the first Bing Maps UK user group meeting in January, so do come along if you&#8217;re interested.</p>
<p>P.S. I did this code in Visual Studio 2010 Beta 2, and the Map component works, live, in the VS designer. As I typed values into the Xaml for the Center and ZoomLevel, the map animated smoothly to that location. Very cool indeed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jimlynn.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jimlynn.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jimlynn.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jimlynn.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jimlynn.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jimlynn.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jimlynn.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jimlynn.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jimlynn.wordpress.com&amp;blog=5325769&amp;post=131&amp;subd=jimlynn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jimlynn.wordpress.com/2009/11/12/ordnance-survey-maps-in-bing-maps-silverlight-control/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3051255a70864f51d794afb7a1495b32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jimlynn</media:title>
		</media:content>
	</item>
	</channel>
</rss>
