<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.wintellect.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Wintellog</title><link>http://www.wintellect.com/CS/blogs/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Debugger Canvas 1.1 is Released</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2012/01/31/debugger-canvas-1-1-is-released.aspx</link><pubDate>Tue, 31 Jan 2012 20:48:19 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20570</guid><dc:creator>jrobbins</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There’s a lot of UI research going on focused around better debugging. Debugger Canvas is some that you can use today and the version 1.1 was just &lt;a href="http://msdn.microsoft.com/en-us/devlabs/debuggercanvas"&gt;released&lt;/a&gt;. The speed increased in 1.1 are great and make Debugger Canvas much more usable. I’m in love with the toggle button where you can flip between Debugger Canvas and regular text file display. While I have a few feature &lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2011/06/14/debugger-canvas-tricks-and-wishes.aspx"&gt;requests&lt;/a&gt; that I’d love to see, using 1.1 made me wish for some more. My feedback’s been given to the Debugger Canvas team but I thought it might spark some discussion by mentioning my additional wishes to everyone:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When using Debugger Canvas on a multithreaded application, I’d love to see the thread ID and/or name in the display when it’s an active call stack. It’s a little to easy to get lost in a multithreaded canvas.&lt;/li&gt;    &lt;li&gt;It would be nice to have a timestamp on a bubble. When one canvas is getting reused you can see at a glance which is the most recent chain.&lt;/li&gt;    &lt;li&gt;It would be nice to have a way to remove a whole chain at once.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Please do let the team know your feedback at the DevLabs Debugger Canvas &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/debuggercanvas/threads"&gt;forum&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20570" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>MVVM on MVC: HTML is not XAML</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/25/mvvm-on-mvc-html-is-not-xaml.aspx</link><pubDate>Wed, 25 Jan 2012 09:44:01 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20556</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>1</slash:comments><description>I have to admit that I may have rolled my eyes a bit when I first learned about the KnockoutJS library. It sounded too much like forcing a square peg into a round hole. Isn’t Model-View-Controller (MVC) already it’s own pattern ? Does it make sense to apply something like Model-View-ViewModel ( MVVM ) to HTML? I already had enough issues dealing with MVVM on the platform it was designed for, XAML and C# (WPF and Silverlight). Some people simply didn’t get the pattern, others were pushing it without...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/25/mvvm-on-mvc-html-is-not-xaml.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20556" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/html/default.aspx">html</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/html5/default.aspx">html5</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/javascript/default.aspx">javascript</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/knockoutjs/default.aspx">knockoutjs</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/mvc/default.aspx">mvc</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/mvvm/default.aspx">mvvm</category></item><item><title>We Are Hiring!</title><link>http://www.wintellect.com/CS/blogs/jeffreyr/archive/2012/01/24/we-are-hiring.aspx</link><pubDate>Tue, 24 Jan 2012 13:59:40 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20552</guid><dc:creator>JeffreyR</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Business is good and we need YOU! Wintellect is currently seeking senior level technical development resources for both contract and permanent employment for our current client projects. If you want the challenge of keeping up with co-workers like Jeffrey Richter, Jeff Prosise, Keith Rome, or Jeremy Likness, have we got the opportunity of a lifetime. Please have lots of hands on development experience in the following technologies: C#, &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; MVC, WPF, WCF, Silverlight and SQL Server. Experience with HTML5 and jQuery would be ideal also. If you can't tell, it's all cutting edge here at Wintellect so if you like doing the latest technology we'd love to talk with you. Please forward your resume and availability to Barbara Keihm, Director of Human Resources,&lt;a href="mailto:bkeihm@wintellect.com"&gt;bkeihm@wintellect.com&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20552" width="1" height="1"&gt;</description></item><item><title>Wintellect is Hiring!!</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2012/01/24/wintellect-is-hiring.aspx</link><pubDate>Tue, 24 Jan 2012 06:33:18 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20551</guid><dc:creator>jrobbins</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Business is good and we need YOU! Wintellect is currently seeking senior level technical development resources for both contract and permanent employment for our current client projects. If you want the challenge of keeping up with co-workers like Jeffrey Richter, Jeff Prosise, Keith Rome, or Jeremy Likness, have we got the opportunity of a lifetime. Please have lots of hands on development experience in the following technologies: C#, ASP.NET MVC, WPF, WCF, Silverlight and SQL Server. Experience with HTML5 and jQuery would be ideal also. If you can't tell, it's all cutting edge here at Wintellect so if you like doing the latest technology we'd love to talk with you. Please forward your resume and availability to Barbara Keihm, Director of Human Resources, &lt;a href="mailto:bkeihm@wintellect.com?subject=I%20want%20to%20work%20at%20Wintellect!"&gt;bkeihm@wintellect.com&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20551" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Wintellect/default.aspx">Wintellect</category></item><item><title>Video: Getting Started with Jounce MVVM and MEF for Silverlight 5</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/22/video-getting-started-with-jounce-mvvm-and-mef-for-silverlight-5.aspx</link><pubDate>Sun, 22 Jan 2012 11:52:03 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20548</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>0</slash:comments><description>I created a quick video to help you get started with using Jounce. The video starts with a blank slate, steps through installation of Jounce and the creation of a sample view model for a simple contact record that includes validation. You can access the video directly at http://vimeo.com/jeremylikness/jounce-getting-started , or view it below: Jounce: Getting Started from Jeremy Likness on Vimeo . (c) 2011-2012 Jeremy Likness....(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/22/video-getting-started-with-jounce-mvvm-and-mef-for-silverlight-5.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20548" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/Jounce/default.aspx">Jounce</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/MEF/default.aspx">MEF</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/mvvm/default.aspx">mvvm</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/silverlight/default.aspx">silverlight</category></item><item><title>Jounce 2.0 MVVM with MEF for Silverlight 5 Released</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/21/jounce-2-0-mvvm-with-mef-for-silverlight-5-released.aspx</link><pubDate>Sat, 21 Jan 2012 15:47:01 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20547</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>0</slash:comments><description>I'm pleased to announce the official release of Jounce 2.0 for Silverlight 5. There are quite a number of new features available that I'll review in this post. Most significantly, of course, the code base has been updated specifically to target Silverlight 5. A number of bug fixes, feature requests, and Silverlight 5 features have been added. The DLL for Jounce is still just under 100 KB for release so it remains nimble and lightweight. There are two ways you can install the latest. Zip over to Jounce...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/21/jounce-2-0-mvvm-with-mef-for-silverlight-5-released.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20547" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/Jounce/default.aspx">Jounce</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/MEF/default.aspx">MEF</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/mvvm/default.aspx">mvvm</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/silverlight+5/default.aspx">silverlight 5</category></item><item><title>Paraffin 3.6–Now Keeping Custom Added Namespaces</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2012/01/19/paraffin-3-6-now-keeping-custom-added-namespaces.aspx</link><pubDate>Thu, 19 Jan 2012 23:44:35 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20541</guid><dc:creator>jrobbins</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Paraffin 3.6 can be downloaded here: &lt;a href="http://www.wintellect.com/CS/files/folders/18310/download.aspx"&gt;http://www.wintellect.com/CS/files/folders/18310/download.aspx&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Dan Gough had an excellent &lt;a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Anybody-using-Paraffin-td7172929.html"&gt;feature request&lt;/a&gt; to have Paraffin copy over any manually added namespaces to the .WXS file like the following. Previously, Paraffin ignored them, but no more.&lt;/p&gt;  &lt;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:9357e3e1-452b-41dd-b7eb-88e813a23d8c" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#a31515;"&gt;xml&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;encoding&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;utf-8&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Wix&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns:util&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;http://schemas.microsoft.com/wix/UtilExtension&lt;/span&gt;&amp;quot;&lt;/li&gt; &lt;li&gt;     &lt;span style="color:#0000ff;"&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;http://schemas.microsoft.com/wix/2006/wi&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;I updated Paraffin to copy over any namespaces added to the Wix element when creating the .PARAFFIN file. If you were having Paraffin inject additional elements with a .ParaffinMold file, now it’s easier than ever to keep your WiX fragments up to date.&lt;/p&gt;  &lt;p&gt;When adding custom namespaces, put them before the default xmlns=&amp;quot;http://schemas.microsoft.com/wix/2006/wi&amp;quot; as I’ve shown in the snippet above. With LINQ to XML, the xmlns attribute is special and does not show up in the Attributes collection so there’s no way I can sort it with the rest of the values. When generating the output XML file, XDocument always puts the xmlns attribute last. I tried all sorts of tricks to get it placed first but never got them to work. &lt;/p&gt;  &lt;p&gt;There’s no trouble if you place your custom namespaces after the default xmlns, but in the .PARAFFIN file they will always appear first so you’ll see more changes when you diff the .WXS and .PARAFFIN file.&lt;/p&gt;  &lt;p&gt;Please do let me know if you have feature requests! I considered adding a command line switch to allow adding custom namespaces when creating a .WXS fragment but didn’t think that would be used very much so decided against it. Of course, now that I’ve mentioned this option everyone’s going to ask for it. &amp;lt;grin!&amp;gt;&lt;/p&gt;  &lt;p&gt;If you’re not familiar with Paraffin, please read the Zen of Paraffin document in the root directory of the download.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20541" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Paraffin/default.aspx">Paraffin</category><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Windows+Installer/default.aspx">Windows Installer</category><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Wix/default.aspx">Wix</category></item><item><title>Visual Studio 2010 Extensions Recommendations</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2012/01/16/visual-studio-2010-extensions-recommendations.aspx</link><pubDate>Mon, 16 Jan 2012 18:31:15 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20532</guid><dc:creator>jrobbins</dc:creator><slash:comments>7</slash:comments><description>&lt;p&gt;The other day I was asked which extensions for Visual Studio I use so in an effort to &lt;a href="http://blog.jonudell.net/2007/04/10/too-busy-to-blog-count-your-keystrokes/"&gt;save keystrokes&lt;/a&gt;, I thought I’d list them here so I can refer people to this list. There’s no way this is a comprehensive list and I do add and remove extensions all the time. However, these are the ones that always stay installed because if they aren’t, I can’t use Visual Studio. By the way, these are all free.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/"&gt;Productivity Power Tools&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;Want a bunch of features for the next version of Visual Studio today? That’s exactly what Microsoft’s Productivity Power Tools are all about. Once you use the awesome Solution Navigator, you’ll wonder how you ever lived without it. Add in the better Tab Well UI, Quick Find, and all the other enhancements and you’re in Visual Studio heaven. This is the single most important extension available. &lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c"&gt;NuGet Package Manager&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;The first time you add an open source package to your solution, you’ll thank your lucky stars for this extension. It’s quick and easy so you can focus on what you need to do instead of the integration. What I find even better than the package manager is that NuGet adds a PowerShell window to Visual Studio. I’m using that constantly these days because the $dte variable exposes the Visual Studio automation model to PowerShell. &lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/f4d9c2b5-d6d7-4543-a7a5-2d7ebabc2496"&gt;VS Color Output&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;This fine extension adds color-coding to output windows in Visual Studio. Seeing build breaks in red and good builds in green, as well as control over all other output, is something that should have been built into Visual Studio already. The latest version 1.1 update fixes a crashing issue people were reporting.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/0db4814c-255e-4cc6-a2c2-a428de7f8949/"&gt;HTML Spell Checker&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;I can’t spell at all and this extension keeps me from looking like moron as others look at the comments in my code.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb"&gt;Highlight All Occurrences of a Selected Word&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;A super simple extension that does exactly what the title says. It’s wonderful when doing presentations to highlight a word and for looking at all uses of a global variable. Note that this extension offers no customizability so you’re stuck with the lime green highlight that does not work so well with you wild kids using dark background themes.&lt;/p&gt;  &lt;p&gt;So what extensions can you not live without? I’d love to know what extensions you use so either blog about them or add them to the comments.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20532" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Recommended/default.aspx">Recommended</category></item><item><title>Setting the Power Plan with PowerShell</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2012/01/15/setting-the-power-plan-with-powershell.aspx</link><pubDate>Sun, 15 Jan 2012 07:54:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20524</guid><dc:creator>jrobbins</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;Edit: Make sure to read the comments from Shay Levy and Richard on clarifying my mistaken assumptions about how things work in PowerShell. Thanks to Richard &amp;amp; Shay for the clarifications!&amp;nbsp;&lt;/p&gt;&lt;p&gt;As I’m a command line kind of guy, I look for every opportunity to stay in a PowerShell window at all times. “Why grab the mouse when you don’t have?” to is my motto! The other day I was working on my laptop and was running short of battery power so wanted to switch to the Power Saver plan. A quick search told me POWERCFG.EXE was the command line tool to use.&lt;/p&gt;  &lt;p&gt;Hold on there Flash! POWERCFG.EXE with the –S option is the command line way to change power plans, but to specify the plan you must use the GUID of the plan. While I’m a big fan of GUIDs there’s several places where GUIDs are not appropriate: command line tools, URLs, and any other place where end users could see them. Shouldn’t you just be able to set the power plan by name like “Balanced, ” “Power Saver,” or if you are feeling randy, “High Performance?” That’s an oversight that needs to be fixed so below is a PowerShell script, Set-PowerPlan.ps1, that lets you set the power plan at the command line based on the name of the plan instead of an ugly GUID.&lt;/p&gt;  &lt;p&gt;The basic idea of the script is to get the list of defined power plans from “POWERCFG.EXE –l” and parse the output with a regular expression looking for the plan name with matching GUID. With the GUID in hand calling “POWERCFG –s &amp;lt;GUID&amp;gt;” flips to the defined plan. The regular expression work was simple, but there was one thing that stumped me.&lt;/p&gt;  &lt;p&gt;In all the PowerShell work I’ve done I’ve never needed to capture the output of an old-school command line program like POWERCFG.EXE. It seemed so simple to do something like “$plans = POWERCFG –l” to get the list of plans and parse the output with “$plans –match &amp;lt;some regex&amp;gt;” to pull out the GUID. Little did I know that would definitely not be anything approaching normal. Yet again a PowerShell-ism reached up and dope slap me hard.&lt;/p&gt;  &lt;p&gt;Interactively in a PowerShell console window, I ran “$plans = POWERCFG –l” and double-checked that $plans was a string by executing “$plans | Get-Member” as piping to Get-Member will report the type of object. Sure enough I was looking at a System.String. Oddly, when I ran “$plans –match &amp;lt;regex&amp;gt;” it always returned false even though typing “$plans” definitely showed me the complete output of the “POWERCFG –l” and the exact string I was looking for was there.&lt;/p&gt;  &lt;p&gt;What totally confused me was running “$plans.Length” as that reported “7” instead of the 364 characters I counted in the string. After a bunch of reading I finally realized that $plans is really a freaking ARRAY of seven lines instead of a complete string. When PowerShell captures the output of a regular command line program as an array of strings. Whenever one is first exposed to PowerShell you invariably are taught about the Get-Member command right at the beginning to figure out the type of an object. When Get-Member lies to you it’s hard to get a clue. It’s things like this that make you understand why so few developers have switched over to PowerShell. &lt;/p&gt;  &lt;p&gt;If you want all the output of a regular command line program into an actual string you have two choices. The first is to explicitly type the receiving variable with [string] like the following: “[string]$plans = powercfg -l” The alternative is to gather the regular command output into a variable, but if you need to look across all that output pipe the variable array to Out-String surrounded by parenthesis as in “($plans | Out-String)”.&lt;/p&gt;  &lt;p&gt;I’m sure some PowerShell Ninja will jump in here and tell me how I missed the obvious, but I don’t feel I did. Hopefully, this little PowerShell gotcha will help you go down the PowerShell route with more confidence. While PowerShell has some bumps along the way the journey is totally worth it!&lt;/p&gt;  &lt;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:6ed12321-49dd-4596-a424-ef426835a83c" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;"&gt;Set-PowerPlan.PS1&lt;/div&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;#requires -version 2.0&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;# (c) 2012 by John Robbins\Wintellect&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&amp;lt;#.SYNOPSIS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Sets the current power plan.&lt;/li&gt; &lt;li&gt;.DESCRIPTION&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;The POWERCFG.EXE utility requires GUIDS when changing a power plan instead of&lt;/li&gt; &lt;li&gt;the name of the plan. That's highly inconvenient so this simple script allows &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;you to use common sense names like "Balanced" or "Power Saver" instead.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;To get the list of power plans on your computer execute 'powercfg -l'&lt;/li&gt; &lt;li&gt;.PARAMETER Plan&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;The name of the power plan to use.&lt;/li&gt; &lt;li&gt;.EXAMPLE &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Set-PowerPlan -Plan Balanced&lt;/li&gt; &lt;li&gt;Sets the power plan to the Balanced plan, the recommnded Microsoft plan.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;.EXAMPLE &lt;/li&gt; &lt;li&gt;Set-PowerPlan "Power Saver"&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Sets the power plan to the Power Saver plan to reduce battery usage.&lt;/li&gt; &lt;li&gt;.LINK&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/PowerShell/default.aspx&lt;/li&gt; &lt;li&gt;#&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;param ($Plan = $(throw 'You must specify the power plan, use "powercfg -l" for the plan names' ))&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;Set-StrictMode -Version Latest&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;# Get the list of plans on the current machine.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;$planList = powercfg.exe -l&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;# The regular expression to pull out the GUID for the specified plan.&lt;/li&gt; &lt;li&gt;$planRegEx = "(?&amp;lt;PlanGUID&amp;gt;[A-Fa-f0-9]{8}-(?:[A-Fa-f0-9]{4}\-){3}[A-Fa-f0-9]{12})" + ("(?:\s+\({0}\))" -f $Plan)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;# If the plan appears in the list...&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;if ( ($planList | Out-String) -match $planRegEx )&lt;/li&gt; &lt;li&gt;{&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# Pull out the matching GUID and capture both stdout and stderr.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$result = powercfg -s $matches["PlanGUID"] 2&amp;gt;&amp;amp;1&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# If there were any problems, show the error.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( $LASTEXITCODE -ne 0)&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$result&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;li&gt;else&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Write-Error ("The requested power scheme '{0}' does not exist on this machine" -f $Plan) &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20524" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>CRUD it’s now CQRS … or is it?</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/07/crud-it-s-now-cqrs-or-is-it.aspx</link><pubDate>Sat, 07 Jan 2012 15:34:01 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20501</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>0</slash:comments><description>In 1983 author James Martin published a book called Managing the Data-Base Environment . It’s interesting the term database is hyphenated in the title; it hadn’t quite settled down as a mainstream term yet. I have not read this book myself, but my understanding is that he presented the concept of the “CRUD Matrix” for engineering how an application performs Create, Read, Update, and Delete operations against the database. Regardless of how the term was first coined, it has gained popularity and is...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2012/01/07/crud-it-s-now-cqrs-or-is-it.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20501" width="1" height="1"&gt;</description></item><item><title>Want Source Server to Work with Managed Minidumps in Visual Studio? Here’s How!</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2012/01/06/want-source-server-to-work-with-managed-minidumps-in-visual-studio-here-s-how.aspx</link><pubDate>Fri, 06 Jan 2012 18:29:23 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20499</guid><dc:creator>jrobbins</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;So you have an awesome minidump your IT guys grabbed with &lt;a href="http://technet.microsoft.com/en-us/sysinternals/dd996900"&gt;ProcDump&lt;/a&gt;. You’ve followed all the rules and have a Symbol Server and Source Server all set up. You open that dump with Visual Studio and BOOM, none of your indexed sources show up. You pull your hair out trying to get your public build sources appear but they never do and it’s just “SRCSRV: The module ‘&amp;lt;&amp;lt;path to the exe file&amp;gt;&amp;gt;’ does not contain source server information.” for everything in the Output window.&lt;/p&gt;  &lt;p&gt;Fortunately, a smiling bald guy, &lt;a href="http://smilingbaldguy.wordpress.com/"&gt;Andy Hopper&lt;/a&gt;, figured out how to make it all &lt;a href="http://smilingbaldguy.wordpress.com/2012/01/06/managed-minidump-debugging-now-with-source-server-support/"&gt;work&lt;/a&gt;. Turns out when opening a minidump, the “managed debugging engine tries to verify that each source server enabled assembly is running as a fully trusted assembly from the CLR’s perspective.” Ahh, nothing like security to turn off a feature. The great news is that you can tell the managed debugging engine to stop doing the checks so the Source Server works with the managed minidumps. It’s as simple as setting a registry key. Swipe the registry script below and you are good to go.&lt;/p&gt;  &lt;p&gt;All credit to Andy Hopper on this one!&lt;/p&gt;  &lt;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:55b01d15-bc2c-439d-9916-2d0677300087" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;Windows Registry Editor Version 5.00&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;; Enables Source Server support when opening up managed minidumps in Visual Studio.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;; All credit to Andy Hopper!&lt;/li&gt; &lt;li&gt;; http://smilingbaldguy.wordpress.com/2012/01/06/managed-minidump-debugging-now-with-source-server-support/&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;; If you&amp;#39;re on a 32-bit machine (and why would you be?) remove Wow6432Node.&lt;/li&gt; &lt;li&gt;;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;[HKEY_LOCAL_MACHINE&amp;#92;SOFTWARE&amp;#92;Wow6432Node&amp;#92;Microsoft&amp;#92;VisualStudio&amp;#92;10.0&amp;#92;AD7Metrics&amp;#92;Engine&amp;#92;{00000000-0000-0000-0000-000000000000}]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;quot;RequireFullTrustForSourceServer&amp;quot;=dword:00000000&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20499" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Things I Am Enjoying (December, 2011)</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2011/12/29/things-i-am-enjoying-december-2011.aspx</link><pubDate>Thu, 29 Dec 2011 19:51:41 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20473</guid><dc:creator>jrobbins</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;In the development world, there’s a lot of things that bump, distract, and annoy you through the day. Those get a lot of attention in blogs to help others work around those issues and to document the pain. What does not get a lot of attention are those things that work well and make your life better. In this blog post I want to shout the kudos for a few things I’ve been enjoying immensely in the last month. My list will not be anything as good as &lt;a href="http://www.hanselman.com/blog/ScottHanselmans2011UltimateDeveloperAndPowerUsersToolListForWindows.aspx"&gt;&lt;b&gt;Scott Hanselman's 2011 Ultimate Developer and Power Users Tool List for Windows&lt;/b&gt;&lt;/a&gt;, but I’m sure loving what I mention below!&lt;/p&gt;  &lt;h3&gt;&lt;a href="https://agilebits.com/onepassword"&gt;1Password from Agile Bits&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;With the news the last few years talking about security breaches and research showing everyone is using the same password everywhere if you’re not using a password manager you are plain crazy. I’ve been using 1Password for a while now and it’s so well integrated in all browsers across Windows, OS X, and phones, I basically forgot I was using it. When setting up a new machine recently I was perplexed for a minute as to why I couldn’t log into various web sites and where was the password button in the web browser? 1Password does its job so well I can’t help but recommend it because I forget I’m running it.&lt;/p&gt;  &lt;p&gt;Speaking of passwords and security, all developers need to read the wonderful research paper “&lt;a href="http://research.microsoft.com/en-us/um/people/cormac/papers/2009/SoLongAndNoThanks.pdf&amp;amp;pli=1"&gt;So Long, And No Thanks for the Externalities: The Rational Rejection of Security Advice by Users&lt;/a&gt;” by Cormac Herley of Microsoft Research. It discusses why normal people always use the same password and weak ones at that. &lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.slysoft.com/en/virtual-clonedrive.html"&gt;SlySoft Virtual Clone Drive&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;Windows 8 will &lt;em&gt;finally&lt;/em&gt; have native &lt;a href="http://www.tomshardware.com/news/windows-8-iso-vhd-mounting-win8,13358.html"&gt;ISO mounting&lt;/a&gt; support built in to the OS. It’s about time. However, with Windows 8 not releasing for quite a while you need something today to mount those ISO files. Virtual Clone Drive has been around for years and works on all Windows OS. I don’t have any software on a DVD any more because either downloaded it or converted it to ISO files. When using Virtual Clone Drive, select the Virtual Sheep option so your fake DVD drive shows up with the awesome angry sheep icon. The price is awesome for Virtual Clone Drive: free.&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://eshop.macsales.com/item/OWC/DDAMBS0GB/"&gt;Other World Computing Data Doubler&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;As it was time for a laptop upgrade, I kept with my love of Apple hardware and bought a 15-inch MacBook Pro. As I’ve said many times to people: “Apple: The best Windows machines money can buy!”™® Because I don’t use DVDs any more the Apple drive is just taking up space in the machine. Fortunately, the fine folks at Other World Computing (OWC) have a great solution in Data Doubler that replaces your DVD with another hard disk. For $65 USD I slapped in the SSD I took out of my no longer needed desktop machine and instantly had another 240GB of sweet SSD speedy sexiness for my virtual machines. &lt;/p&gt;  &lt;p&gt;The prospect of cracking open a unibody MacBook sounded daunting and I thought I might kill the magic hipster fairies that live inside of all Apple products. The good news is that OWC include all the tools you need to do the conversion and have &lt;a href="http://eshop.macsales.com/installvideos/owc_datadoubler/"&gt;fantastically detailed videos&lt;/a&gt; on all the exact steps for your particular machine. What I especially liked is that the Data Doubler came with replacement Phillips head screws to replace the hard to work with Torx head screws Apple uses in manufacturing. Now if I want to throw in a much bigger disk in the future, it will be that much easier to do it. That’s attention to detail!&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://vscoloroutput.codeplex.com/"&gt;VSColorOutput Extension by Blue Onion Software&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;Wading through the build output with a large project in Visual Studio is tedious. If only there were a way to use colors to have good lines in green, errors in red, and everything else in a gray it would be much easier to see what’s going on. Fortunately, Mike Ward over at Blue Onion Software did exactly that with VSColorOutput extension and it’s on my can’t live without list. Even better is that the code is open source on CodePlex so if you have never written a Visual Studio extension, it’s a great example.&lt;/p&gt;  &lt;p&gt;Since I’m talking about Blue Onion, make sure to subscribe to Mike’s &lt;a href="http://blueonionsoftware.com/blog.aspx"&gt;blog&lt;/a&gt;. His Friday Links posts always have something in them that I didn’t know about or find really interesting. My personal favorite category is the “Stuff I Just Like” links.&lt;/p&gt;  &lt;h3&gt;Microsoft IT VPN&lt;/h3&gt;  &lt;p&gt;It’s no surprise to you but there are a lot of problems with most VPN software. We have to use many different VPN solutions with all our clients and most of them range from painful to an all out death assault on your machine. You know, small issues like you can either VPN or hit the whole Internet but not both, each requires different anti virus software some of which are not up to date, and so on. Sadly, unless you are a Microsoft Employee or approved vendor you won’t get to see VPN software done outstandingly well. Microsoft IT has this awesome solution that uses smart cards in your badges before you connect, decent connection speed, killer security when you are connected, and never interferes with anything on your machine. &lt;/p&gt;  &lt;p&gt;I really wish Microsoft would do some white papers on their IT VPN setup because it so much better than any other I’ve seen. Hopefully mentioning the internal VPN solution has won’t kill my NDA with Microsoft. I’m sure like any internal IT group, Microsoft IT only gets noticed when something isn’t working, but I just love their VPN solution and wanted to give them a solid shout out.&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.tfspreview.com"&gt;TFS Preview from Microsoft&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;Since TFS 2005 I’ve been running my own domain so I can use TFS and get experience with all of its facets. It was all a bit of overkill, because all I really need for my personal work is TFS Basics, but that wasn’t offered back in the day. TFS is an amazing product and it offers many bells and whistles that provide all the reporting and legal requirements that up to the largest organization requires. However, one thing I’ve noticed is that many teams use the same parts of TFS such as product backlog, bug tracking, version control, and build management, but never touch other pieces such as the SharePoint integration. &lt;/p&gt;  &lt;p&gt;The TFS team has certainly noticed the same phenomenon and also saw an opportunity to provide hosted TFS. While TFS Preview isn’t formally in a beta with Dev 11 yet, I feel it’s the true killer release of TFS. For many teams it will hit the 90% sweet spot of their TFS usage, most likely provide a Service Level Agreement for uptime better than many internal IT organizations can offer, and be cheaper in the long run.&lt;/p&gt;  &lt;p&gt;This last month I set up a full project with one-week sprints to work through using TFS Preview using the Scrum 2.0 template and I’m far more than impressed, I want to start throwing gobs of money at Microsoft right now! I couldn’t believe how polished the whole web experience has become and the Scrum board is my favorite Web 2.0 page ever. Other than companies with specific legal requirements for running your own TFS server, I can’t see why anyone would ever need to run their own TFS server. I wonder if there’s a business opportunity to offer automated migration of work items and check ins between your old server and the spiffy TFS Preview?&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.parallels.com/products/desktop/"&gt;Parallels Desktop for Mac from Parallels&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;After Apple introduced Boot Camp that lets you boot the Macs into Windows, I was in all sorts of love because it is great hardware combined with zero crapware on Windows. I was more than happy to reboot between OS X and Windows whenever I needed to use one or the other. When Parallels first announced support for utilizing your Boot Camp a while ago (version 2.5), I gave it a try but quickly gave up because Windows and Office activations triggered whenever I switched between Boot Camp and Parallels. While I could have created a separate dedicated virtual machine, I didn’t want to waste the disk space for a second copy of Windows nor go through the installation hell of setting up a development machine twice and then trying to keep everything in sync between them.&lt;/p&gt;  &lt;p&gt;When I bought my new Mac Book Pro, I figured I’d give Parallels another shot because being able to utilize Windows no matter if I was running OS X or Boot Camp seems very enticing. With version 7 the Parallels team completely and totally nailed it! I installed Windows in Boot Camp and activated it. Switching back to OS X, I installed Parallels, fired up the Boot Camp partition in a VM activated Windows again and that was it. I can use Windows (and Microsoft Office) either way and &lt;em&gt;everything just works perfectly&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;Parallels made it very easy to use the Windows VM full screen so that’s how I rolled for my initial usage. I’d read about the Coherence mode that allows all Windows applications to appear like normal OS X windows, but didn’t think it would be very useful. Let’s just say I was incredibly wrong. I love how smooth and seamless having all your windows from both operating systems running side by side. My wife came into my office and looking at the monitor could not figure out which OS I was running which I thought was pretty funny.&lt;/p&gt;  &lt;p&gt;I just had a brilliant thought! With Windows 8 supporting Hyper-V on the desktop, if Microsoft would support your Apple OS X partition in Hyper-V you’d have the best of all possible worlds! Microsoft could call the feature Camp Boot just to make it even cooler. Being able to run OS X applications when you need them from Windows 8… Oh, please don’t make me wake up from this dream. &amp;lt;Grin!/&amp;gt;&lt;/p&gt;  &lt;h3&gt;Holiday Leftover Turkey Sandwiches&lt;/h3&gt;  &lt;p&gt;My wife is an amazing cook. If you ever meet me in person you will be able to tell that from my girth. Over the holidays she wanted to make a roast turkey so I certainly did not stand in the way because I love the big bird. While the turkey dinner is great, the leftovers are even better. Here’s the ultimate recipe for the food of the gods.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Two slices of very fresh squishy white bread&lt;/li&gt;    &lt;li&gt;Spread Hellman’s mayonnaise on both internal sides of the bread (this is the secret!)&lt;/li&gt;    &lt;li&gt;Fill the bottom bread with a layer of turkey about a quarter inch thick&lt;/li&gt;    &lt;li&gt;Take a salt grinder filled with sea salt and lightly salt the layer of turkey&lt;/li&gt;    &lt;li&gt;Place a single layer of freshly chilled lettuce on the turkey before putting the top slice of bread on the sandwich&lt;/li&gt;    &lt;li&gt;Carefully mash the sandwich down until the bread conforms around the turkey&lt;/li&gt;    &lt;li&gt;DO NOT CUT THE SANDWICH IN HALF&lt;/li&gt;    &lt;li&gt;Pick up with both hands and enjoy!&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So what have you find readers been enjoying over the last month?&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20473" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Recommended/default.aspx">Recommended</category><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Reviews/default.aspx">Reviews</category></item><item><title>Windows 8 Slate Review</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2011/12/28/windows-8-slate-review.aspx</link><pubDate>Wed, 28 Dec 2011 11:36:04 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20470</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>5</slash:comments><description>About a week ago, I purchased a Samsung Series 7 Slate PC to learn more about the Windows 8 operating system and to test applications I will be developing primarily with C# and Xaml. The laptop ships with Windows 7 installed, but I quickly wiped the existing install and overlaid it with Windows 8. The process for the most part went smoothly. I had to acquire some Windows 7 drivers and install them in compatibility mode in order for the tablet to recognize orientation changes, and I still cannot get...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2011/12/28/windows-8-slate-review.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20470" width="1" height="1"&gt;</description></item><item><title>NuGet Nugget: File-System Based Package Stores</title><link>http://www.wintellect.com/CS/blogs/jgarland/archive/2011/12/17/nuget-nugget-file-system-based-package-stores.aspx</link><pubDate>Sat, 17 Dec 2011 02:53:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20456</guid><dc:creator>jgarland</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;A recent network “hiccup” posed a bit of a challenge to a demo that was built around showing how the &lt;A href="http://watwp.codeplex.com/"&gt;Windows Azure Toolkit for Windows Phone&lt;/A&gt; (WATWP) &lt;A href="http://www.nuget.org/"&gt;NuGet&lt;/A&gt; packages make it easy to add &lt;A href="http://www.windowsazure.com/"&gt;Windows Azure&lt;/A&gt; cloud features to a &lt;A href="http://www.microsoft.com/windowsphone"&gt;Windows Phone 7&lt;/A&gt; application.&amp;nbsp; So how do you access NuGet content when a network connection isn’t available?&amp;nbsp; What if you want to exert some management over the updates that are exposed to the developers in your enterprise, including exposing often-used or internal-use assets?&lt;/P&gt;
&lt;P&gt;It turns out that NuGet offers some functionality that addresses these scenarios.&amp;nbsp; In addition to supporting the ability to set up your own package server (also known as &lt;A href="http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds#Creating_Remote_Feeds"&gt;Creating Remote Feeds&lt;/A&gt; in the &lt;A href="http://docs.nuget.org/"&gt;NuGet documentation&lt;/A&gt;), there is the ability to consume packages collected in a directory – either a network share or a local file-system folder.&amp;nbsp; This is illustrated in the NuGet documentation under the subtopic "&lt;A href="http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds#Creating_Local_Feeds"&gt;Creating Local Feeds&lt;/A&gt;” within the “&lt;A href="http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds"&gt;Hosting Your Own NuGet Feeds&lt;/A&gt;” topic.&lt;/P&gt;
&lt;H1&gt;Populating a File-System Based Package Store&lt;/H1&gt;
&lt;P&gt;Any folder that contains NuGet .nupkg files can be set to be as a file-system based package server.&amp;nbsp; From my own use, folders that contain subfolders with .nupkg files will also work, allowing for organization and hierarchy.&amp;nbsp; If you already have a Visual Studio solution that has references to NuGet packages, moving these packages into such a local package store can be quite simple (especially for demos!)&amp;nbsp; Just locate the “packages” folder that is created when the NuGet packages are added&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/jgarland/image_2DCBB21B.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://www.wintellect.com/CS/blogs/jgarland/image_thumb_13F77BEC.png" width=244 height=156&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The entire package folder is not required, since the nupkg files are really Zip files that contain all of the necessary contents.&amp;nbsp; Search for files that end with the .nupkg extension.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTML9fbf7a_73040944.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title=SNAGHTML9fbf7a border=0 alt=SNAGHTML9fbf7a src="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTML9fbf7a_thumb_7F91B660.png" width=508 height=275&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Simply copy all of these files into the folder you are using for your file-system based package store.&amp;nbsp; Note that a wider set of packages is available in your local package cache, which is normally maintained in &amp;lt;UserFolder&amp;gt;\AppData\Local\NuGet\Cache, and can be accessed from Visual Studio via Tools-Library Package Manager-Package Manager Settings, and click the “Browse” button in the General section of the Package Manager settings node.&lt;/P&gt;
&lt;H1&gt;Using File-Based Package Stores&lt;/H1&gt;
&lt;P&gt;To tell Visual Studio to consume file-based package stores, bring up the settings dialog (via Tools-Library Package Manager-Package Manager Settings or through the other accessors in Visual Studio) and select the Package Sources section of the Package Manager settings node.&amp;nbsp; Provide a name and type in the path or browse to the package location and click the Add button.&amp;nbsp; Note that the elements in the Available Package Sources list are shown in a check-list-box – they can be enabled or disabled.&amp;nbsp; Elements in the list can also be reordered in order to determine the precedence in which the sources are searched for matching packages.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTMLab5b5b_5E3210C4.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title=SNAGHTMLab5b5b border=0 alt=SNAGHTMLab5b5b src="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTMLab5b5b_thumb_212DDF32.png" width=491 height=286&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;When adding NuGet package references to your project in Visual Studio via the Manage NuGet Packages dialog, note that the newly named source now appears within the “Online” package listing section.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTMLb09c32_270882CB.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title=SNAGHTMLb09c32 border=0 alt=SNAGHTMLb09c32 src="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTMLb09c32_thumb_1A9A5FA2.png" width=499 height=282&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The new source is also available as a pulldown option in the Package Manager Console window.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTMLb430e2_009679B3.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-RIGHT-WIDTH:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;PADDING-TOP:0px;" title=SNAGHTMLb430e2 border=0 alt=SNAGHTMLb430e2 src="http://www.wintellect.com/CS/blogs/jgarland/SNAGHTMLb430e2_thumb_600F3A00.png" width=658 height=135&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As I’ve been digging into NuGet more lately, I’ve been quite impressed by the functionality it exposes.&amp;nbsp; There’s much more to it than just a right-click menu item and a dialog box&amp;nbsp; that adds and updates project assembly references.&amp;nbsp; Some of my current favorites include &lt;A href="http://docs.nuget.org/docs/start-here/managing-nuget-packages-using-the-dialog#Managing_Packages_for_the_Solution"&gt;managing package references at the solution level&lt;/A&gt; and &lt;A href="http://docs.nuget.org/docs/workflows/package-visualizer"&gt;visualizing NuGet package chains&lt;/A&gt;.&amp;nbsp; Be sure to check out the NuGet docs in case you have yet to discover your favorite.&lt;/P&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20456" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/NuGet/default.aspx">NuGet</category></item><item><title>DevBoston (Waltham) Presentation Content</title><link>http://www.wintellect.com/CS/blogs/jgarland/archive/2011/12/15/devboston-cambridge-presentation-content.aspx</link><pubDate>Thu, 15 Dec 2011 02:44:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20449</guid><dc:creator>jgarland</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;Many thanks to the attendees of my presentation tonight covering Developing Cloud Enabled Windows Phone Applications with Windows Azure.&amp;nbsp; I apologize once again for the technical network-related &lt;A href="http://en.wikipedia.org/wiki/Gremlin"&gt;gremlins&lt;/A&gt; that decided to attack us tonight…hopefully the workaround covered the necessary ground and everyone was able to see the concepts I was trying to show.&lt;/P&gt;
&lt;P&gt;As promised, I have posted the content for the presentation &lt;A href="https://skydrive.live.com/#cid=511766C2B5C5BDD3&amp;amp;id=511766C2B5C5BDD3%211078"&gt;here&lt;/A&gt;.&amp;nbsp; This includes the slide deck with the various resource links, as well as the final project.&amp;nbsp; As I mentioned, I have “sanitized” the configuration of the project to omit my specific &lt;A href="http://www.windowsazure.com/en-us/home/tour/access-control/"&gt;Access Control (ACS)&lt;/A&gt; settings.&amp;nbsp; This involved changing the AccessControlResources.xaml file in the phone project and the Web.config file in the web role project.&amp;nbsp; Look for the text [your-xxx-here] for where to substitute your own ACS information.&lt;/P&gt;
&lt;P&gt;Because the network issues prevented us from accessing &lt;A href="http://www.nuget.org/"&gt;the NuGet site&lt;/A&gt; or repository, I wanted to be sure to list the packages that were used in these projects:&lt;/P&gt;
&lt;TABLE cellSpacing=0 cellPadding=2&gt;

