<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Gary Pretty's Blog</title>
	
	<link>http://blog.garypretty.co.uk</link>
	<description>.Net Development &amp; General Tech Related News</description>
	<lastBuildDate>Sat, 04 Feb 2012 00:32:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GaryPrettysBlog" /><feedburner:info uri="garyprettysblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Blend 4 Crashes on Launch (“Blend 4 has stopped working”)</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/jFdmuH0Yu34/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2011/10/05/blend-4-crashes-on-launch-blend-4-has-stopped-working/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 20:22:10 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[blend]]></category>
		<category><![CDATA[crash]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=305</guid>
		<description><![CDATA[I had some trouble today with Blend 4 which was continuously crashing on launch, even after an uninstall and re-install of the program. Thankfully, I found a very helpful forum post on MSDN which helped me fix the issue. I have recently installed the Developer Preview of Visual Studio 11 and it turns out that &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2011/10/05/blend-4-crashes-on-launch-blend-4-has-stopped-working/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I had some trouble today with Blend 4 which was continuously crashing on launch, even after an uninstall and re-install of the program.</p>
<p>Thankfully, I found a very helpful forum post on MSDN which helped me fix the issue.</p>
<p>I have recently installed the Developer Preview of Visual Studio 11 and it turns out that there are some compatibility issues with version 4.5 of the .Net Framework with this preview release.</p>
<p>In order to fix the issue you can run the following commands in your command prompt (don&#8217;t forget to run as an administrator);</p>
<p>The workaround is to run:<br />
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall &#8220;%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.Framework.dll&#8221;<br />
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall &#8220;%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.Blend.dll&#8221;<br />
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall &#8220;%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.Project.dll&#8221;</p>
<p>If &#8220;%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.WindowsPhone.dll&#8221; is present (for scenarios like Blend V4 SP1 or future releases), please also run:<br />
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall &#8220;%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.WindowsPhone.dll&#8221;</p>
<p>You can find the original post here&#8230;.. <a href="http://connect.microsoft.com/Expression/feedback/details/690246/blend-4-crashes-on-startup">http://connect.microsoft.com/Expression/feedback/details/690246/blend-4-crashes-on-startup</a></p>
<p><a href="http://connect.microsoft.com/Expression/feedback/details/690246/blend-4-crashes-on-startup"></a>Hope this helps some of you out if you are having the same problem.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.Net' rel='tag' target='_self'>.Net</a>, <a class='technorati-link' href='http://technorati.com/tag/blend' rel='tag' target='_self'>blend</a>, <a class='technorati-link' href='http://technorati.com/tag/crash' rel='tag' target='_self'>crash</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=jFdmuH0Yu34:JEaDGsrrW3Y:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=jFdmuH0Yu34:JEaDGsrrW3Y:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=jFdmuH0Yu34:JEaDGsrrW3Y:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/jFdmuH0Yu34" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2011/10/05/blend-4-crashes-on-launch-blend-4-has-stopped-working/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2011/10/05/blend-4-crashes-on-launch-blend-4-has-stopped-working/</feedburner:origLink></item>
		<item>
		<title>Telerik RadControls for Windows Phone 7 Giveaway!</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/CpkXW13q8WY/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2011/05/05/telerik-radcontrols-for-windows-phone-7-giveaway/#comments</comments>
		<pubDate>Thu, 05 May 2011 12:28:24 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Giveaways]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[givewaway]]></category>
		<category><![CDATA[telerik]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=296</guid>
		<description><![CDATA[Update: Entry for this contest has now closed and the winner will be announced here shortly! Recently I have been using the fantastic RadControls for Windows Phone 7 by Telerik in my work on Windows Phone 7 applications.  The toolkit has been built from the ground up to provide controls and capabilities that are not &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2011/05/05/telerik-radcontrols-for-windows-phone-7-giveaway/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.garypretty.co.uk/wp-content/telerik.png"><img class="alignright size-full wp-image-298" title="Telerik Windows Phone 7 RadControls" src="http://blog.garypretty.co.uk/wp-content/telerik.png" alt="" width="284" height="178" /></a></p>
<p><strong>Update: Entry for this contest has now closed and the winner will be announced here shortly!</strong></p>
<p>Recently I have been using the fantastic RadControls for Windows Phone 7 by Telerik in my work on Windows Phone 7 applications.  The toolkit has been built from the ground up to provide controls and capabilities that are not currently available as part of the OOTB Windows Phone tookit.</p>
<p>There are some great components to this collection, including the RadDataBoundListBox which according to Telerik is &#8220; the fastest version of the standard ListBox component&#8221;, which is a massive help when considering performance within your applications.  Having seen this control in action, I can honestlty say that it lives up to Telerik&#8217;s claims.  Other components include an Animation Framework, WrapPanel, DockPanel, Gauges and several other implementations of the ListBox.  For more information about the controls <a title="telerik windows phone 7 radcontrols" href="http://www.telerik.com/products/windows-phone.aspx" target="_blank">visit the Telerk RadControls for Windows Phone 7 page</a>.</p>
<p>This really is a great product and now you have a chance to win a copy for yourself .  To enter just do the following (a quick thank you here to <a href="http://michaelcrump.net" target="_blank">Michael Crump</a> for starting his competitions as this prompted me to do this contest! <a href="http://michaelcrump.net" target="_blank">Check out his blog</a> if you haven&#8217;t already&#8230;it&#8217;s great!);</p>
<ol>
<li><del>Follow me on Twitter <a href="http://www.twitter.com/garypretty" target="_blank">@garypretty</a> and follow Telerik <a href="http://www.twitter.com/radcontrols" target="_blank">@RadControls</a></del></li>
<li><del>Leave a comment on this post using a valid email address (these details will not be passed on to anybody!!).</del></li>
<li><del>Tweet the following &#8220;I entered to win a copy of the awesome @Telerik Windows Phone 7 @RadControls from @garypretty. Enter yourself here <a href="http://bit.ly/mAtgzF">http://bit.ly/mAtgzF</a> #WP7&#8243;</del></li>
</ol>
<p><strong> This contest is now over. Lookout for another one soon!</strong></p>
<p>That&#8217;s it! Pretty simple really and for those 3 simple steps you could win something great!</p>
<p>This will run for two weeks and the winner will be drawn on the 19th May 2011 and then announced on here shortly afterwards.  Good luck!</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/givewaway' rel='tag' target='_self'>givewaway</a>, <a class='technorati-link' href='http://technorati.com/tag/telerik' rel='tag' target='_self'>telerik</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows+Phone+7' rel='tag' target='_self'>Windows Phone 7</a>, <a class='technorati-link' href='http://technorati.com/tag/WP7' rel='tag' target='_self'>WP7</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=CpkXW13q8WY:bS6nJnvqzuM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=CpkXW13q8WY:bS6nJnvqzuM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=CpkXW13q8WY:bS6nJnvqzuM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/CpkXW13q8WY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2011/05/05/telerik-radcontrols-for-windows-phone-7-giveaway/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2011/05/05/telerik-radcontrols-for-windows-phone-7-giveaway/</feedburner:origLink></item>
		<item>
		<title>Using the RADJumpList from Telerik for Windows Phone 7</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/l0mEkHs8sz0/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2011/03/06/using-the-radjumplist-from-telerik-for-windows-phone-7/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 22:29:11 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[telerik]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=285</guid>
		<description><![CDATA[A while back I downloaded the preview of the RadControls for Windows Phone from Telerik, a new set of controls built from the ground up to make the lives of developers creating apps for the platform easier. The list of controls that are included in the impressive pack include a Data Bound List Box, Date &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2011/03/06/using-the-radjumplist-from-telerik-for-windows-phone-7/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<div><a href="http://blog.garypretty.co.uk/wp-content/jumplist.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; margin-bottom: 20px; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-right: 20px; padding-top: 0px" title="jumplist" border="0" alt="jumplist" src="http://blog.garypretty.co.uk/wp-content/jumplist_thumb.jpg" width="263" height="484" /></a>A while back I downloaded the preview of the <a href="http://www.telerik.com/products/windows-phone.aspx" target="_blank">RadControls for Windows Phone from Telerik</a>, a new set of controls built from the ground up to make the lives of developers creating apps for the platform easier. The list of controls that are included in the impressive pack include a Data Bound List Box, Date and Time Pickers, an Animation Framework and a Transition Control and this last week saw another beta release of the kit introducing more control goodness including the new Gauge control.</div>
<div>&#160;</div>
<div>I will be writing another post summarising the whole kit soon, but for now I just wanted to quickly introduce you to the RADJumpList control which I have had the pleasure of using as part of an app I am working on at the moment.</div>
<div>&#160;</div>
<div>The RADJumpList is essentially a list box control that allows grouping of its items in a snap and then allows the user to jump between groups easily.&#160; A good example of a situation where you might do this is for a phone book / contact list where the items are group by the first letter in the contacts name, and this sort of functionality can be seen in the Windows Phone 7 OS as part of the in built contacts list.&#160; However, grouping is not all that this control can do, as it also comes with built in support for sorting, filtering and great performance for the scrolling and display of the list right off the bat.</div>
<div>&#160;</div>
<div>The thing I like about this control is the fact that all of the above features are optional and can be used on their own or in conjunction with each other to get the experience that you want.&#160; As an example, you may want to simply have a list box that sorts its items for you and all you need to do to achieve this is to create a Sort Descriptor as seen in the code below;</div>
<div>&#160;</div>
<div class="csharpcode">
<pre class="alt">GenericSortDescriptor&lt;ItemModel, <span class="kwrd">string</span>&gt; sortByField =</pre>
<pre><span class="kwrd"><font color="#000000">    </font>new</span> GenericSortDescriptor&lt;ItemModel, <span class="kwrd">string</span>&gt;(item =&gt; item.itemField);</pre>
<pre class="alt">radJumpList.SortDescriptors.Add(sortByField);</pre>
</div>
<style type="text/css">
<p>.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; }</style>
<p>&#160;</p>
<p>Grouping and Filtering with the control is done in a similar fashion using Grouping and Filtering Descriptors.</p>
<p>With regards to the look and feel of the control, it is of course totally customisable using templates in the same way as you would with an ordinary list box using an ItemTemplate for your list items and then editing other templates to control the display of components such as the Group Picker and the Group Headers.</p>
<p>If the RADJumpList sounds like something you could use or would find useful then I would strongly recommend you <a href="http://www.telerik.com/products/windows-phone.aspx" target="_blank">download the tools from the Telerik web site</a> and check out the fantastic demo project included which features a full application for Windows Phone featuring all of the controls including the Jump List.&#160; Keep an eye on on my blog in the coming days and weeks for more info about the Telerik Windows Phone tools (and for anybody who is interested in Sharepoint as well I will be looking at Telerik’s latest offering for Sharepoint 2010).</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/telerik' rel='tag' target='_self'>telerik</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows+Phone+7' rel='tag' target='_self'>Windows Phone 7</a>, <a class='technorati-link' href='http://technorati.com/tag/WP7' rel='tag' target='_self'>WP7</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=l0mEkHs8sz0:YyuclY5lHnk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=l0mEkHs8sz0:YyuclY5lHnk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=l0mEkHs8sz0:YyuclY5lHnk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/l0mEkHs8sz0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2011/03/06/using-the-radjumplist-from-telerik-for-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2011/03/06/using-the-radjumplist-from-telerik-for-windows-phone-7/</feedburner:origLink></item>
		<item>
		<title>Christmas Presents App for Windows Phone 7</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/qiYAC39uiTA/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2010/10/16/christmas-presents-app-for-windows-phone-7/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 22:30:18 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=266</guid>
		<description><![CDATA[I have been incredibly busy the last few months and some of the things I have been working on are applications for Windows Phone 7. Today saw the publication of the first of my applications to the Windows Phone 7 marketplace, Christmas Presents. Christmas Presents is a simple but effective application that will allow you to manage all &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2010/10/16/christmas-presents-app-for-windows-phone-7/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I have been incredibly busy the last few months and some of the things I have been working on are applications for Windows Phone 7.</p>
<p>Today saw the publication of the first of my applications to the Windows Phone 7 marketplace, Christmas Presents.</p>
<p>Christmas Presents is a simple but effective application that will allow you to manage all of your Christmas shopping, ensuring that you stay on top of which presents you need to buy, who they are for and how much you are spending.</p>
<p>Currently features include</p>
<p>- A summary including the overall budget, remaining spend and a countdown to Christmas.<br />
- Individual budgets for each person.<br />
- Mark presents as purchsed and then wrapped.<br />
- Shopping list displaying all presents that haven&#8217;t been purchased yet.<br />
- Currency automatically matches your phone settings.</p>
<p>If you have the Zune client installed you can see the <a href="http://social.zune.net/redirect?type=phoneApp&amp;id=e6ae1eca-20d7-df11-a844-00237de2db9e">Christmas Presents app page here</a>.</p>
<p>Below are some screenshots of the application.  <strong>Please comments and let me know that you think and what features you would like to see included in future versions.</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<div id="attachment_273" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.garypretty.co.uk/wp-content/summary.png"><img class="size-full wp-image-273" title="Summary Screen" src="http://blog.garypretty.co.uk/wp-content/summary.png" alt="Summary Screen" width="300" height="500" /></a><p class="wp-caption-text">Summary Screen</p></div>
<div id="attachment_270" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.garypretty.co.uk/wp-content/peoplelist.png"><img class="size-full wp-image-270" title="People List" src="http://blog.garypretty.co.uk/wp-content/peoplelist.png" alt="People List" width="300" height="500" /></a><p class="wp-caption-text">People List</p></div>
<div id="attachment_271" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.garypretty.co.uk/wp-content/persondetails.png"><img class="size-full wp-image-271" title="Person Details" src="http://blog.garypretty.co.uk/wp-content/persondetails.png" alt="Person Details" width="300" height="500" /></a><p class="wp-caption-text">Person Details</p></div>
<div id="attachment_272" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.garypretty.co.uk/wp-content/shoppinglist.png"><img class="size-full wp-image-272" title="Shopping List" src="http://blog.garypretty.co.uk/wp-content/shoppinglist.png" alt="Shopping List" width="300" height="500" /></a><p class="wp-caption-text">Shopping List</p></div>
<p><strong><br />
<span style="font-weight: normal;">Again, please comment and let me know what you think and what features you would like to see in future versions.</span></strong></p>

<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=qiYAC39uiTA:rCe7RaBwxZs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=qiYAC39uiTA:rCe7RaBwxZs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=qiYAC39uiTA:rCe7RaBwxZs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/qiYAC39uiTA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2010/10/16/christmas-presents-app-for-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2010/10/16/christmas-presents-app-for-windows-phone-7/</feedburner:origLink></item>
		<item>
		<title>Bing Silverlight Control with the Bing Web Service Application</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/np7eekvnGMM/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2010/05/19/bing-silverlight-control-with-the-bing-web-service-application/#comments</comments>
		<pubDate>Wed, 19 May 2010 21:35:03 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[bing]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=260</guid>
		<description><![CDATA[After reading Carl Dickinson&#8217;s post on Mando Group Labs about the Bing Silverlight Control, I wanted to give it a try myself. I decided to set about using the Bing Silverlight control to display available hotels from LateRooms.com.  LateRooms.com have an affiliate scheme that exposes the availability of hotels via XML feeds (you do need &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2010/05/19/bing-silverlight-control-with-the-bing-web-service-application/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>After reading <a href="http://labs.mandogroup.com/programming/silverlight-and-bing-maps/">Carl Dickinson&#8217;s post</a> on Mando Group Labs about the <a href="http://labs.mandogroup.com/programming/silverlight-and-bing-maps/">Bing Silverlight Control</a>, I wanted to give it a try myself.</p>
<p>I decided to set about using the Bing Silverlight control to display available hotels from LateRooms.com.  LateRooms.com have an affiliate scheme that exposes the availability of hotels via XML feeds (you do need an affiliate ID to use the feeds but this could easily be replaced by any other similar feed).</p>
<p>You can <a href="http://www.garypretty.co.uk/bingmaps1/Default.aspx">view the sample app</a> I have created <a href="http://www.garypretty.co.uk/bingmaps1/Default.aspx">here</a> (note: LateRooms has mostly UK hotels so probably best trying a UK location, e.g. &#8220;Southport UK&#8221;). </p>
<p>To create the app I create added four controls to my page;  </p>
<ul>
<li>Bing Silverlight Control &#8211; This is obviously the main focus of the app.</li>
<li>A text box and a button to accept a location from the user and start the request to get the hotels.</li>
<li>A list box to display a picture, the name and the first line of the address for each of the hotels.</li>
</ul>
<p>Once the user enters a location into the text box and clicks the button the following happens;</p>
<ul>
<li>The location entered by the user is sent to the Bing Geocode web service and providing it can find a match it returns the lattitude and longitude for the location.</li>
<li>This map is then centred on this location.</li>
<li>Finally the newly returned coordinates are used to get a list of available hotels from the LateRooms XML feed. This list is then iterated through and a pin for each hotel is added to the map and the list is then bound to the list box.</li>
</ul>
<p>Finally I added an event handler to the selection changed event of the list box to re-centre the map on the coordinates of the selected hotel.</p>
<p>There is plently more that could be done with this app, not least making the UI a little more attractive, but I wanted to just get a feel of how easy it was to implement some basic Bing maps functionality in Silverlight.</p>
<p>If you are interested to see the source code to the application let me know and I can post it.  Right now I am off to try some more experiments!</p>
<p>Don&#8217;t forget if you liked this, subscribe to my RSS feed and / or follow my Twitter (links at the top of the page).</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/bing' rel='tag' target='_self'>bing</a>, <a class='technorati-link' href='http://technorati.com/tag/Silverlight' rel='tag' target='_self'>Silverlight</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=np7eekvnGMM:hEU1SdPthuM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=np7eekvnGMM:hEU1SdPthuM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=np7eekvnGMM:hEU1SdPthuM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/np7eekvnGMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2010/05/19/bing-silverlight-control-with-the-bing-web-service-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2010/05/19/bing-silverlight-control-with-the-bing-web-service-application/</feedburner:origLink></item>
		<item>
		<title>The Silverlight Masterclass!</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/K3621C_80bo/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2010/04/29/the-silverlight-masterclass/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 12:30:27 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=258</guid>
		<description><![CDATA[The Silverlight Tour comes to the UK – and it’s called the Masterclass! This 3 day hands-on training with both designer and developer tracks looks awesome and (uniquely) has two expert trainers per course.  Currently scheduled in London, Manchester, and the Midlands for June, all courses also come with the chance to win an xbox &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2010/04/29/the-silverlight-masterclass/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>The Silverlight Tour comes to the UK – and it’s called the Masterclass!</p>
<p>This 3 day hands-on training with both designer and developer tracks looks awesome and (uniquely) has <strong>two </strong>expert trainers per course. </p>
<p>Currently scheduled in London, Manchester, and the Midlands for June, all courses also come with the chance to win an xbox 360, and Silverlight Spy licences!</p>
<p>Early bird discount of £100 if you book in May, and if you are a member of #SLUGUK or #<a href="http://www.nxtgenug.net/" target="_blank">nxtgenug</a> there are additional discounts to be had.</p>
<p>Full Details are here: <a href="http://silverlightmasterclass.net/">http://silverlightmasterclass.net</a></p>
<p>In addition bbits are holding a raffle for a free ticket for the masterclass. To be eligible to win the ticket (worth £1095!) you MUST paste this text, including all links, into your blog and email <a href="mailto:Ian@bbits.co.uk">Ian@bbits.co.uk</a> with the url to the blog entry.  The draw will be made on June 1st and the winner informed by email and on <a href="http://silverlightmasterclass.net/">http://silverlightmasterclass.net</a></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Silverlight' rel='tag' target='_self'>Silverlight</a>, <a class='technorati-link' href='http://technorati.com/tag/training' rel='tag' target='_self'>training</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=K3621C_80bo:5B6dbZNHA5o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=K3621C_80bo:5B6dbZNHA5o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=K3621C_80bo:5B6dbZNHA5o:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/K3621C_80bo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2010/04/29/the-silverlight-masterclass/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2010/04/29/the-silverlight-masterclass/</feedburner:origLink></item>
		<item>
		<title>Silverlight and Windows Phone 7 Link Post</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/cnM53B7TLG8/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2010/04/08/silverlight-and-windows-phone-7-link-post/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 00:35:21 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=252</guid>
		<description><![CDATA[With the recent announcements regarding Silverlight 4 and Windows Phone 7 Development, I thought I would share a few links to some sites I have found useful, both recently and in the past when starting to work with Silverlight and Windows Phone 7 dev using Silverlight. Windows Phone 7 Dev WP7 Panorama App  � http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspx Twitter &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2010/04/08/silverlight-and-windows-phone-7-link-post/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>With the recent announcements regarding Silverlight 4 and Windows Phone 7 Development, I thought I would share a few links to some sites I have found useful, both recently and in the past when starting to work with Silverlight and Windows Phone 7 dev using Silverlight.</p>
<p><strong>Windows Phone 7 Dev</strong></p>
<p>WP7 Panorama App  �<br />
<a href="http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspx">http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspx</a></p>
<p>Twitter App Receiving Push Notifications on WP7   �<br />
<a href="http://skeevs.com/blog/?p=35">http://skeevs.com/blog/?p=35</a></p>
<p>Push Notifications Types and a Tutorial �<br />
<a href="http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspx">http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspx</a></p>
<p>Building a Flickr App�<br />
<a href="http://skeevs.com/blog/?p=4&amp;cpage=1#comment-16">http://skeevs.com/blog/?p=4&amp;cpage=1#comment-16</a></p>
<p>Bing Location Programming on WP7 �<br />
<a href="http://www.earthware.co.uk/blog/index.php/2010/03/writing-a-bing-maps-location-aware-application-for-windows-phone-7-series/">http://www.earthware.co.uk/blog/index.php/2010/03/writing-a-bing-maps-location-aware-application-for-windows-phone-7-series/</a></p>
<p>Windows Phone 7 Icon Pack  �<br />
<a href="http://www.sevenforums.com/news/74137-windows-phone-7-series-icon-pack.html">http://www.sevenforums.com/news/74137-windows-phone-7-series-icon-pack.html</a> </p>
<p><strong><br />
General Silverlight</strong></p>
<p>Silverlight 4 &#8211; A guide to the new features �<br />
<a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx">http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx</a></p>
<p>Getting Started with Silverlight and Blend   �<br />
<a href="http://refcardz.dzone.com/refcardz/getting-started-silverlight?oid=hom20371">http://refcardz.dzone.com/refcardz/getting-started-silverlight?oid=hom20371</a></p>
<p>Silverlight UI Controls�<br />
<a href="http://www.silverlight.net/learn/tutorials/controls-cs">http://www.silverlight.net/learn/tutorials/controls-cs</a></p>
<p>Silverlight Data Binding �<br />
<a href="http://www.silverlight.net/learn/tutorials/databinding-cs/">http://www.silverlight.net/learn/tutorials/databinding-cs/</a></p>
<p>Visual State Manager  �<br />
<a href="http://www.silverlight.net/learn/tutorials/stylestemplatesvsm-cs/">http://www.silverlight.net/learn/tutorials/stylestemplatesvsm-cs/</a></p>
<p>Intro to Behaivours�<br />
<a href="http://www.kirupa.com/blend_silverlight/introduction_behaviors_pg1.htm">http://www.kirupa.com/blend_silverlight/introduction_behaviors_pg1.htm</a></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Silverlight' rel='tag' target='_self'>Silverlight</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows+Phone+7' rel='tag' target='_self'>Windows Phone 7</a>, <a class='technorati-link' href='http://technorati.com/tag/WP7' rel='tag' target='_self'>WP7</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=cnM53B7TLG8:IU_3waZpHqk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=cnM53B7TLG8:IU_3waZpHqk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=cnM53B7TLG8:IU_3waZpHqk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/cnM53B7TLG8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2010/04/08/silverlight-and-windows-phone-7-link-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2010/04/08/silverlight-and-windows-phone-7-link-post/</feedburner:origLink></item>
		<item>
		<title>Multi-Select List Box in ASP.NET MVC</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/567oe8j8vDs/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2010/02/26/multi-select-list-box-in-asp-net-mvc/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:13:57 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Fraemwork]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=245</guid>
		<description><![CDATA[Recently I have been working on an MVC site using the Entity Framework.  I have some related entities in my EF model, as show below in the form of &#8220;Reader&#8221; and &#8220;Category&#8221;, and the relationship between them, i.e. many to many. When it came to proucing a view and action to perofrm the Create Reader &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2010/02/26/multi-select-list-box-in-asp-net-mvc/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I have been working on an MVC site using the Entity Framework. </p>
<p style="text-align: center;">I have some related entities in my EF model, as show below in the form of &#8220;Reader&#8221; and &#8220;Category&#8221;, and the relationship between them, i.e. many to many.<br />
<img class="aligncenter size-medium wp-image-248" style="margin: 10px; border: black 1px solid;" title="EF Model" src="http://blog.garypretty.co.uk/wp-content/model-283x300.png" alt="" width="283" height="300" /></p>
<p>When it came to proucing a view and action to perofrm the Create Reader action, I was somewhat puzzled as to how I could allow the user to select one or more categories for a reader. </p>
<p>I started by having a view model that contained a list of all possible categories and then looping around these in my view and writing a check box out for each one.  When the form was submitted I looked through the form collection to find if any of the category check boxes had been selected.  I didn&#8217;t like this one bit and so I set out to find a cleaner way of carrying it out.</p>
<p>After some (quite a lot actually) searching, I stumbled accross the MultiSelectList type, which I could use in my ViewModel and then allow the default model binding to step in and do the leg work for me <img src='http://blog.garypretty.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Great!</p>
<p>So, I created a view model, a simplified version of which you can see below;</p>
<blockquote><p>    public class ReaderCreateViewModel : CustomViewModelBase<br />
    {</p>
<p>        public ReaderCreateViewModel()<br />
        {<br />
            ReaderDetails = new Reader();<br />
            CategoriesList = GetCategories(null);<br />
        }</p>
<p>        public Reader ReaderDetails { get; set; }<br />
        public MultiSelectList CategoriesList { get; private set; }<br />
        public int[] SelectedCategories { get; set; }</p>
<p>        public MultiSelectList GetCategories(int[] selectedValues)<br />
        {<br />
            var te = new myEntities();<br />
            List&lt;Category&gt; categories = te.Categories.ToList();<br />
            return new MultiSelectList(categories, &#8220;id&#8221;, &#8220;Name&#8221;, selectedValues);<br />
        }<br />
    }</p></blockquote>
<p> As you can see from the code above, the view model contains my Reader entity, a list of type MultiSelectList, which is a list of available categories and an array of integers which represent the Id of any selected Categories.</p>
<p>Then to add a listbox to my view that will bind the MultiSelectList, I simply insert the following into my view.</p>
<blockquote><p>            &lt;p&gt;<br />
             &lt;label for=&#8221;SelectedCategories&#8221;&gt;Categories:&lt;/label&gt;<br />
        &lt;%= Html.ListBox(&#8220;SelectedCategories&#8221;, Model.CategoriesList) %&gt;<br />
            &lt;/p&gt;</p></blockquote>
<p>Finally in my controller, I can simply check the SelectedItems object in my model for any selected Ids and add them to the Reader Categories list like this;</p>
<blockquote><p>            if (model.SelectedCategories != null)<br />
            {<br />
                foreach (var selectedCat in model.SelectedCategories)<br />
                {<br />
                    int selectedCatId = selectedCat;<br />
                    Category category = DataContext.Categories.Where(c =&gt; c.id                  == selectedCatId).FirstOrDefault();<br />
                    reader.Categories.Add(category);<br />
                }<br />
            }</p></blockquote>
<p>And that&#8217;s it.  Now there is probably a much better way of doing all or some of the above, but this worked perfectly for me when I needed it, so I hope it helps someone else out as well.  The final multi-select list box looked something like this;</p>
<p><a href="http://blog.garypretty.co.uk/wp-content/listbox.bmp"><img class="aligncenter size-full wp-image-250" title="listbox" src="http://blog.garypretty.co.uk/wp-content/listbox.bmp" alt="" /></a></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/ASP.NET+MVC' rel='tag' target='_self'>ASP.NET MVC</a>, <a class='technorati-link' href='http://technorati.com/tag/Entity+Framework' rel='tag' target='_self'>Entity Framework</a>, <a class='technorati-link' href='http://technorati.com/tag/MVC' rel='tag' target='_self'>MVC</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=567oe8j8vDs:iAOEgLPjBqA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=567oe8j8vDs:iAOEgLPjBqA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=567oe8j8vDs:iAOEgLPjBqA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/567oe8j8vDs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2010/02/26/multi-select-list-box-in-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2010/02/26/multi-select-list-box-in-asp-net-mvc/</feedburner:origLink></item>
		<item>
		<title>ASP.NET MVC – Passing ViewData to a MasterPage</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/HVqeCwfv6T0/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2010/01/12/asp-net-mvc-passing-viewdata-to-a-masterpage/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 10:10:19 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/index.php/2010/01/12/asp-net-mvc-passing-viewdata-to-a-masterpage/</guid>
		<description><![CDATA[If like me you are using ASP.NET MVC for some of your web applications these days and use MasterPages within them, then you may have come accross the need to pass ViewData to the MasterPage.  For example, this might be for a dynamically generated navigation bar. When I first started using MVC, I simply passed &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2010/01/12/asp-net-mvc-passing-viewdata-to-a-masterpage/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>If like me you are using ASP.NET MVC for some of your web applications these days and use MasterPages within them, then you may have come accross the need to pass ViewData to the MasterPage.  For example, this might be for a dynamically generated navigation bar.</p>
<p>When I first started using MVC, I simply passed the ViewData required for the MasterPage along with every action, but even with a small site, this was a lot of code replication.</p>
<p>To solve this problem, we can create an ApplicationController class which inherits from the Controller class we all know and love.  Your applications&#8217; controllers then in turn simply inherit from this new ApplicationController.</p>
<p>Below is a simple example of an ApplicationController.</p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">namespace</span> MvcSite.Controllers
{
    <span class="kwrd">public</span> <span class="kwrd">abstract</span> <span class="kwrd">class</span> ApplicationController : Controller
    {
        <span class="kwrd">private</span> MyEntities _dataContext = <span class="kwrd">new</span> MyEntities();

        <span class="kwrd">public</span> MyEntities DataContext
        {
            get { <span class="kwrd">return</span> _dataContext; }
        }

        <span class="kwrd">public</span> ApplicationController()
        {
            ViewData[<span class="str">"categories"</span>] = DataContext.Categories.ToList();
        }

    }
}</pre>
</blockquote>
<p>Hope this helps someone else as well. Certainly removed a headache for me!</p>
<p><!-- .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; } --></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/ASP.NET+MVC' rel='tag' target='_self'>ASP.NET MVC</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=HVqeCwfv6T0:UHypzYP93o0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=HVqeCwfv6T0:UHypzYP93o0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=HVqeCwfv6T0:UHypzYP93o0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/HVqeCwfv6T0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2010/01/12/asp-net-mvc-passing-viewdata-to-a-masterpage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2010/01/12/asp-net-mvc-passing-viewdata-to-a-masterpage/</feedburner:origLink></item>
		<item>
		<title>3 mobile broadband not working (“No Network”) on Windows 7…</title>
		<link>http://feedproxy.google.com/~r/GaryPrettysBlog/~3/Yj-aNGS8nLI/</link>
		<comments>http://blog.garypretty.co.uk/index.php/2009/10/26/3-mobile-broadband-not-working-no-network-on-windows-7/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 12:40:13 +0000</pubDate>
		<dc:creator>Gary Pretty</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[3connect]]></category>
		<category><![CDATA[3mobile]]></category>
		<category><![CDATA[mobile broadband]]></category>

		<guid isPermaLink="false">http://blog.garypretty.co.uk/?p=236</guid>
		<description><![CDATA[Well, we moved into our new house this weekend&#8230;.so I am pretty tired.  I cannot believe how much stuff we have managed to accumulate over a relatively short period of time!  So, now we are living in our very own building site.   The front room is currently made up of some scaffolding, two garden &#8230; </p><p><a class="more-link block-button" href="http://blog.garypretty.co.uk/index.php/2009/10/26/3-mobile-broadband-not-working-no-network-on-windows-7/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Well, we moved into our new house this weekend&#8230;.so I am pretty tired.  I cannot believe how much stuff we have managed to accumulate over a relatively short period of time!  So, now we are living in our very own building site. <img src='http://blog.garypretty.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   The front room is currently made up of some scaffolding, two garden chairs and a TV (with Sky HD which got installed this morning&#8230;..got to get the priorities right people).</p>
<p>Because of the move, I currently dont have a landline and consequently, there is no broadband! I didn&#8217;t this that this would be a problem because I have borrowed a mobile broadband USB dongle from 3&#8230;&#8230;not a problem that is until I plugged it in! </p>
<p>Once I had plugged in the USB modem and installed the software, I simply got the message &#8220;No Network&#8221;, but the light on the device was green??  After several more tries of re-installing the device drivers and a few more ideas I decided to visit a friend a use their wi-fi to look for a solution. </p>
<p>Turns out that if you want to use your 3mobile broadband device on windows 7, you need to download drivers BEFORE you upgrade!  Alternativly, if you are like me and are on Windows 7 already, you too can find a friend with an internet connection and download the updated <strong>Windows 7 Only </strong>drivers <a href="http://ask3.three.co.uk/mbbdocs/windows7_snowleopard_download.html">from Three here</a>.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/3connect' rel='tag' target='_self'>3connect</a>, <a class='technorati-link' href='http://technorati.com/tag/3mobile' rel='tag' target='_self'>3mobile</a>, <a class='technorati-link' href='http://technorati.com/tag/mobile+broadband' rel='tag' target='_self'>mobile broadband</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows+7' rel='tag' target='_self'>Windows 7</a></p>

<!-- end wp-tags-to-technorati -->
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=Yj-aNGS8nLI:zXuUElvO_fo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:AJN6rANEukQ"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=AJN6rANEukQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?i=Yj-aNGS8nLI:zXuUElvO_fo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/GaryPrettysBlog?a=Yj-aNGS8nLI:zXuUElvO_fo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/GaryPrettysBlog?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/GaryPrettysBlog/~4/Yj-aNGS8nLI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.garypretty.co.uk/index.php/2009/10/26/3-mobile-broadband-not-working-no-network-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://blog.garypretty.co.uk/index.php/2009/10/26/3-mobile-broadband-not-working-no-network-on-windows-7/</feedburner:origLink></item>
	</channel>
</rss>

