<?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/"
	>

<channel>
	<title>Elegant Code &#187; p&amp;p</title>
	<atom:link href="http://elegantcode.com/category/pp/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Sun, 12 Feb 2012 04:40:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Free Pluralsight Prism Training</title>
		<link>http://elegantcode.com/2011/11/04/free-prism-training/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-prism-training</link>
		<comments>http://elegantcode.com/2011/11/04/free-prism-training/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 04:23:40 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[Prism]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[p&p]]></category>
		<category><![CDATA[prism]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2011/11/04/free-prism-training/</guid>
		<description><![CDATA[I am excited to announce that Pluralsight and Microsoft’s Patterns &#38; Practices team have joined forces to provide you with free access to over 4 hours of online Prism training.&#160; That’s right, you heard me correctly. FREE online Prism training sponsored by the one and only Patterns &#38; Practices team.&#160; I know you have some [...]]]></description>
			<content:encoded><![CDATA[<p>I am excited to announce that <a href="http://www.pluralsight-training.net/microsoft/" target="_blank">Pluralsight</a> and <a href="http://msdn.microsoft.com/en-us/practices/bb190332" target="_blank">Microsoft’s Patterns &amp; Practices</a> team have joined forces to provide you with free access to over 4 hours of online Prism training.&#160; That’s right, you heard me correctly. FREE online Prism training sponsored by the one and only Patterns &amp; Practices team.&#160; I know you have some question so let me answer the most common:</p>
<h4>Q &amp; A</h4>
<p><strong>Q1. When is this free training available?</strong>     <br />A1. The entire weekend of Nov 12th 2011 through Nov 14th 2011.</p>
<p><strong>Q2. Do I have to be a Pluralsight subscriber to get this awesome training?</strong>     <br />A2. This training will be freely available to everyone. You do not have to be a subscriber.</p>
<p><strong>Q3. What does the course cover?</strong>     <br />A3. Well let’s take a look:</p>
<ul>
<li>Getting started with Prism </li>
<li>Bootstrapper and Shell </li>
<li>Regions </li>
<li>Modules </li>
<li>Views </li>
<li>Communication </li>
<li>State-Based Navigation </li>
<li>View-Based Navigation </li>
</ul>
<p><a href="http://www.pluralsight-training.net/microsoft/Courses/TableOfContents?courseName=prism-introduction" target="_blank"><em>More course information.</em></a></p>
<p><strong>Q4. Who is the author of this kick ass Prism course?</strong>     <br />Q4. That would be me.</p>
<p><strong>Q5. Is it really free?</strong>     <br />Q5. You’re kidding right? Didn’t I already cover this part? Yes, it is free.</p>
<h4>New and Improved</h4>
<p>If you are a subscriber and have already watched the course, I would like to bring to your attention that there have been two new modules added.&#160; These modules will cover everything you need to know in order to start using the navigation services provided by Prism.&#160; This includes state-based navigation and view-based navigation.</p>
<p>Mark your calendar for Nov 12th and be sure to cram as much Prism knowledge into your brain as you can before the weekend ends.&#160; Don’t worry, if you run out of time you can always ask me questions directly.&#160; You can contact me either through Twitter (@<a href="http://twitter.com/brianlagunas" target="_blank">brianlagunas</a>) or through the <a href="http://wpftoolkit.codeplex.com/" target="_blank">Extended WPF Toolkit</a> project site.&#160; I hope you enjoy the training.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2011/11/04/free-prism-training/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Prism-fy the Bing Maps WPF Control (Beta)</title>
		<link>http://elegantcode.com/2011/08/31/prism-fy-the-bing-maps-wpf-control-beta/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=prism-fy-the-bing-maps-wpf-control-beta</link>
		<comments>http://elegantcode.com/2011/08/31/prism-fy-the-bing-maps-wpf-control-beta/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 16:13:02 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[Prism]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[bing maps]]></category>
		<category><![CDATA[prism]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2011/08/31/prism-fy-the-bing-maps-wpf-control-beta/</guid>
		<description><![CDATA[If you know me or know of me you are aware that I am a big Prism advocate/evangelist.&#160; You may have also noticed that I have been playing around with the new Bing Maps WPF control.&#160; So it shouldn’t surprise you that I would find a way to compose a Bing Map of loosely coupled [...]]]></description>
			<content:encoded><![CDATA[<p>If you know me or know of me you are aware that I am a big Prism advocate/evangelist.&#160; You may have also noticed that I have been <a href="http://elegantcode.com/2011/08/26/build-an-earthquake-application-with-bing-maps-wpf-control-beta/" target="_blank">playing</a> <a href="http://elegantcode.com/2011/08/30/mapping-an-address-with-the-bing-maps-wpf-control-beta/" target="_blank">around</a> with the new Bing Maps WPF control.&#160; So it shouldn’t surprise you that I would find a way to compose a Bing Map of loosely coupled MapLayers at runtime using Prism.</p>
<p>The concept is simple.&#160; We want a Bing Maps application that can be extended at runtime.&#160; By extended, I mean that I want the ability to add new elements/modules to the Map at runtime.&#160; The important thing about these elements/modules is that they can come from anywhere and they should be loosely coupled from the Map as well as other elements/modules that may exist on the Map.</p>
<p>Luckily for us this is extremely simple to accomplish.&#160; All we have to do is create a custom RegionAdapter, register it with our Prism application, and then apply it to our Bing Map control.&#160; So let’s start with the RegionAdapter.</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e8809704-1b89-4479-9f50-32a29a8ce6e3" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">MapRegionAdapter</span> : <span style="color:#2b91af">RegionAdapterBase</span>&lt;<span style="color:#2b91af">Map</span>&gt;<br /> {<br />     <span style="color:#0000ff">public</span> MapRegionAdapter(<span style="color:#2b91af">IRegionBehaviorFactory</span> regionBehaviorFactory)<br />         : <span style="color:#0000ff">base</span>(regionBehaviorFactory)<br />     {</p>
<p>     }</p>
<p>     <span style="color:#0000ff">protected</span> <span style="color:#0000ff">override</span> <span style="color:#0000ff">void</span> Adapt(<span style="color:#2b91af">IRegion</span> region, <span style="color:#2b91af">Map</span> regionTarget)<br />     {<br />         region.Views.CollectionChanged += (s, e) =&gt;<br />         {<br />             <span style="color:#0000ff">if</span> (e.Action == System.Collections.Specialized.<span style="color:#2b91af">NotifyCollectionChangedAction</span>.Add)<br />             {<br />                 <span style="color:#0000ff">foreach</span> (<span style="color:#2b91af">FrameworkElement</span> element <span style="color:#0000ff">in</span> e.NewItems)<br />                     regionTarget.Children.Add(element);<br />             }<br />             <span style="color:#0000ff">else</span> <span style="color:#0000ff">if</span> (e.Action == System.Collections.Specialized.<span style="color:#2b91af">NotifyCollectionChangedAction</span>.Remove)<br />             {<br />                 <span style="color:#0000ff">foreach</span> (<span style="color:#2b91af">FrameworkElement</span> element <span style="color:#0000ff">in</span> e.OldItems)<br />                     <span style="color:#0000ff">if</span> (regionTarget.Children.Contains(element))<br />                         regionTarget.Children.Remove(element);<br />             }<br />         };<br />     }</p>
<p>     <span style="color:#0000ff">protected</span> <span style="color:#0000ff">override</span> <span style="color:#2b91af">IRegion</span> CreateRegion()<br />     {<br />         <span style="color:#0000ff">return</span> <span style="color:#0000ff">new</span> <span style="color:#2b91af">AllActiveRegion</span>();<br />     }<br /> }</div>
</p></div>
</p></div>
</p>
<p>Now in the Bootstrapper we need to register our mapping.</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fce11974-ec82-4641-ac5c-a37a9ff443df" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#0000ff">protected</span> <span style="color:#0000ff">override</span> <span style="color:#2b91af">RegionAdapterMappings</span> ConfigureRegionAdapterMappings()<br /> {<br />     <span style="color:#2b91af">RegionAdapterMappings</span> mappings = <span style="color:#0000ff">base</span>.ConfigureRegionAdapterMappings();<br />     mappings.RegisterMapping(<span style="color:#0000ff">typeof</span>(<span style="color:#2b91af">Map</span>), Container.Resolve&lt;<span style="color:#2b91af">MapRegionAdapter</span>&gt;());<br />     <span style="color:#0000ff">return</span> mappings;<br /> }</div>
</p></div>
</p></div>
</p>
<p>Now we simply give the Map a region name. (this is actually all the shell has in it)</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a72303d9-120c-4bba-a39e-18ae1979a63a" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#a31515"></span><span style="color:#0000ff">&lt;</span><span style="color:#a31515">Grid</span><span style="color:#0000ff">&gt;</span><br />     <span style="color:#a31515"></span><span style="color:#0000ff">&lt;</span><span style="color:#a31515">bing</span><span style="color:#0000ff">:</span><span style="color:#a31515">Map</span><span style="color:#ff0000"> prism</span><span style="color:#0000ff">:</span><span style="color:#ff0000">RegionManager.RegionName</span><span style="color:#0000ff">=&quot;{</span><span style="color:#a31515">x</span><span style="color:#0000ff">:</span><span style="color:#a31515">Static</span><span style="color:#ff0000"> inf</span><span style="color:#0000ff">:</span><span style="color:#ff0000">RegionNames</span><span style="color:#0000ff">.MapRegion}&quot;</span><span style="color:#ff0000"> Center</span><span style="color:#0000ff">=&quot;40,-95&quot;</span><span style="color:#ff0000"> ZoomLevel</span><span style="color:#0000ff">=&quot;4&quot; /&gt;</span><br /> <span style="color:#a31515"></span><span style="color:#0000ff">&lt;/</span><span style="color:#a31515">Grid</span><span style="color:#0000ff">&gt;</span></div>
</p></div>
</p></div>
</p>
<p>That is all there is to it.&#160; You can now start injecting modules onto the Map at runtime.&#160; Lets look at my two modules I am using as an example.&#160; Here is the structure of my application:</p>
<p><a href="http://elegantcode.com/wp-content/uploads/2011/08/image12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2011/08/image_thumb13.png" width="305" height="190" /></a></p>
<ul>
<li>ModuleA will inject a MapPolygon in the Shape of Texas.</li>
<li>ModuleB is the Earthquake application we built in an <a href="http://elegantcode.com/2011/08/26/build-an-earthquake-application-with-bing-maps-wpf-control-beta/" target="_blank">earlier post</a>.</li>
<li>Infrastructure is the project where shared code goes, in this case our MapRegionAdapter</li>
<li>BingMapsPrismfiedDemo is of course our shell project.</li>
</ul>
<p>This is what the application looks like at runtime when both modules have been injected into it.</p>
<p><a href="http://elegantcode.com/wp-content/uploads/2011/08/image13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2011/08/image_thumb14.png" width="644" height="334" /></a></p>
<p>Now I can easily add more layers to this map as I see fit.&#160; As always, <a href="http://www.brianlagunas.com/downloads/source/BingMapsPrismfiedDemo.zip">Download the Source</a> and start playing.&#160; You may want to add MEF support as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2011/08/31/prism-fy-the-bing-maps-wpf-control-beta/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BSDG &#8211; PRISM/MVVM for WPF Presentation Sample Code</title>
		<link>http://elegantcode.com/2009/06/05/bsdg-prismmvvm-for-wpf-presentation-sample-code/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bsdg-prismmvvm-for-wpf-presentation-sample-code</link>
		<comments>http://elegantcode.com/2009/06/05/bsdg-prismmvvm-for-wpf-presentation-sample-code/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 14:40:45 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[BSDG]]></category>
		<category><![CDATA[Prism]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[p&p]]></category>
		<category><![CDATA[mvvm]]></category>
		<category><![CDATA[prism]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/06/05/bsdg-prismmvvm-for-wpf-presentation-sample-code/</guid>
		<description><![CDATA[As promised, I am posting the sample code I covered in the presentation for everyone to download and start playing with.&#160; If you have any questions or would like me to discuss a specific aspect in more detail just drop me a line. Download the Presentation Source.&#160; This contains the all sample code that I [...]]]></description>
			<content:encoded><![CDATA[<p>As promised, I am posting the sample code I covered in the presentation for everyone to download and start playing with.&#160; If you have any questions or would like me to discuss a specific aspect in more detail just drop me a line.</p>
<p><a href="http://brianlagunas.com/Downloads/Presentations/Prism_MVVM_Demo.zip">Download the Presentation Source</a>.&#160; This contains the all sample code that I discussed during the presentation.</p>
<p>Useful links:</p>
<ul>
<li>The <a href="http://compositewpf.codeplex.com/" target="_blank">Composite WPF and Silverlight</a> (Prism) website is where you want to start. </li>
<li><a href="http://elegantcode.com/2009/04/22/code-cast-26-prism-20/" target="_blank">Elegant Code Cast of Prism v2</a> – David Starr, Scott Nichols, and myself sat down with the Patterns and Practices team to discuss Prism. </li>
<li><a href="http://channel9.msdn.com/tags/Prism/" target="_blank">Channel9</a> has some good videos available to help you understand and get started using Prism. </li>
<li><a href="http://www.amazon.com/WPF-Recipes-2008-Problem-Solution-Approach/dp/1430210842/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1238262991&amp;sr=1-2" target="_blank">WPF Recipes in C# 2008: A Problem-Solution Approach</a> – This is not a Prism book but it is a great book for solving common problems in WPF. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/06/05/bsdg-prismmvvm-for-wpf-presentation-sample-code/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Code Cast 26 – Prism 2.0</title>
		<link>http://elegantcode.com/2009/04/22/code-cast-26-prism-20/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=code-cast-26-prism-20</link>
		<comments>http://elegantcode.com/2009/04/22/code-cast-26-prism-20/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 01:21:18 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[CodeCast]]></category>
		<category><![CDATA[p&p]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/04/22/code-cast-26-prism-20/</guid>
		<description><![CDATA[Blaine Wastell and Bob Brumfield of Microsoft’s patterns &#38; practices group dropped by the Elegant Code Cast and talked with us about Prism 2.0. Now in it’s second release, Prism is a guidance package from p&#38;p on building composite applications in WPF, and now in Silverlight! If you work with large client applications, or are [...]]]></description>
			<content:encoded><![CDATA[<p>Blaine Wastell and Bob Brumfield of <a href="http://msdn.microsoft.com/en-us/practices/default.aspx" target="_blank">Microsoft’s patterns &amp; practices group</a> dropped by the Elegant Code Cast and talked with us about Prism 2.0.<img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" src="http://scienceblogs.com/builtonfacts/2009/02/12/floyd.png" border="0" alt="" width="200" height="200" align="right" /></p>
<p>Now in it’s second release, Prism is a guidance package from p&amp;p on building composite applications in WPF, and now in Silverlight!</p>
<p>If you work with large client applications, or are just interested in how this elegant  application works, this show is for you.</p>
<p><a href="http://pluralsight-free.s3.amazonaws.com/david-starr/ecc/ECC_26_Prism2.mp3">Download the MP3</a></p>
<p><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=271207118"><img src="http://elegantcode.com/cast/files/images/itunes_button.gif" border="0" alt="View in iTunes" /></a> <a href="http://feeds.feedburner.com/elegantcodecast"><img src="http://elegantcode.com/cast/files/images/rss_podcast.jpg" border="0" alt="Any Podcatcher" /></a></p>
<ul>
<li><a href="http://compositewpf.codeplex.com/" target="_blank">Prism</a> on CodePlex</li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fa07e1ce-ca3f-4b9b-a21b-e3fa10d013dd&amp;DisplayLang=en" target="_blank">Composite Application Guidance for WPF and Silverlight</a> &#8211; February 2009<br />
(Includes project linker downloads)</li>
<li><a href="http://blogs.msdn.com/bobbrum/" target="_blank">Bob Brumfield’s Blog</a></li>
<li><a href="http://blogs.msdn.com/blaine/" target="_blank">Blaine Wastell’s Blog</a></li>
<li>Prism “How Do I” <a href="http://channel9.msdn.com/posts/akMSFT/Creating-a-modular-application-using-Prism-V2-Part-1-of-4--Creating-a-shell-and-modules/" target="_blank">Screen Casts</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd458809.aspx?" target="_blank">Guidance for the Guidance</a> <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (A good place to get started on Prism)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/04/22/code-cast-26-prism-20/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/david-starr/ecc/ECC_26_Prism2.mp3" length="43539379" type="audio/mpeg" />
		</item>
	</channel>
</rss>