&lt;TR&gt;
&lt;TD&gt;&lt;A href="http://www.nuget.org/packages/Phone.Storage"&gt;Phone.Storage&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Adds support in the phone project to access Azure Storage.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="http://www.nuget.org/packages/WindowsAzure.Storage.Proxy.AccessControl"&gt;WindowsAzure.Storage.Proxy.AccessControl&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Adds support in the server-side MVC3 based web role to field secured storage requests using ACS to generate the authentication token&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="http://www.nuget.org/packages/Phone.Storage.AccessControl"&gt;Phone.Storage.AccessControl&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Adds support in the phone project for interacting with ACS-secured storage, including a login page with the ACS-aware login control.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="http://www.nuget.org/packages/WindowsAzure.Notifications"&gt;WindowsAzure.Notifications&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Adds support in the server-side MVC3 based web role to handle registration &amp;amp; storage for Push Notification endpoints&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="http://www.nuget.org/packages/Phone.Notifications.BasePage"&gt;Phone.Notifications.BasePage&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Adds support in the phone project (including a UI page) for enabling notifications in the application and registering with server-side push notification endpoint.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="http://www.nuget.org/packages/MpnsRecipe"&gt;MPNSRecipe&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Adds the MPNS Recipe, used in the worker role project.&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20449" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Azure/default.aspx">Azure</category><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Windows+Phone/default.aspx">Windows Phone</category></item><item><title>Silverlight 5 Released: Myth vs. Fact</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2011/12/09/silverlight-5-released-myth-vs-fact.aspx</link><pubDate>Fri, 09 Dec 2011 12:12:02 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20422</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>4</slash:comments><description>It is very exciting to see the release of Silverlight 5 today, despite all of the rumors flying around the Web. Read the original release announcement from the Silverlight Team here . This is proof positive the team made a commitment to release a new version by the end of the year and stuck to it. This release offers major functionality over prior releases and is something I believe has the potential to revolutionize development for line of business applications, or I wouldn't be writing a book about...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2011/12/09/silverlight-5-released-myth-vs-fact.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20422" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/silverlight+5/default.aspx">silverlight 5</category></item><item><title>My .NET Nuggets Keynote Talk From Houston Tech Fest October 15th, 2011</title><link>http://www.wintellect.com/CS/blogs/jeffreyr/archive/2011/12/04/my-net-nuggets-keynote-talk-from-houston-tech-fest-october-15th-2011.aspx</link><pubDate>Sun, 04 Dec 2011 23:41:54 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20406</guid><dc:creator>JeffreyR</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;a href="http://usergroup.tv/videos/net-nuggets---houston-tech-fest-keynote"&gt;http://usergroup.tv/videos/net-nuggets---houston-tech-fest-keynote&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20406" width="1" height="1"&gt;</description></item><item><title>Handling Extremely Large Data Sets in Silverlight</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2011/11/20/handling-extremely-large-data-sets-in-silverlight.aspx</link><pubDate>Sun, 20 Nov 2011 09:00:01 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20372</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>4</slash:comments><description>While writing Chapter 14 of my book, Designing Silverlight Business Applications: Best Practices for Using Silverlight Effectively in the Enterprise (Microsoft .NET Development Series) I focused on an area that is quite common with line of business applications: extremely large data sets. In the example I generated almost 1,000,000 contact rows to illustrate how they would be managed by the Silverlight client. Like many software problems, there are many solutions; here is an excerpt of the three...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2011/11/20/handling-extremely-large-data-sets-in-silverlight.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20372" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/entity+framework/default.aspx">entity framework</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/large+data+sets/default.aspx">large data sets</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/odata/default.aspx">odata</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/silverlight/default.aspx">silverlight</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/wcf+ria/default.aspx">wcf ria</category></item><item><title>Boston .Net Code Camp Presentation Content</title><link>http://www.wintellect.com/CS/blogs/jgarland/archive/2011/11/06/boston-net-code-camp-presentation-content.aspx</link><pubDate>Sun, 06 Nov 2011 03:41:17 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20339</guid><dc:creator>jgarland</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I would like to thank the organizers and attendees of the recent 16th (wow!) &lt;a href="http://codecampboston.eventbrite.com/"&gt;Boston Code Camp&lt;/a&gt; where I did a talk on Developing Cloud-Enabled Windows Phone Applications with Windows Azure – and special thanks to everyone who stuck it out once the snow started falling in order to catch my talk.&amp;#160; Obviously, it took longer than expected to get this content posted – &lt;a href="http://www.nashuatelegraph.com/news/938395-196/halloween-weekend-storm-scatters-debris-kills-power.html"&gt;Nashua got hit especially hard by the storm&lt;/a&gt;, including a 75% city-wide power outage the day following the Code Camp event, along with accompanying telecom and even cellular outages.&amp;#160; I am happy to say that I finally got my power turned back on mid-week, and am slowly but surely digging out of the mountain of backlog that piled up during the multi-day outage.&lt;/p&gt;  &lt;p&gt;The content can be found &lt;a href="https://skydrive.live.com/?cid=511766c2b5c5bdd3&amp;amp;sc=documents&amp;amp;id=511766C2B5C5BDD3%211028#cid=511766C2B5C5BDD3&amp;amp;id=511766C2B5C5BDD3%211028&amp;amp;sc=documents"&gt;here&lt;/a&gt;.&amp;#160; Because I demoed &lt;a href="http://www.microsoft.com/windowsazure/features/accesscontrol/"&gt;ACS&lt;/a&gt;, some of the items that are placed in the project would normally reference my “real” Azure account…they have been removed and replaced with the phrase “YOUR CONTENT HERE.”&amp;#160; You will need to replace these values with your own from the Azure ACS management portal in order to be able to run the provided code.&amp;#160; Also, in order to use the Azure Emulator, be sure to run Visual Studio in Admin mode when working with this project.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20339" width="1" height="1"&gt;</description></item><item><title>Is That a WeakReference In Your Gen 2 or Are You Just Glad to See Me?</title><link>http://www.wintellect.com/CS/blogs/jrobbins/archive/2011/10/29/is-that-a-weakreference-in-your-gen-2-or-are-you-just-glad-to-see-me.aspx</link><pubDate>Sat, 29 Oct 2011 05:39:58 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20323</guid><dc:creator>jrobbins</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;Sometimes it’s easy to see why your .NET server application is using so much memory, but other times it makes no sense at all. I was at Microsoft earlier this week and someone who’d taken my &lt;a href="http://www.wintellect.com/Training/Courses/Mastering-.NET-Debugging"&gt;debugging class&lt;/a&gt; stopped me and asked an excellent question. The scenario they had was their service memory would just grow at a steady rate without ever going down. The team found a fix for the memory leak through savvy internet searching but found it frustrating they could not see the answer through SOS and &lt;a href="http://www.stevestechspot.com/default.aspx"&gt;SOSEX&lt;/a&gt;. The person gave me the dumps as they wanted to know how they could have found the issue quicker. The research was pretty interesting so I thought I’d share the results.&lt;/p&gt;  &lt;p&gt;The first command you always run after loading SOS is !dumpheap –stat so you can get a picture of the overall memory usage. On the dumps the team gave me, the result showed something very similar to the following at the end of the output:&lt;/p&gt;  &lt;p&gt;   &lt;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:9ce60acf-dcb2-40b2-8dc3-a66b78434d04" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;0000000000386ce0        9         7328      Free&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;000007fee1d26ac8      464        18720 System.String&lt;/li&gt; &lt;li&gt;000007fee1d2afd0       34       183560 System.Object[]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;000007fee1d478a0    11098       355136 System.WeakReference&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;In the real mini dump those WeakReferences were taking up over 270MB! The weak can kill you in the .NET world.&lt;/p&gt;  &lt;p&gt;Whenever I see a &lt;a href="http://msdn.microsoft.com/en-us/library/system.weakreference.aspx"&gt;WeakReference&lt;/a&gt;, you’re looking at some form of cache because it’s a special class that you use to reference an object, but allow that object to be garbage collected. So we know someone’s caching something, but who is doing the caching?&lt;/p&gt;  &lt;p&gt;Running !dumpheap –type System.Weak yields the following output:&lt;/p&gt;  &lt;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:ab5bd96e-c47e-4ef4-8d9d-d3aeef3d6ceb" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;0000000002603f88 000007fee1d478a0       32     &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;0000000002603fa8 000007fee1d478a0       32     &lt;/li&gt; &lt;li&gt;0000000002603fc8 000007fee1d478a0       32     &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;total 0 objects&lt;/li&gt; &lt;li&gt;Statistics:&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;              MT    Count    TotalSize Class Name&lt;/li&gt; &lt;li&gt;000007fee1d4f320        1           40 System.Collections.Generic.List`1&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                       [[System.WeakReference, mscorlib]]&lt;/li&gt; &lt;li&gt;000007fee1d478a0    11098       355136 System.WeakReference&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Total 11099 objects&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Yep, that List&amp;lt;WeakReference&amp;gt;, is probably the issue. So it’s time to look who created it by doing a !gcroot on it’s address.&lt;/p&gt;  &lt;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:39efb27f-e56f-4143-9143-9fdf007dd02d" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;0:004&amp;gt; !gcroot 00000000025ad460 &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Note: Roots found on stacks may be false positives. Run &amp;quot;!help gcroot&amp;quot; for&lt;/li&gt; &lt;li&gt;more info.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Scan Thread 0 OSTHread b3c&lt;/li&gt; &lt;li&gt;Scan Thread 2 OSTHread 3dc&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DOMAIN(0000000000399A60):HANDLE(Pinned):4c17d8:Root:  00000000125a7048(System.Object[])-&amp;gt;&lt;/li&gt; &lt;li&gt;  00000000025ad460(System.Collections.Generic.List`1[[System.WeakReference, mscorlib]])&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;    &lt;p&gt;Life just got miserable. .NET stores static fields in an Object Array for each app domain. The static array is pinned in memory so that’s the clue. Sadly, with .NET 4 SOS the only way to see which object has the List&amp;lt;WeakReference&amp;gt; as a field without manually dumping each object in the heap. Back in the .NET 1.1 days there was a way to pretty easily figure out the holding class, but Microsoft changed the implementation so it no longer works.&lt;/p&gt;  &lt;p&gt;Fortunately, there is a way to figure out those static fields. All it takes is a little investment in the Professional edition on the amazing &lt;a href="http://memprofiler.com/"&gt;.NET Memory Profiler&lt;/a&gt;. Always purchase the Professional edition because that’s the version with the advanced feature to open mini dumps. Opening large mini dumps can take a long time as .NET Memory Profiler has to build up the reference chains and other data. However, I’m more than happy to let .NET Memory Profiler take it’s time because to do all of that work manually in SOS would consume months and make me give up technology.&lt;/p&gt;  &lt;p&gt;After opening the mini dump of my sample program, which took about 60 seconds, I typed List into the Overview tab to narrow down to the List&amp;lt;WeakReference&amp;gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/image_68F31063.png"&gt;&lt;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://www.wintellect.com/CS/blogs/jrobbins/image_thumb_798B0B51.png" width="668" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Double clicking on the on List&amp;lt;WeakRefefence&amp;gt; takes you to the Type details tab and shows you exactly who owns that pesky static.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/image_4C95A876.png"&gt;&lt;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://www.wintellect.com/CS/blogs/jrobbins/image_thumb_0B1AF61D.png" width="678" height="194" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;It’s a &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.tracesource.aspx"&gt;TraceSource&lt;/a&gt; so we have the culprit! In fact, looking at the type instance graph shows the whole reference chain.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/image_0D084526.png"&gt;&lt;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://www.wintellect.com/CS/blogs/jrobbins/image_thumb_32FDF57C.png" width="211" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Looking at the TraceSource constructor in Reflector shows exactly where the WeakReference is created.&lt;/p&gt;  &lt;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:34f5b534-78b8-4428-bea9-984d993ea3c0" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; TraceSource(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; name, &lt;span style="color:#2b91af;"&gt;SourceLevels&lt;/span&gt; defaultLevel)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (name == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    }&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (name.Length == 0)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    }&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.sourceName = name;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.switchLevel = defaultLevel;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;lock&lt;/span&gt; (tracesources)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        _pruneCachedTraceSources();&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        tracesources.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;WeakReference&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;));&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;    &lt;p&gt;The _pruneCachedTraceSources method is interesting and shows exactly why those WeakReferences are all stuck in Gen 2.&lt;/p&gt;  &lt;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:3fead42e-f6bb-4f8e-9b35-2dfd096f6d3d" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; _pruneCachedTraceSources()&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;lock&lt;/span&gt; (tracesources)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (s_LastCollectionCount != &lt;span style="color:#2b91af;"&gt;GC&lt;/span&gt;.CollectionCount(2))&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;WeakReference&lt;/span&gt;&amp;gt; collection = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;WeakReference&lt;/span&gt;&amp;gt;(tracesources.Count);&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; tracesources.Count; i++)&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (((&lt;span style="color:#2b91af;"&gt;TraceSource&lt;/span&gt;)tracesources[i].Target) != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;                {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                    collection.Add(tracesources[i]);&lt;/li&gt; &lt;li&gt;                }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            }&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (collection.Count &amp;lt; tracesources.Count)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            {&lt;/li&gt; &lt;li&gt;                tracesources.Clear();&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                tracesources.AddRange(collection);&lt;/li&gt; &lt;li&gt;                tracesources.TrimExcess();&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            }&lt;/li&gt; &lt;li&gt;            s_LastCollectionCount = &lt;span style="color:#2b91af;"&gt;GC&lt;/span&gt;.CollectionCount(2);&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        }&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Basically, the cache is only cleared whenever new TraceSource is added or a call to Trace.Refresh is made. In the Microsoft code they were mistakenly allocating a new TraceSource and &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.traceswitch.aspx"&gt;TraceSwitch&lt;/a&gt;, which also has the WeakReference list, every time a connection came in. How this happened is that they converted what was a singleton static object into something they allocated on each call. That meant lots of TraceSource and TraceSwitch allocations but with this magic underneath causing big memory usage. You’ve probably guessed by now that you should always make your TraceSource and TraceSwitch fields statics so you hold only the one instance and avoid this potential memory issue.&lt;/p&gt;  &lt;p&gt;Note that I’m not saying the implementation of TraceSource or TraceSwitch is wrong as it gives you the ability to refresh all your tracing in one call instead of making you manage all the individual instances yourself. That’s a nice feature of the tracing system in .NET. The implementation just doesn’t expect that you’ll be allocating hundreds of thousands.&lt;/p&gt;  &lt;p&gt;While I would love SOS to have a better way to track down these static field problems, at least we do have a solution with .NET Memory Profiler. &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20323" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/WinDBG/default.aspx">WinDBG</category></item><item><title>Using Jounce Navigation to Create OOB Child Windows in Silverlight 5</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2011/10/21/using-jounce-navigation-to-create-oob-child-windows-in-silverlight-5.aspx</link><pubDate>Fri, 21 Oct 2011 12:22:03 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20312</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>0</slash:comments><description>One of the reasons I prefer to manage navigation as an event, rather than a strongly typed interface or handler, is because it allows for so much flexibility and extensibility in the navigation pipeline. In my Jounce framework , for example, the basic navigation event simply wires up an instance of a view to a view model and makes no presumptions about where that view belongs - it leaves positioning the view to the developer. The region manager simply listens for navigation events and passes the...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2011/10/21/using-jounce-navigation-to-create-oob-child-windows-in-silverlight-5.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20312" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/child+window/default.aspx">child window</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/Jounce/default.aspx">Jounce</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/navigation/default.aspx">navigation</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/OOB/default.aspx">OOB</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/out+of+browser/default.aspx">out of browser</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/silverlight+5/default.aspx">silverlight 5</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/silverlight+navigation/default.aspx">silverlight navigation</category></item><item><title>Working with PivotViewer and the CxmlCollectionSource</title><link>http://www.wintellect.com/CS/blogs/sloscialo/archive/2011/10/17/working-with-pivotviewer-and-the-cxmlcollectionsource.aspx</link><pubDate>Mon, 17 Oct 2011 22:39:14 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20301</guid><dc:creator>sloscialo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Microsoft’s PivotViewer control is an amazing tool for visualizing data and creating a unique UI for your application.&amp;#160; The one issue everyone seems to have with it, however, is its lack of styling capability.&amp;#160; In fact, working with PivotViewer in Expression Blend yields little in the way of styling or templating.&amp;#160; There are only a few color settings one can make, and some generic overall changes.&amp;#160;&amp;#160; Replacing the filter panel or info panel is not currently supported.&lt;/p&gt;  &lt;p&gt;What to do?&lt;/p&gt;  &lt;p&gt;Since we cannot style the filter panel, we need to hide it and put our own in.&amp;#160; Hiding the panel is relatively simple and straight-forward.&amp;#160; Simply put, you need to subclass the PivotViewer and override the OnApplyTemplates() method, then walk the tree until you find the filter panel.&amp;#160; Fortunately, tools like Snoop or Mole can help you determine where the filter panel resides.&amp;#160; Below is a snippet of code showing where the filter panel resides in the Silverlight 5 version of the PivotViewer.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnApplyTemplate()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.OnApplyTemplate();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;     Grid partContainer = (Grid)&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.GetTemplateChild(&lt;span style="color:#006080;"&gt;&amp;quot;PART_Container&amp;quot;&lt;/span&gt;);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;     CollectionViewerView cvv = ((CollectionViewerView)(partContainer).Children[2]);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;     Grid container = cvv.Content &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Grid;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;     Border viewerBorder = container.Children[1] &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Border;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;     Grid viewerGrid = viewerBorder.Child &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Grid;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;// Filter Panel&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;     viewerGrid.Children[2].Visibility = System.Windows.Visibility.Collapsed;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;NOTE: This is very brittle code and will most likely fail when Microsoft releases a new version of the PivotViewer.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now that the filter panel is gone, we need to create our own.&amp;#160; If you’re manually creating the facets and data in code, then you should have no trouble binding a new Filter control to your data structures.&amp;#160; But what if you’re using the CxmlCollectionSource and loading your data from a cxml external file?&lt;/p&gt;

&lt;p&gt;As anyone who’s worked with the CxmlCollectionSource can tell you, the facets and their filter values aren’t readily available for consumption.&amp;#160; In order to build up a collection of facets and filters, you to perform a little preprocessing.&amp;#160; The Items collection off the CxmlCollectionSource is the dataset you’re working with, however, getting values and properties for the items isn’t immediately apparent.&lt;/p&gt;

&lt;p&gt;My solution was to create a small class to hold the facet information I required:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; Facet&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Category { get; set; }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Value { get; set; }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; IsChecked { get; set; }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;In order to iterate through the Items collection, you need to wait until the CxmlCollectionSource finishes processing the .cxml document.&amp;#160; Since it occurs asynchronously, you can start your processing in the event handler for the StateChanged event.&amp;#160; That can look something like this (I’m not implementing an MVVM pattern for simplicity’s sake.&amp;#160; This is just part of the code-behind for the MainPage.xaml).&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnLoaded(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (_cxml == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;         _cxml = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; CxmlCollectionSource(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Uri(HtmlPage.Document.DocumentUri, &lt;span style="color:#006080;"&gt;&amp;quot;/Data/PivotViewerData.cxml&amp;quot;&lt;/span&gt;));&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         _cxml.StateChanged += CxmlStateChanged;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; CxmlStateChanged(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, CxmlCollectionStateChangedEventArgs e)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (e != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; e.NewState == CxmlCollectionState.Loaded)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;         MyPivot.PivotProperties = _cxml.ItemProperties.ToList();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;         MyPivot.ItemTemplates = _cxml.ItemTemplates;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;         MyPivot.ItemsSource = _cxml.Items;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt;         ProcessFacets();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum21"&gt;  21:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum22"&gt;  22:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.DataContext = _facetData;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum23"&gt;  23:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum24"&gt;  24:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum25"&gt;  25:&lt;/span&gt;     _cxml.StateChanged -= CxmlStateChanged;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum26"&gt;  26:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The next step is to iterate over the Items of the CxmlCollectionSource and build a dictionary of Facets and their properties.&amp;#160; The Items collection is a collection of PivotViewerItems that do not contain the actual values of the data elements.&amp;#160; Instead, you need to call a method, GetPropertyValue(id) in order to get the list of properties that particular data elements contains.&amp;#160; &lt;/p&gt;

&lt;p&gt;The ProcessFacets() method below simply iterates over each item in the data set and determines which properties it contains that are filterable and what the acceptable values are for each.&amp;#160; For example if your data has two filterable properties, such as “Ingredients” and “Serving Size”, these two facets could have a wide range of acceptable values for each data element.&amp;#160; The call to GetPropertyValue for “Ingredients” for an particular item may return “Oil” and “Vinegar”, while another item may return “Milk”, “Oil” and “Peanuts.”&amp;#160; The dictionary built by ProcessFacets will create a Key for “Ingredients” and add a List of four strings representing the four unique values.&lt;/p&gt;

&lt;p&gt;I think it may be clearer just to read the code below:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ProcessFacets()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;// Iterate through all the PivotViewerItems.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; _cxml.Items)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         &lt;span style="color:#008000;"&gt;// Determine what Propeties it has that are filterable.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;         var facets = from f &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; item.Properties&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;                      &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;                          (PivotViewerPropertyOptions.CanFilter ==&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;                           (f.Options &amp;amp; PivotViewerPropertyOptions.CanFilter))&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;                      select f;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;         &lt;span style="color:#008000;"&gt;// For each facet, get its values.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var f &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; facets)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;         {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;             &lt;span style="color:#008000;"&gt;// create a new facet if it doesn't exist.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!_facetData.Facets.ContainsKey(f.Id))&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;                 _facetData.Facets.Add(f.Id, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; List&amp;lt;Facet&amp;gt;());&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt;             &lt;span style="color:#008000;"&gt;// get the facet values.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum21"&gt;  21:&lt;/span&gt;             var props = item.GetPropertyValue(f.Id);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum22"&gt;  22:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum23"&gt;  23:&lt;/span&gt;             &lt;span style="color:#008000;"&gt;// there can be more than one value per facet.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum24"&gt;  24:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var p &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; props)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum25"&gt;  25:&lt;/span&gt;             {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum26"&gt;  26:&lt;/span&gt;                 &lt;span style="color:#008000;"&gt;// don't add the same one more than once.&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum27"&gt;  27:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!_facetData.Facets[f.Id].Any(o =&amp;gt; o.Value.Equals(p)))&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum28"&gt;  28:&lt;/span&gt;                     _facetData.Facets[f.Id].Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Facet()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum29"&gt;  29:&lt;/span&gt;                                                     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum30"&gt;  30:&lt;/span&gt;                                                         Category = f.Id,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum31"&gt;  31:&lt;/span&gt;                                                         Value = p.ToString(),&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum32"&gt;  32:&lt;/span&gt;                                                         IsChecked = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum33"&gt;  33:&lt;/span&gt;                                                     });&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum34"&gt;  34:&lt;/span&gt;             }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum35"&gt;  35:&lt;/span&gt;         }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum36"&gt;  36:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum37"&gt;  37:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;So, there you have it.&amp;#160; &lt;/p&gt;

&lt;p&gt;Armed with this data, you can now create your own filter panel and programmatically control the PivotViewer independently of the built-in panel.&amp;#160; All you would need to do from this point on is write the Xaml for your Filter view and bind the Facet data to it.&amp;#160; Finally, call SetViewerState on the PivotViewer and pass in the filter string built by your new view.&amp;#160; Note, however, that the filter string is a mini-language of a sorts and will require some processing in code to generate the appropriate parameter.&amp;#160; To get you started, I iterate over the dictionary like so:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;[] filters = _facetData.Values&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt;   .SelectMany(facet =&amp;gt; facet.Where(prop =&amp;gt; prop.IsChecked))&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;   .Select(prop =&amp;gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#006080;"&gt;&amp;quot;{0}=EQ.{1}&amp;quot;&lt;/span&gt;, prop.Category, prop.Value))&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;   .ToArray();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; filterString = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Join(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;amp;&amp;quot;&lt;/span&gt;, filters.ToArray());&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:'Consolas', courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt; MyPivotViewer.SetViewerState(filters.Length &amp;gt; 0 ? filterString : &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The PivotViewer is an extremely powerful tool to have in your arsenal, but it is not very customizable.&amp;#160; With a small hack and some understanding of the data set, some of its limitations can be overcome.&amp;#160;&amp;#160; I hope this post gets you on the road to creating your own custom PivotViewer applications.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20301" width="1" height="1"&gt;</description></item><item><title>Boston Phone Camp Presentation Materials</title><link>http://www.wintellect.com/CS/blogs/jgarland/archive/2011/10/14/boston-phone-camp-presentation-materials.aspx</link><pubDate>Fri, 14 Oct 2011 01:49:50 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20294</guid><dc:creator>jgarland</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I had a great time talking about the &lt;a href="http://watwp.codeplex.com/"&gt;Windows Azure Toolkit for Windows Phone&lt;/a&gt; at the Windows Phone Camp event in Cambridge, MA earlier today.&amp;#160; I have posted the slide deck &lt;a href="https://skydrive.live.com/?cid=511766c2b5c5bdd3&amp;amp;sc=documents&amp;amp;uc=1&amp;amp;id=511766C2B5C5BDD3%211005#cid=511766C2B5C5BDD3&amp;amp;id=511766C2B5C5BDD3%211005&amp;amp;sc=documents"&gt;here&lt;/a&gt; for those who are interested in getting at the web links it contains.&lt;/p&gt;  &lt;p&gt;If you missed the event and/or are interested in other Windows Phone Camp events, more information is available &lt;a href="http://blogs.msdn.com/b/devfish/archive/2011/08/31/windows-phonecamps-east-coast-2011.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20294" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Azure/default.aspx">Azure</category><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Events/default.aspx">Events</category><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://www.wintellect.com/CS/blogs/jgarland/archive/tags/Windows+Phone/default.aspx">Windows Phone</category></item><item><title>Quick Tip: Design-Time Views for Regions</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2011/10/11/quick-tip-design-time-views-for-regions.aspx</link><pubDate>Tue, 11 Oct 2011 19:07:02 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20289</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>0</slash:comments><description>If you've worked with the Region Management pattern before, one source of frustration can be the lack of a design-time view. While you can compose individual views to be designer-friendly, the aggregate views that mark regions often end up devoid of anything useful. A simple little trick, however, can change that. You may be familiar with creating design-friendly view models , but the extensions for Blend work the same with views. For example, consider a main page that has a layout divided into regions...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2011/10/11/quick-tip-design-time-views-for-regions.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20289" width="1" height="1"&gt;</description></item><item><title>Using Visual States to Set Focus on a Control</title><link>http://www.wintellect.com/CS/blogs/jlikness/archive/2011/10/07/using-visual-states-to-set-focus-on-a-control.aspx</link><pubDate>Fri, 07 Oct 2011 12:58:03 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20278</guid><dc:creator>C#er : IMage</dc:creator><slash:comments>0</slash:comments><description>A common problem encountered in Silverlight applications is how to set the focus properly when transitioning between controls. For example, in the reference application I'm writing for the book Designing Silverlight Business Applications there is the option to either edit an existing record or create a new one. The result of clicking the appropriate button is a panel overlay that zooms into view. Obviously, it makes sense once the panel is rendered to set the focus to the first field so the user...(&lt;a href="http://www.wintellect.com/CS/blogs/jlikness/archive/2011/10/07/using-visual-states-to-set-focus-on-a-control.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20278" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/focus/default.aspx">focus</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/Jounce/default.aspx">Jounce</category><category domain="http://www.wintellect.com/CS/blogs/jlikness/archive/tags/visual+state+manager/default.aspx">visual state manager</category></item></channel></rss>
