<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-681692173192435184</id><updated>2011-11-28T00:14:02.404Z</updated><category term='C#'/><category term='ITIL'/><category term='Live Writer'/><category term='Code'/><category term='Visual Studio'/><category term='Vista'/><category term='VMWare'/><category term='MythTV'/><category term='Data Visualization'/><category term='Asp.Net'/><category term='Anti Virus'/><category term='Sharp Architecture'/><category term='ITSM'/><category term='FileTreeView'/><category term='XML'/><category term='Virtual Machines'/><category term='Ubuntu'/><category term='#Architecture'/><category term='Via Epia'/><category term='Silverlight'/><category term='Utilities'/><category term='Windows 7'/><title type='text'>Skot's code and other ponderings</title><subtitle type='html'>Some code (mostly C#) and the supporting infrastructure, apps, utilities and config that the typical amateur coder falls across.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-9161931295216240171</id><published>2011-02-21T16:50:00.000Z</published><updated>2011-02-21T16:50:25.999Z</updated><title type='text'>It's all on http://www.scottleckie.com</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p$1&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p$1&gt;My blog is now on &lt;a href="http://www.scottleckie.com/"&gt;http://www.scottleckie.com&lt;/a&gt;&lt;br /&gt;&lt;p$1&gt;&lt;/p$1&gt;&lt;/p$1&gt;&lt;/div&gt;&lt;p$1&gt;&lt;/p$1&gt;&lt;/p$1&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-9161931295216240171?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/9161931295216240171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2011/02/its-all-on-httpwwwscottleckiecom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/9161931295216240171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/9161931295216240171'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2011/02/its-all-on-httpwwwscottleckiecom.html' title='It&apos;s all on http://www.scottleckie.com'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-2658863660506039753</id><published>2010-02-11T23:54:00.002Z</published><updated>2010-03-06T00:55:45.876Z</updated><title type='text'>C'mon - how hard can it be to add a combobox to a Silverlight application?</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2010/02/cmon-how-hard-can-it-be-to-add-a-combobox-to-a-silverlight-application/"&gt;&lt;em&gt;http://www.scottleckie.com/2010/02/cmon-how-hard-can-it-be-to-add-a-combobox-to-a-silverlight-application/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Foreign keys, WCF/RIA Services, Entity Framework = very hard. When I figure it out I'll post back.. :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-2658863660506039753?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/2658863660506039753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2010/02/cmon-how-hard-can-it-be-to-add-combobox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/2658863660506039753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/2658863660506039753'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2010/02/cmon-how-hard-can-it-be-to-add-combobox.html' title='C&apos;mon - how hard can it be to add a combobox to a Silverlight application?'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-8090904399339163335</id><published>2009-11-28T03:09:00.002Z</published><updated>2010-03-06T01:01:02.241Z</updated><title type='text'>Silverlight: how to decode a uri and pass the arguments to your method</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/11/silverlight-how-to-decode-a-uri-and-pass-the-arguments-to-your-method/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/11/silverlight-how-to-decode-a-uri-and-pass-the-arguments-to-your-method/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;The problem is that you need to pass your parameters to your Silverlight class and &lt;em&gt;hopefully&lt;/em&gt; deal with them. First and foremost, how do you recognise that you’ve been called? Well, via the &lt;em&gt;OnNavigatedTo&lt;/em&gt; event… this event is fired for every Silverlight page.&lt;br /&gt;OK, so we captured the OnNavigatedTo event. What next? Well, next we try to decode the uri that was passed to the SilverLight app. Let’s pretend for a moment that we were called via “http:&amp;lt;YourSource&amp;gt;?title=myTitle&amp;amp;search=special”&lt;br /&gt;We now have two session variables set; title=myTitle and search=special&lt;br /&gt;So, how do we decode these? The easiest way is to use the SilverLight libraries to query the NavigationContext object;&lt;br /&gt;if (this.NavigationContext.QueryString.ContainsKey("title")) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Title = this.NavigationContext.QueryString["title"];&lt;br /&gt;if (this.NavigationContext.QueryString.ContainsKey("search")) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; searchType = this.NavigationContext.QueryString["search"];&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-8090904399339163335?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/8090904399339163335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/11/silverlight-how-to-decode-uri-and-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8090904399339163335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8090904399339163335'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/11/silverlight-how-to-decode-uri-and-pass.html' title='Silverlight: how to decode a uri and pass the arguments to your method'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-9219879342027323981</id><published>2009-10-07T01:06:00.002+01:00</published><updated>2010-03-06T01:02:38.509Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Silverlight 3; Building a navigation tree from static and dynamic data</title><content type='html'>&lt;h4&gt;&lt;em&gt;This post has moved to http://www.scottleckie.com/2009/10/silverlight-3-building-a-navigation-tree-from-static-and-dynamic-data/&lt;/em&gt;&lt;/h4&gt;&lt;h4&gt;The problem&lt;/h4&gt;Build a navigation tree that allows users to navigate to specific static pages, from static entries in the menus, and to pages that are built dynamically based on selections from the menu.&lt;br /&gt;&lt;h4&gt;&lt;/h4&gt;&lt;h4&gt;The Solution in a picture&lt;/h4&gt;&lt;a href="http://lh6.ggpht.com/_eUBd1u0gFH0/SsvbmwpbAmI/AAAAAAAAAEc/pRegCrjog1g/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="128" src="http://lh6.ggpht.com/_eUBd1u0gFH0/SsvbnB0eiiI/AAAAAAAAAEg/Z2HJ3Wm4gkk/image_thumb.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;h4&gt;The solution in code&lt;/h4&gt;Build the static menu selections in xaml, being sure to name each of the major headings with “Tag” entries;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"LayoutRoot"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeView&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"treeview"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;BorderThickness&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0"&lt;/span&gt; &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;Margin&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0"&lt;/span&gt; &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;SelectedItemChanged&lt;/span&gt;=&lt;span style="color: blue;"&gt;"treeview_SelectedItemChanged"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeView.Background&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;LinearGradientBrush&lt;/span&gt; &lt;span style="color: red;"&gt;EndPoint&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0.5,1"&lt;/span&gt; &lt;span style="color: red;"&gt;StartPoint&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0.5,0"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;GradientStop&lt;/span&gt; &lt;span style="color: red;"&gt;Color&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AntiqueWhite"&lt;/span&gt; &lt;span style="color: red;"&gt;Offset&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;GradientStop&lt;/span&gt; &lt;span style="color: red;"&gt;Color&lt;/span&gt;=&lt;span style="color: blue;"&gt;"White"&lt;/span&gt; &lt;span style="color: red;"&gt;Offset&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;LinearGradientBrush&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeView.Background&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Machines"&lt;/span&gt; &lt;span style="color: red;"&gt;Tag&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Machines"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"By type"&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"machinesByTypeTree"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"By O/S"&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"machinesByOsTree"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Software"&lt;/span&gt; &lt;span style="color: red;"&gt;Tag&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Software"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"By product"&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"softwareByProductTree"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Manufacturers"&lt;/span&gt; &lt;span style="color: red;"&gt;Tag&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Manufacturers"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Audit log"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Today"&lt;/span&gt; &lt;span style="color: red;"&gt;Tag&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AuditToday"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"This week"&lt;/span&gt; &lt;span style="color: red;"&gt;Tag&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AuditThisWeek"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt; &lt;span style="color: red;"&gt;Header&lt;/span&gt;=&lt;span style="color: blue;"&gt;"This month"&lt;/span&gt; &lt;span style="color: red;"&gt;Tag&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AuditThisMonth"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeViewItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeView&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that the “Tag=” entries define the major menu categories.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, build the dynamic entries, ensuring that we fill the planned dynamic menus. In the above example, we are going to complete the menus for “machinesByTypeTree” and “machinesByOsTree”;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; DynamicMenuEntry&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; MainMenuName;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; Object Dto;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; OperatingSystemTypeDomainContext osdc = &lt;span style="color: blue;"&gt;new&lt;/span&gt; OperatingSystemTypeDomainContext();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; DeviceTypeDomainContext dtdc = &lt;span style="color: blue;"&gt;new&lt;/span&gt; DeviceTypeDomainContext();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; TreeviewNavigator()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;InitializeComponent();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;osdc.Load(osdc.GetOperatingSystemTypesQuery(), LoadOsTypes, &lt;span style="color: blue;"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;dtdc.Load(dtdc.GetDeviceTypesQuery(), LoadDeviceTypes, &lt;span style="color: blue;"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: green;"&gt;// Executes when the user navigates to this page.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;override&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; OnNavigatedTo(NavigationEventArgs e)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; LoadOsTypes(LoadOperation lo)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;machinesByOsTree.Items.Clear();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (lo.Entities == &lt;span style="color: blue;"&gt;null&lt;/span&gt; || lo.Entities.Count() &amp;lt; 1)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (OperatingSystemTypeDto os &lt;span style="color: blue;"&gt;in&lt;/span&gt; lo.Entities)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;TreeViewItem i = &lt;span style="color: blue;"&gt;new&lt;/span&gt; TreeViewItem()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Header = os.Vendor + "&lt;span style="color: darkred;"&gt; &lt;/span&gt;" + os.Name + "&lt;span style="color: darkred;"&gt; &lt;/span&gt;" + os.Version,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Tag = &lt;span style="color: blue;"&gt;new&lt;/span&gt; DynamicMenuEntry { MainMenuName = "&lt;span style="color: darkred;"&gt;MachinesByOsType&lt;/span&gt;", Dto = os }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;machinesByOsTree.Items.Add(i);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; LoadDeviceTypes(LoadOperation lo)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;machinesByTypeTree.Items.Clear();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (lo.Entities == &lt;span style="color: blue;"&gt;null&lt;/span&gt; || lo.Entities.Count() &amp;lt; 1)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (DeviceTypeDto dt &lt;span style="color: blue;"&gt;in&lt;/span&gt; lo.Entities)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;TreeViewItem i = &lt;span style="color: blue;"&gt;new&lt;/span&gt; TreeViewItem()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Header = dt.Name,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Tag = &lt;span style="color: blue;"&gt;new&lt;/span&gt; DynamicMenuEntry { MainMenuName = "&lt;span style="color: darkred;"&gt;MachinesByDeviceType&lt;/span&gt;", Dto = dt }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;machinesByTypeTree.Items.Add(i);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that, for each of the dynamic entries, we are recording a custom type “DynamicMenuEntry” that defines what the major menu category is. In other words, that is how we decide &lt;em&gt;which&lt;/em&gt; menu to display, and the dynamic data is the parameter we pass to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The next stage is that we need to act on when the user clicks on a menu entry. We do this via the SelectedItemChanged event on the TreeView control which, in XAML, looks like this;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeView&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"treeview"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;BorderThickness&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0"&lt;/span&gt; &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;Margin&lt;/span&gt;=&lt;span style="color: blue;"&gt;"0"&lt;/span&gt; &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;SelectedItemChanged&lt;/span&gt;=&lt;span style="color: blue;"&gt;"treeview_SelectedItemChanged"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;TreeView.Background&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the code behind looks like this;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; treeview_SelectedItemChanged(&lt;span style="color: blue;"&gt;object&lt;/span&gt; sender, RoutedPropertyChangedEventArgs&amp;lt;&lt;span style="color: blue;"&gt;object&lt;/span&gt;&amp;gt; e)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;TreeView view = sender &lt;span style="color: blue;"&gt;as&lt;/span&gt; TreeView;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (view == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;TreeViewItem item = (TreeViewItem)view.SelectedItem;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (item == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (item.Tag == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (item.Tag &lt;span style="color: blue;"&gt;is&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;RunMenu((&lt;span style="color: blue;"&gt;string&lt;/span&gt;)item.Tag, &lt;span style="color: blue;"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (item.Tag &lt;span style="color: blue;"&gt;is&lt;/span&gt; DynamicMenuEntry)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;DynamicMenuEntry dme = (DynamicMenuEntry)item.Tag;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;RunMenu(dme.MainMenuName, dme.Dto);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;catch&lt;/span&gt; (Exception exc)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;ChildWindow err = &lt;span style="color: blue;"&gt;new&lt;/span&gt; ErrorWindow("&lt;span style="color: darkred;"&gt;Unable to process navigation menu command&lt;/span&gt;", exc.Message);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;err.Show();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here, we decode which menu we need to call, based on whether the tag is a string (“this is the page I need you to run”) or whether it is a DynamicMenuEntry (“this is the page I need you to run, and this is the parameter to pass”).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, there we have it. For static menu entries, we use “.tag” to define the single page to call and for dynamic entries, the .tag defines the page to call and the parameter to pass (typically some kind of entity ID).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-9219879342027323981?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/9219879342027323981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-building-navigation-tree.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/9219879342027323981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/9219879342027323981'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-building-navigation-tree.html' title='Silverlight 3; Building a navigation tree from static and dynamic data'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_eUBd1u0gFH0/SsvbnB0eiiI/AAAAAAAAAEg/Z2HJ3Wm4gkk/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-3339857879171495248</id><published>2009-10-07T00:45:00.002+01:00</published><updated>2010-03-06T01:03:22.332Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Silverlight 3 – Binding POCO objects to XAML</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/10/silverlight-3-%e2%80%93-binding-poco-objects-to-xaml/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/10/silverlight-3-%e2%80%93-binding-poco-objects-to-xaml/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Obvious, really, but I spent ages chasing down how to bind some kind of POCO to a XAML display;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"LayoutRoot"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Height&lt;/span&gt;=&lt;span style="color: blue;"&gt;"300"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Height&lt;/span&gt;=&lt;span style="color: blue;"&gt;"auto"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Height&lt;/span&gt;=&lt;span style="color: blue;"&gt;"auto"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Height&lt;/span&gt;=&lt;span style="color: blue;"&gt;"auto"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Height&lt;/span&gt;=&lt;span style="color: blue;"&gt;"auto"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Width&lt;/span&gt;=&lt;span style="color: blue;"&gt;"300"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Width&lt;/span&gt;=&lt;span style="color: blue;"&gt;"100"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: red;"&gt;Width&lt;/span&gt;=&lt;span style="color: blue;"&gt;"auto"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Name"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Gender"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"2"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Age"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"3"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"DOB"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"4"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt; &lt;span style="color: red;"&gt;BorderThickness&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt; &lt;span style="color: red;"&gt;BorderBrush&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Black"&lt;/span&gt; &lt;span style="color: red;"&gt;Background&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AliceBlue"&lt;/span&gt; &lt;span style="color: red;"&gt;CornerRadius&lt;/span&gt;=&lt;span style="color: blue;"&gt;"10"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"name"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"{Binding Name}"&lt;/span&gt; &lt;span style="color: red;"&gt;Margin&lt;/span&gt;=&lt;span style="color: blue;"&gt;"5,5,5,5"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt; &lt;span style="color: red;"&gt;BorderThickness&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt; &lt;span style="color: red;"&gt;BorderBrush&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Black"&lt;/span&gt; &lt;span style="color: red;"&gt;Background&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AliceBlue"&lt;/span&gt; &lt;span style="color: red;"&gt;CornerRadius&lt;/span&gt;=&lt;span style="color: blue;"&gt;"10"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"2"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"gender"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"{Binding Gender}"&lt;/span&gt; &lt;span style="color: red;"&gt;Margin&lt;/span&gt;=&lt;span style="color: blue;"&gt;"5,5,5,5"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt; &lt;span style="color: red;"&gt;BorderThickness&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt; &lt;span style="color: red;"&gt;BorderBrush&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Black"&lt;/span&gt; &lt;span style="color: red;"&gt;Background&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AliceBlue"&lt;/span&gt; &lt;span style="color: red;"&gt;CornerRadius&lt;/span&gt;=&lt;span style="color: blue;"&gt;"10"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"3"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"age"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"{Binding Age}"&lt;/span&gt; &lt;span style="color: red;"&gt;Margin&lt;/span&gt;=&lt;span style="color: blue;"&gt;"5,5,5,5"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt; &lt;span style="color: red;"&gt;BorderThickness&lt;/span&gt;=&lt;span style="color: blue;"&gt;"1"&lt;/span&gt; &lt;span style="color: red;"&gt;BorderBrush&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Black"&lt;/span&gt; &lt;span style="color: red;"&gt;Background&lt;/span&gt;=&lt;span style="color: blue;"&gt;"AliceBlue"&lt;/span&gt; &lt;span style="color: red;"&gt;CornerRadius&lt;/span&gt;=&lt;span style="color: blue;"&gt;"10"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Row&lt;/span&gt;=&lt;span style="color: blue;"&gt;"4"&lt;/span&gt; &lt;span style="color: red;"&gt;Grid&lt;/span&gt;.&lt;span style="color: red;"&gt;Column&lt;/span&gt;=&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;controls&lt;/span&gt;:&lt;span style="color: maroon;"&gt;DatePicker&lt;/span&gt; &lt;span style="color: red;"&gt;x&lt;/span&gt;:&lt;span style="color: red;"&gt;Name&lt;/span&gt;=&lt;span style="color: blue;"&gt;"dob"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;=&lt;span style="color: blue;"&gt;"{Binding DOB}"&lt;/span&gt; &lt;span style="color: red;"&gt;IsEnabled&lt;/span&gt;=&lt;span style="color: blue;"&gt;"False"&lt;/span&gt; &lt;span style="color: red;"&gt;Margin&lt;/span&gt;=&lt;span style="color: blue;"&gt;"5,5,5,5"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Border&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;Grid&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And I could not figure out why it was refusing to recognise the object I was passing to it. Then I found that it is &lt;em&gt;impossible &lt;/em&gt;to bind to a data source in XAML. You need to bind the data context in code;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; partial &lt;span style="color: blue;"&gt;class&lt;/span&gt; MainPage : UserControl&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Person person = &lt;span style="color: blue;"&gt;new&lt;/span&gt; Person { Name = "&lt;span style="color: darkred;"&gt;Scott&lt;/span&gt;", Gender = 'M', Age = 43, DOB=&lt;span style="color: blue;"&gt;new&lt;/span&gt; DateTime(1966, 7, 12) };&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; MainPage()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;InitializeComponent();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;LayoutRoot.DataContext = person;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ho hum. Three hours down the drain…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-3339857879171495248?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/3339857879171495248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-binding-poco-objects-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3339857879171495248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3339857879171495248'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-binding-poco-objects-to.html' title='Silverlight 3 – Binding POCO objects to XAML'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-6463320734043333527</id><published>2009-10-07T00:40:00.002+01:00</published><updated>2010-03-06T01:03:51.068Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Silverlight 3 – handling exceptions in page views</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/10/silverlight-3-%e2%80%93-handling-exceptions-in-page-views/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/10/silverlight-3-%e2%80%93-handling-exceptions-in-page-views/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How do you handle the situation where your new Silverlight page needs to shout a warning or error, and then die? No idea, but this is how I do it…&lt;br /&gt;Originally, I was quite scared of my Silverlight pages throwing an exception and then I realised that this was just another object and if we throw an exception, hopefully let the user know, and bail out, then that’s fine.&lt;br /&gt;So the pattern I am now working with is this;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Constructor – set up the load operations&lt;/li&gt;&lt;li&gt;Page_Loaded events – bind the XAML objects to the retrieved data&lt;/li&gt;&lt;ul&gt;&lt;li&gt;On any error; display a meaningful message, in a semi-modal window&lt;/li&gt;&lt;li&gt;Navigate back to a safe place (e.g. /home)&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;What do I mean by “semi-modal”? Well, from the user’s perspective, it should be modal; display a message then abort. Silverlight, however, can’t display a truly modal message so we need to take account of that in exception handling… (more of which in a mo…)&lt;br /&gt;So, step one, is to define a rather apt method called “&lt;strong&gt;ScreamAndExit()&lt;/strong&gt;” which looks like this;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; ScreamAndExit(&lt;span style="color: blue;"&gt;string&lt;/span&gt; msg)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;ChildWindow err = &lt;span style="color: blue;"&gt;new&lt;/span&gt; ErrorWindow("&lt;span style="color: darkred;"&gt;Could not load the requested machine list&lt;/span&gt;", msg);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;err.Show();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;NavigationService.Navigate(&lt;span style="color: blue;"&gt;new&lt;/span&gt; Uri("&lt;span style="color: darkred;"&gt;/Home&lt;/span&gt;", UriKind.Relative));&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that ErrorWindow is defined in the Silverlight 3.0 Navigation Framework.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do we call this? (Relatively) easy;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: green;"&gt;// Executes when the user navigates to this page.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;override&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; OnNavigatedTo(NavigationEventArgs e)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;activityDisplay.IsActive = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt; id = -1;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; searchType = "&lt;span style="color: darkred;"&gt;&lt;/span&gt;";&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;switch&lt;/span&gt; (searchType.ToLower())&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: green;"&gt;// Magic&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;default&lt;/span&gt;: ScreamAndExit("&lt;span style="color: darkred;"&gt;Invalid request type&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;catch&lt;/span&gt; (Exception ex)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;activityDisplay.IsActive = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;ScreamAndExit(ex.Message);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And that’s almost it. The “almost” refers to the “semi-modal” discussion; Silverlight windows display asynchronously and so if you simply call “ScreamAndExit” and carry on, then the rest of the code will be executed. Make sure you call ScreamAndExit and the return from each call…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-6463320734043333527?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/6463320734043333527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-handling-exceptions-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6463320734043333527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6463320734043333527'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-handling-exceptions-in.html' title='Silverlight 3 – handling exceptions in page views'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-3757509409910752515</id><published>2009-10-07T00:23:00.002+01:00</published><updated>2010-03-06T01:04:20.210Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Silverlight 3 Navigation – navigating from a UserControl</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/10/silverlight-3-navigation-%e2%80%93-navigating-from-a-usercontrol/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/10/silverlight-3-navigation-%e2%80%93-navigating-from-a-usercontrol/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I’ve been toying with &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; over the last couple of weeks and, I have to say, it’s much more complete than ASP.Net ever was (**). Lots of new paradigms to get my head around, of course, but overall it’s a very complete solution for an &lt;a href="http://en.wikipedia.org/wiki/Rich_Internet_application"&gt;RIA&lt;/a&gt;.&lt;br /&gt;Anyway, to the point of this posting; the new (in Silverlight 3.0) Navigation Framework is great; it allows you to present a common interface and have new pages display in a know part of the browser window, supports browser back/forward, and URL rewrites. See &lt;a href="http://silverlight.net/learn/videos/silverlight-videos/navigation-framework/"&gt;here&lt;/a&gt; for more information.&lt;br /&gt;If you are inside a page that is controlled by the framework, then you are able to call on the NavigationService.Navigate method to divert control to a new XAML page. For example;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;this&lt;/span&gt;.NavigationService.Navigate( &lt;span style="color: blue;"&gt;new&lt;/span&gt; Uri( String.Format( "&lt;span style="color: darkred;"&gt;/Views/Item.xaml?title={0}&amp;amp;type={1}&lt;/span&gt;", ...), UriKind.Relative ) );&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is all well and good if you inherited from the Page class within the Navigation Framework, but what if you are a user control, out on a limb, with no knowledge of the Navigation Framework? In my case, I have a user control that displays a treeview context list to the user. Some of the options are static (“select all machines”, “select all software”, etc) and some is dynamic (“select a machine of type…”). Once the user clicked on their desired option, we did some menu calculations and then finally asked the Silverlight Navigation Framework to display the required page in the Content frame. Except we couldn’t… a UserControl has no knowledge of the Navigation Framework and so can’t instruct it to navigate to a specific page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Darn.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The ultimate solution is that the application’s “main page” (which we can find down the Application.Current map) is able to influence the navigation, so stage one was to add a “public bool NavigateTo(Uri uri)” method to the MainPage.xaml file;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; partial &lt;span style="color: blue;"&gt;class&lt;/span&gt; MainPage : UserControl&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; NavigateTo(Uri uri)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;this&lt;/span&gt;.ContentFrame.Navigate(uri);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, we just need to call the NavigateTo method from our non-navigational UserControl. To do this, we need to find the Main Page, which we do by tracking back to the “RootVisual” element in the MainPage.xaml file (if you renamed any of this, then you’ll need to change some of the references, below);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; RunMenu(&lt;span style="color: blue;"&gt;string&lt;/span&gt; requestedMenu, &lt;span style="color: blue;"&gt;object&lt;/span&gt; o)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;MainPage mp = ((MainPage) Application.Current.RootVisual &lt;span style="color: blue;"&gt;as&lt;/span&gt; MainPage);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;switch&lt;/span&gt; (requestedMenu.ToLower())&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;case&lt;/span&gt; "&lt;span style="color: darkred;"&gt;machines&lt;/span&gt;": mp.NavigateTo(&lt;span style="color: blue;"&gt;new&lt;/span&gt; Uri("&lt;span style="color: darkred;"&gt;/MachineList&lt;/span&gt;", UriKind.Relative)); &lt;span style="color: blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;case&lt;/span&gt; "&lt;span style="color: darkred;"&gt;software&lt;/span&gt;": mp.NavigateTo(&lt;span style="color: blue;"&gt;new&lt;/span&gt; Uri("&lt;span style="color: darkred;"&gt;/Home&lt;/span&gt;", UriKind.Relative)); &lt;span style="color: blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here, we find a reference to the Main Page via Application.Current.RootVisual (remember MainPage.xaml?) Once we’ve done that, we call the main page object and ask it to “NavigateTo” a new page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To put this into context, here’s the application browser view;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SsvRgxil0gI/AAAAAAAAAEU/j-ghScFdPmY/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="142" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SsvRhY4qm6I/AAAAAAAAAEY/wB4goZV5dX4/image_thumb.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;(** only in terms of the fact that ASP.Net always seemed to be a halfway house to me – you needed to jump through a lot of hoops to persuade the browser to do what you want it to do. Silverlight, of course, was designed as an RIA from conception so it seems to fit more easily than a native HTML / ASP.Net app. Of course, the trade-off is that you need to present a whole new runtime environment to the user, in terms of the Silverlight VM, but I can live with that for a) more rapid development and b) less concern over what the browser is going to do with our code.)&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-3757509409910752515?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/3757509409910752515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-navigation-navigating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3757509409910752515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3757509409910752515'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/10/silverlight-3-navigation-navigating.html' title='Silverlight 3 Navigation – navigating from a UserControl'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_eUBd1u0gFH0/SsvRhY4qm6I/AAAAAAAAAEY/wB4goZV5dX4/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-8968789264808238782</id><published>2009-07-12T02:13:00.002+01:00</published><updated>2010-03-06T01:05:20.024Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Iterating through a bunch of folders and files</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/07/iterating-through-a-bunch-of-folders-and-files/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/07/iterating-through-a-bunch-of-folders-and-files/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So you want to start at a top level folder, and then process all the folders beneath… Maybe you really do want to look at every file (maybe count the total size of the folder), maybe you want to process all the XML files there. The most obvious route is to recursively search through each folder;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue;"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; startFolder = @"&lt;span style="color: darkred;"&gt;C:\temp&lt;/span&gt;";&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;List&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; contents = &lt;span style="color: blue;"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt; dir &lt;span style="color: blue;"&gt;in&lt;/span&gt; Directory.GetDirectories(startFolder))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;ProcessFolder(dir, contents);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt; fileName &lt;span style="color: blue;"&gt;in&lt;/span&gt; contents)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Console.WriteLine(fileName);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;Console.ReadKey();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; ProcessFolder(&lt;span style="color: blue;"&gt;string&lt;/span&gt; folder, IList&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; theList)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt; file &lt;span style="color: blue;"&gt;in&lt;/span&gt; Directory.GetFiles(folder))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;theList.Add(folder + "&lt;span style="color: darkred;"&gt;\\&lt;/span&gt;" + file);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt; dir &lt;span style="color: blue;"&gt;in&lt;/span&gt; Directory.GetDirectories(folder))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;ProcessFolder(dir, theList);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All well and good but, at some point (probably due to the depth of the file system) you will run out of stack space.&amp;nbsp; A better way to traverse the folder structure is to do an &lt;em&gt;iterative &lt;/em&gt;search;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; ProcessFolder(&lt;span style="color: blue;"&gt;string&lt;/span&gt; startingPath)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt; iterator = 0;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;List&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; dirList = &lt;span style="color: blue;"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;dirList.Add(startingPath);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; parentFolder = startingPath;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: green;"&gt;// Every new folder found is added to the list to be searched. Continue until we have&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: green;"&gt;// found, and reported on, every folder or the calling thread wants us to stop&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;while&lt;/span&gt; (iterator &amp;lt; dirList.Count &amp;amp;&amp;amp; !(workerThreadInfo.StopRequested))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;parentFolder = dirList[iterator];       &lt;span style="color: green;"&gt;// Each FileTreeEntry wants to know who its parent is&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt; dir &lt;span style="color: blue;"&gt;in&lt;/span&gt; Directory.GetDirectories(dirList[iterator]))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;AddFolder(parentFolder, dir, dir);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;dirList.Add(dir);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt; filename &lt;span style="color: blue;"&gt;in&lt;/span&gt; Directory.GetFiles(dirList[iterator]))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;FileInfo file = &lt;span style="color: blue;"&gt;new&lt;/span&gt; FileInfo(filename);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;AddFile(parentFolder, file.Name, file.Length);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: green;"&gt;// There are two *acceptable* exceptions that we may see, but should not consider fatal&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;catch&lt;/span&gt; (UnauthorizedAccessException)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;catch&lt;/span&gt; (PathTooLongException)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;iterator++;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, we iterate through each discovered folder and for each discovered file, we call an external routine (in this case “AddFile()”. Note the two caught exceptions which &lt;em&gt;can&lt;/em&gt; occur but which, in the author’s opinion, are not important in this context;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;UnauthorizedAccessException&lt;/li&gt;&lt;ul&gt;&lt;li&gt;OK; ya got me. I’m not allowed in here, so let’s continue and not break the calling app&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;PathTooLongException&lt;/li&gt;&lt;ul&gt;&lt;li&gt;This is a funny one. Win200x sets a maximum path length of 255 characters. Create a big and complex structure (especially a Java one), zip it and then unravel it under a folder that is maybe 100 characters long. Windows is happy to unzip this, and even display it in the folder view. But try and open the file and you’ll be stuffed&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, ignoring these, this routine will handle any files within a structure, irrespective of how deep that structure gets.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-8968789264808238782?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/8968789264808238782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/07/iterating-through-bunch-of-folders-and.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8968789264808238782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8968789264808238782'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/07/iterating-through-bunch-of-folders-and.html' title='Iterating through a bunch of folders and files'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-2733276027297032401</id><published>2009-07-12T00:04:00.002+01:00</published><updated>2010-03-06T01:05:54.961Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Validating XML Files against XSD Schemas (especially for files that don’t reference the schema)</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/07/validating-xml-files-against-xsd-schemas-especially-for-files-that-don%e2%80%99t-reference-the-schema/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/07/validating-xml-files-against-xsd-schemas-especially-for-files-that-don%e2%80%99t-reference-the-schema/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wow, XML is a pig, isn’t it? Don’t get me wrong; it does everything I need it to do in describing multi-faceted data, but it’s a pretty steep learning curve.&lt;br /&gt;At first, I used &lt;a href="http://www.w3schools.com/XPath/default.asp"&gt;XPath&lt;/a&gt; and a lot of coded validation. Then I finally invested time in learning &lt;a href="http://www.w3.org/XML/Schema"&gt;XML Schemas&lt;/a&gt; (XSDs) and that helped&lt;em&gt; a lot&lt;/em&gt; because I could validate the entire document and, only when I knew it was valid, start pulling data out of it. At around the same time, I stumbled upon &lt;a href="http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx"&gt;LINQ to XML&lt;/a&gt; and this shortened the code substantially.&amp;nbsp; Now, all I had to do was validate the document against the XSD and, if it passed, get to decoding it via LINQ and we’re done and dusted in a few lines of code.&lt;br /&gt;The XSD validation, by the way, looks like this;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; SCHEMA = "&lt;span style="color: darkred;"&gt;http://schemas.axiossystems.com/DDI/SnmpMappings/&lt;/span&gt;";&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; ValidateFile(&lt;span style="color: blue;"&gt;string&lt;/span&gt; file, &lt;span style="color: blue;"&gt;string&lt;/span&gt; schemaFile)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (file == &lt;span style="color: blue;"&gt;null&lt;/span&gt; || schemaFile == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; ArgumentNullException("&lt;span style="color: darkred;"&gt;Must supply non-null file and Schema file to MappingFilesParser.ValidateFile()&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;XmlSchemaSet schemas = &lt;span style="color: blue;"&gt;new&lt;/span&gt; XmlSchemaSet();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;schemas.Add(SCHEMA, schemaFile);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;XDocument doc = XDocument.Load(file);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;doc.Validate(schemas, (o, e) =&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; XmlSchemaValidationException(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format("&lt;span style="color: darkred;"&gt;{0} validating {1}&lt;/span&gt;", e.Message, file));&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, here you define the schema used in your XML file in the static readonly string called “SCHEMA”, then call ValidateFile(name of XML File, name of schema file).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The function either returns or throws ArgumentNullException or XmlSchemaValidationException.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;All good so far. Then I realised that, if you load any random XML file that &lt;em&gt;does not&lt;/em&gt; reference your schema file then the .Validate() method will still complete successfully.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What I mean by this is that every XML file has to have an xmlns namespace declaration similar to this;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;?&lt;/span&gt;xml version="1.0" encoding="utf-8"&lt;span style="color: blue;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: mediumvioletred;"&gt;xs&lt;/span&gt;:&lt;span style="color: maroon;"&gt;schema&lt;/span&gt; &lt;span style="color: red;"&gt;targetNamespace&lt;/span&gt;=&lt;span style="color: blue;"&gt;"http://schemas.axiossystems.com/DDI/SnmpMappings/"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;xmlns&lt;/span&gt;:&lt;span style="color: red;"&gt;xs&lt;/span&gt;=&lt;span style="color: blue;"&gt;"http://www.w3.org/2001/XMLSchema"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;xmlns&lt;/span&gt;:&lt;span style="color: red;"&gt;ddi&lt;/span&gt;=&lt;span style="color: blue;"&gt;"http://schemas.axiossystems.com/DDI/SnmpMappings/"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;elementFormDefault&lt;/span&gt;=&lt;span style="color: blue;"&gt;"qualified"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: red;"&gt;attributeFormDefault&lt;/span&gt;=&lt;span style="color: blue;"&gt;"unqualified"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If your XML file does not refer to the XSD then the validation passes, which is not what I intended. The solution, as outlined in &lt;a href="http://www.hanselman.com/blog/CommentView.aspx?guid=51861b63-526f-4572-ba84-2f24a1c7bd83"&gt;Scott Hansleman’s blog&lt;/a&gt; is to check the namespaces in the XML file and confirm that it &lt;em&gt;does &lt;/em&gt;reference our XSD, then run through the validation. So, now the ValidateFile() method looks like this;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; SCHEMA = "&lt;span style="color: darkred;"&gt;http://schemas.axiossystems.com/DDI/SnmpMappings/&lt;/span&gt;";&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; ValidateFile(&lt;span style="color: blue;"&gt;string&lt;/span&gt; file, &lt;span style="color: blue;"&gt;string&lt;/span&gt; schemaFile)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (file == &lt;span style="color: blue;"&gt;null&lt;/span&gt; || schemaFile == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; ArgumentNullException("&lt;span style="color: darkred;"&gt;Must supply non-null file and Schema file to MappingFilesParser.ValidateFile()&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;logger.InfoFormat("&lt;span style="color: darkred;"&gt;Validating {0} against schema; {1}&lt;/span&gt;", file, schemaFile);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;XmlSchemaSet schemas = &lt;span style="color: blue;"&gt;new&lt;/span&gt; XmlSchemaSet();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;schemas.Add(SCHEMA, schemaFile);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;XPathDocument x = &lt;span style="color: blue;"&gt;new&lt;/span&gt; XPathDocument(file);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;XPathNavigator nav = x.CreateNavigator();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;nav.MoveToFollowing(XPathNodeType.Element);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;IDictionary&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;, &lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; schemasInFile = nav.GetNamespacesInScope(XmlNamespaceScope.All);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;bool&lt;/span&gt; foundOurSchema = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (KeyValuePair&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;, &lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; namespaces &lt;span style="color: blue;"&gt;in&lt;/span&gt; schemasInFile)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (namespaces.Value.CompareTo(SCHEMA) == 0)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;foundOurSchema = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (!foundOurSchema)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; XmlSchemaValidationException(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format("&lt;span style="color: darkred;"&gt;The file {0} does not reference the required schema; {1}&lt;/span&gt;",&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;file, SCHEMA));&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;XDocument doc = XDocument.Load(file);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;doc.Validate(schemas, (o, e) =&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; XmlSchemaValidationException(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format("&lt;span style="color: darkred;"&gt;{0} validating {1}&lt;/span&gt;", e.Message, file));&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here, we first confirm that the XML file references the XSD, then validate against the XSD.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-2733276027297032401?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/2733276027297032401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/07/validating-xml-files-against-xsd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/2733276027297032401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/2733276027297032401'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/07/validating-xml-files-against-xsd.html' title='Validating XML Files against XSD Schemas (especially for files that don’t reference the schema)'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-3226301869333867484</id><published>2009-06-08T20:24:00.002+01:00</published><updated>2010-03-06T01:06:33.652Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='FileTreeView'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>FileTreeView – a SequioaView-like Application</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/06/filetreeview-%e2%80%93-a-sequioaview-like-application/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/06/filetreeview-%e2%80%93-a-sequioaview-like-application/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've long been a huge fan of the &lt;a href="http://w3.win.tue.nl/nl/onderzoek/onderzoek_informatica/visualization/sequoiaview/"&gt;SequoiaView&lt;/a&gt; application released by Technische Universiteit Eindhoven, which displays disk utilization in a beautiful squarified cushion &lt;a href="http://en.wikipedia.org/wiki/Treemap"&gt;treemap&lt;/a&gt; format. &lt;br /&gt;This was released in 2002 and does a great job of showing exactly what's eating the space on your disk, but it has one major drawback; if you point it at a 2TB volume with a million files, but you only want to see what's taking the space in a small corner of the disk, it reads the &lt;i&gt;entire volume&lt;/i&gt; before displaying what you originally asked it to. &lt;br /&gt;So, I decided to write a C# alternative to SequoiaView, partly to help us find the big files in specific folders really quickly, and partly just as an exercise.&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_eUBd1u0gFH0/Si1lfz-NxxI/AAAAAAAAAEE/xZ_CUeCPmDM/s1600-h/Article%5B2%5D.jpg"&gt;&lt;img alt="Article" border="0" height="148" src="http://lh4.ggpht.com/_eUBd1u0gFH0/Si1lgdH1KRI/AAAAAAAAAEI/zGO_Hc2QlbQ/Article_thumb.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="Article" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;You can &lt;a href="http://sites.google.com/site/skotcode/Home/FileTreeViewSetup.zip?attredirects=0"&gt;download the setup from here&lt;/a&gt;. Do be aware that this requires the dotNet Framework 2.0 or higher and, while the setup is supposed to go fetch this if required, it does seem a little flakey. In other words, it’s probably safer to ensure you have the .Net Framework 2.0 or higher installed before starting.&lt;br /&gt;You also need to install the Microsoft Data Visualization Components, which are &lt;a href="http://research.microsoft.com/en-us/downloads/dda33e92-f0e8-4961-baaa-98160a006c27/default.aspx"&gt;available here.&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Source&lt;/h3&gt;I’m going to be uploading the source, plus a background article, to &lt;a href="http://www.codeproject.com/"&gt;CodeProject&lt;/a&gt; shortly. I’ll come back and update this link then.&lt;br /&gt;&lt;h3&gt;Using FileTreeView&lt;/h3&gt;Refer to the following picture for each of the components within FileTreeView;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/Si1lg2dbz_I/AAAAAAAAAEM/QVEc9JtLwNo/s1600-h/application_guide%5B2%5D.jpg"&gt;&lt;img alt="application_guide" border="0" height="149" src="http://lh4.ggpht.com/_eUBd1u0gFH0/Si1lhY5dwuI/AAAAAAAAAEQ/KysQ4WNt8G0/application_guide_thumb.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="application_guide" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Enter the path or folder that you want to display here, or press the "..." button to browse, then press "Go" &lt;/li&gt;&lt;li&gt;The number of folders and files found so far will be displayed here. You can press "Cancel" if you get bored and it will display what it has so far &lt;/li&gt;&lt;li&gt;This rather nifty set of colours (actually seven little label controls) allows you to set the node colours &lt;/li&gt;&lt;li&gt;By default, the names of the files and folders will be displayed at all &lt;i&gt;depths&lt;/i&gt; (which means from the top folder down to the deepest folder). Use this slider to de-clutter the display by displaying labels only to the depth of your choosing &lt;/li&gt;&lt;li&gt;This is the TreeMap control, that displays all discovered folders and their contents, grouped by the relative size of each folder &lt;/li&gt;&lt;li&gt;Each folder or file is a &lt;i&gt;node&lt;/i&gt;. You can hover over a node to see its details, double-click to drill down or right-click for more options &lt;/li&gt;&lt;li&gt;Right clicking a node allows you to display it in Windows Explorer, open it, or zoom in and out of the tree structure&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Licence&lt;/h3&gt;The FileTreeView application is open source, under the CodeProject Open License. Note that the Microsoft Data Visualization Components are free to use for non-commercial use only. &lt;a href="http://www.microsoft.com/iplicensing/productDetail.aspx?productTitle=Visualization Components for Displaying Data in .NET Applications"&gt;See here&lt;/a&gt; for specific licence terms.&lt;br /&gt;&lt;h3&gt;Help&lt;/h3&gt;If you have any suggestions or issues, please post a comment to this article.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-3226301869333867484?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/3226301869333867484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/06/filetreeview-sequioaview-like.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3226301869333867484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3226301869333867484'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/06/filetreeview-sequioaview-like.html' title='FileTreeView – a SequioaView-like Application'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_eUBd1u0gFH0/Si1lgdH1KRI/AAAAAAAAAEI/zGO_Hc2QlbQ/s72-c/Article_thumb.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-8413274442508957239</id><published>2009-05-15T00:28:00.002+01:00</published><updated>2010-03-06T01:07:09.822Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Horrible error running against a 32bit .Net Library from a 64bit application</title><content type='html'>&lt;em&gt;This post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/05/horrible-error-running-against-a-32bit-net-library-from-a-64bit-application/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/05/horrible-error-running-against-a-32bit-net-library-from-a-64bit-application/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, this is my first new dev project on my shiny new Windows 7 64bit machine (having come from a 32bit Vista box). As it happens, I want to use the Microsoft Data Visualization Components, which are only available as a set of 32bit DLLs compiled sometime in 2006.&lt;br /&gt;OK, all good so far – loaded ‘em up, referenced them, threw a TreeMap control on my form, compiled fine and then ran it, and… Bang!&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_eUBd1u0gFH0/SgypHRGsn5I/AAAAAAAAAD0/3xcDuUTB8Bo/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="162" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SgypHiIk4OI/AAAAAAAAAD4/LG4d-EPIemI/image_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;Got a message;&lt;br /&gt;&lt;span style="font-family: Courier;"&gt;Could not load type 'Microsoft.Research.CommunityTechnologies.Treemap.NodeColor' from assembly 'TreemapGenerator, Version=1.0.1.38, Culture=neutral, PublicKeyToken=3f6121a52ebf7c82' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.&lt;/span&gt;&lt;br /&gt;Turns out the problem is that I’m referencing a 32bit component from a 64bit application, and that there is a union of objects on a 32bit boundary, not a 64bit one. Think that’s right, but anyhoo, the cure is obvious in hindsight – my application needs to be compiled as 32bit.&lt;br /&gt;As this is my first foray into development on a 64bit machine I didn’t actually know where to set this! Found it eventually, though; on the Project Properties form, go to the Build tab and set “Platform Target” to “x64”. I’ll need to remember to make a conscious decision in the future whether a new app is supposed to be 32 or 64 bit!&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_eUBd1u0gFH0/SgypIKCqP_I/AAAAAAAAAD8/AeCLeIu9Miw/s1600-h/image%5B8%5D.png"&gt;&lt;img alt="image" border="0" height="176" src="http://lh4.ggpht.com/_eUBd1u0gFH0/SgypIlYhkyI/AAAAAAAAAEA/-qOWWHlH9HI/image_thumb%5B2%5D.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-8413274442508957239?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/8413274442508957239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/05/horrible-error-running-against-32bit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8413274442508957239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8413274442508957239'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/05/horrible-error-running-against-32bit.html' title='Horrible error running against a 32bit .Net Library from a 64bit application'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_eUBd1u0gFH0/SgypHiIk4OI/AAAAAAAAAD4/LG4d-EPIemI/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-635949515610108964</id><published>2009-05-15T00:08:00.002+01:00</published><updated>2010-03-06T01:07:42.617Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>Downloaded CHM help file shows “Navigation to the webpage was cancelled”</title><content type='html'>&lt;em&gt;This page has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/05/downloaded-chm-help-file-shows-%e2%80%9cnavigation-to-the-webpage-was-cancelled%e2%80%9d/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/05/downloaded-chm-help-file-shows-%e2%80%9cnavigation-to-the-webpage-was-cancelled%e2%80%9d/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Huh – that was an odd one. I copied a bunch of controls over to my Windows 7 box and the DLLs work, but the help files are stuffed;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_eUBd1u0gFH0/Sgyke_1F8cI/AAAAAAAAADk/n0Y_8yuwbWg/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="186" src="http://lh5.ggpht.com/_eUBd1u0gFH0/SgykfNh4SuI/AAAAAAAAADo/QhyV3XZovNY/image_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;It seems this is common problem, fixed by right-clicking the CHM file and clicking on an “Unblock” button which I’ve &lt;em&gt;never&lt;/em&gt; seen before!&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/Sgykf9l8clI/AAAAAAAAADs/hbl554bVZwM/s1600-h/image%5B8%5D.png"&gt;&lt;img alt="image" border="0" height="244" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SgykgCXeL2I/AAAAAAAAADw/cM5TPluZvwY/image_thumb%5B2%5D.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="180" /&gt;&lt;/a&gt; &lt;br /&gt;I can’t claim credit for this – found it at &lt;a href="http://weblog.helpware.net/?p=36"&gt;Rob Chandler’s blog here&lt;/a&gt;. Weird sense of priorities, huh? OK to copy and run any old DLL that you found lying in the bin, but a helpfile? Woooohhhh… no… that’s &lt;em&gt;much &lt;/em&gt;more dangerous!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-635949515610108964?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/635949515610108964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/05/downloaded-chm-help-file-shows.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/635949515610108964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/635949515610108964'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/05/downloaded-chm-help-file-shows.html' title='Downloaded CHM help file shows “Navigation to the webpage was cancelled”'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_eUBd1u0gFH0/SgykfNh4SuI/AAAAAAAAADo/QhyV3XZovNY/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-1081809046389364161</id><published>2009-05-14T23:33:00.002+01:00</published><updated>2010-03-06T01:09:41.535Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Microsoft Data Visualization Components on Windows 7</title><content type='html'>&lt;em&gt;this post has moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/05/microsoft-data-visualization-components-on-windows-7/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/05/microsoft-data-visualization-components-on-windows-7/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I’ve been playing around with the &lt;a href="http://research.microsoft.com/en-us/downloads/dda33e92-f0e8-4961-baaa-98160a006c27/default.aspx"&gt;Data Visualization Components&lt;/a&gt; recently (looking to incorporate the TreeMap control with a SequioaView-a-like disk space analyser) but ran into problems getting the toolkit installed on Windows 7 RC1. Running the setup from the official page at &lt;a href="http://research.microsoft.com/en-us/downloads/dda33e92-f0e8-4961-baaa-98160a006c27/default.aspx" title="http://research.microsoft.com/en-us/downloads/dda33e92-f0e8-4961-baaa-98160a006c27/default.aspx"&gt;http://research.microsoft.com/en-us/downloads/dda33e92-f0e8-4961-baaa-98160a006c27/default.aspx&lt;/a&gt; gets stuck looking for .Net Framework 1.1.4322;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_eUBd1u0gFH0/SgycJAApB4I/AAAAAAAAADc/PwpdnEYrVaU/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="95" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SgycJi4I82I/AAAAAAAAADg/PrtHl1PDxi8/image_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;Of course, being Windows 7, .Net 3.5 is already installed which &lt;em&gt;should&lt;/em&gt; include .Net 1.1 but it looks like the Components installer is hopelessly confused. I couldn’t get the installer to believe we had something &lt;em&gt;better&lt;/em&gt; than 1.1 already installed and I didn’t want to try and hack .Net 1.1 on top of Windows 7.&lt;br /&gt;So, all I really needed were the “bunch of files” that come in the Component setup so I installed the package on an XP machine and copied them across to a folder on Windows 7, then referenced the DLL by hand.&lt;br /&gt;I doubt there’s any .Net developers out there, running the RC of Windows 7, who &lt;em&gt;doesn’t&lt;/em&gt; have a spare XP machine lying around too(!) but, just in case there is, I’ve &lt;a href="http://sites.google.com/site/skotcode/Home/MicrosoftDataVisualizationComponents1.4.zip?attredirects=0"&gt;placed the Zip&lt;/a&gt; here for your convenience. The licence states that it’s OK to distribute for &lt;em&gt;non-commercial use&lt;/em&gt; and doesn’t say it needs to be in the original MSI format, so I don’t see a legal problem with this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-1081809046389364161?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/1081809046389364161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/05/microsoft-data-visualization-components.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/1081809046389364161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/1081809046389364161'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/05/microsoft-data-visualization-components.html' title='Microsoft Data Visualization Components on Windows 7'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_eUBd1u0gFH0/SgycJi4I82I/AAAAAAAAADg/PrtHl1PDxi8/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-1128582894351959032</id><published>2009-04-12T18:01:00.002+01:00</published><updated>2010-03-06T01:10:32.428Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='#Architecture'/><title type='text'>“The breakpoint will not currently be hit. No symbols have been loaded for this document.” - VS2008</title><content type='html'>&lt;em&gt;This post has been moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/04/%e2%80%9cthe-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-for-this-document-%e2%80%9d-vs2008/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/04/%e2%80%9cthe-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-for-this-document-%e2%80%9d-vs2008/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I’d been hacking around with &lt;a href="http://code.google.com/p/sharp-architecture/"&gt;Sharp Architecture&lt;/a&gt; (#Arch)a few months back but haven’t touched it recently. However, the release of 1.0 to coincide with the formal release of &lt;a href="http://www.asp.net/mvc/"&gt;ASP.NET MVC 1.0&lt;/a&gt; got me interested again, so I downloaded the latest and greatest to see what’s adoing…&lt;br /&gt;There’s a great community around #Arch and it’s pretty easy to get your head around (assuming you’ve a basic grounding in MVC and &lt;a href="http://www.hibernate.org/"&gt;NHibernate&lt;/a&gt;) and it even comes with a sample/tutorial app based on the ubiquitous NorthWind database. Now, being a cautious sort I figured I’d start by getting the NorthWind sample up and running, as this would prove I had all the dependencies installed and wired up.&lt;br /&gt;All you (should) need to do is restore the standard NorthWind sample database, point the nhibernate.config at your local SQL Server, and you’re up and running. Except I wasn’t; all I was getting was “Internet Explorer cannot display the webpage”. OK; double check nhibernate.config and assemblies, turn up NHibernate logging, and stick a breakpoint on Global.asax.cs – that’ll pinpoint the error, right?&lt;br /&gt;Wrong. The files are not being loaded, and my breakpoints have gone a funny shade of yellow, instead of red. Hovering over them displays the message “The breakpoint will not currently be hit. No symbols have been loaded for this document.” – Crikey! Much googling and assuming that the root cause must be astoundingly complex led me up several dead ends until I figured out that the cause was &lt;em&gt;much &lt;/em&gt;simpler. Have a look at my (truncated) IE dialogue;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIeT-Mi8uI/AAAAAAAAACs/i_GBmdY4ZqE/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="120" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SeIeUfdzZ2I/AAAAAAAAACw/74yeYJcZNpU/image_thumb.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;It’s talking to “localhost” which &lt;em&gt;obviously&lt;/em&gt;(!) is my PC. But check out the zone display at the bottom; Internet! What’s it doing thinking my PC is in the Internet zone (with attendant security restrictions)? I tried adding localhost to the &lt;em&gt;Intranet&lt;/em&gt; zone but this doesn’t appear to work either. In desperation, I thought “let’s ping it” even though I did not expect that to fail. Well, it didn’t fail, but look at this;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_eUBd1u0gFH0/SeIeUtSRYGI/AAAAAAAAAC0/QTpIc3IkPCw/s1600-h/image%5B5%5D.png"&gt;&lt;img alt="image" border="0" height="91" src="http://lh5.ggpht.com/_eUBd1u0gFH0/SeIeVBaCTTI/AAAAAAAAAC4/de4wx-vdEE0/image_thumb%5B1%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;Looks ok. WAIT! what the heck is “::1”? Well, the more new-fangled amongst you will recognise this as the IPv6 version of localhost. Quite what IPv6 actually is, is beyond the scope of this article, but the main point is that 99.999% of the Internet and attendant applications expect IPv4 addresses, not IPv6. The IPv4 version of localhost should be the much more recognisable “127.0.0.1”.&lt;br /&gt;So, I went back to my IE page and tried &lt;a href="http://127.0.0.1:2386/"&gt;http://127.0.0.1:2386/&lt;/a&gt; instead of the localhost version and, lo and behold;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIeVsars_I/AAAAAAAAAC8/kmp81x98xNk/s1600-h/image%5B8%5D.png"&gt;&lt;img alt="image" border="0" height="112" src="http://lh6.ggpht.com/_eUBd1u0gFH0/SeIeWHrjBAI/AAAAAAAAADA/WzPed42VGJs/image_thumb%5B2%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;It works! Final bit of the jigsaw is, where on earth is it getting ::1 from? Well, it was getting it from the hosts file, which lives in your &amp;lt;windows&amp;gt;\System32\Drivers\etc folder. Mine contained this;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIeWqcHi-I/AAAAAAAAADE/-7EFYaxIRtc/s1600-h/image%5B11%5D.png"&gt;&lt;img alt="image" border="0" height="135" src="http://lh6.ggpht.com/_eUBd1u0gFH0/SeIeW018BGI/AAAAAAAAADI/7iQKGjSAwp0/image_thumb%5B3%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;So, I overwrote the ::1 entry (the IPv6 version of localhost) to be 127.0.0.1 (the IPv4 version);&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIeXRO03RI/AAAAAAAAADM/6kIrduTO-dk/s1600-h/image%5B14%5D.png"&gt;&lt;img alt="image" border="0" height="135" src="http://lh6.ggpht.com/_eUBd1u0gFH0/SeIeX2hMfqI/AAAAAAAAADQ/h-nCcb0ippg/image_thumb%5B4%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;Retried my web browser and all is now good with “localhost”;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_eUBd1u0gFH0/SeIeYW8ze7I/AAAAAAAAADU/jWN2CpEb_L8/s1600-h/image%5B17%5D.png"&gt;&lt;img alt="image" border="0" height="112" src="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIeY0E2VJI/AAAAAAAAADY/wnGGOmbbrzU/image_thumb%5B5%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;Here’s my question, though; I didn’t change the Hosts file, and localhost certainly &lt;em&gt;did &lt;/em&gt;work last time I was playing with #Arch, so what changed? Did a Microsoft security update overwrite the Hosts’ localhost entry? &lt;br /&gt;Oh, one other thing. If you are using User Access Control (UAC) then access to the Hosts file will be restricted. The solution is to go find Notepad in your Start Menu and don’t left click on it; right-click it, and select “Run as administrator” then you will be able to save the Hosts file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-1128582894351959032?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/1128582894351959032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/04/breakpoint-will-not-currently-be-hit-no.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/1128582894351959032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/1128582894351959032'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/04/breakpoint-will-not-currently-be-hit-no.html' title='“The breakpoint will not currently be hit. No symbols have been loaded for this document.” - VS2008'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_eUBd1u0gFH0/SeIeUfdzZ2I/AAAAAAAAACw/74yeYJcZNpU/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-4675565049136581400</id><published>2009-04-12T17:22:00.002+01:00</published><updated>2010-03-06T01:11:18.871Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='Anti Virus'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>Auditing access to a file on Vista</title><content type='html'>&lt;em&gt;This post has been moved to &lt;/em&gt;&lt;a href="http://www.scottleckie.com/2009/04/auditing-access-to-a-file-on-vista/"&gt;&lt;em&gt;http://www.scottleckie.com/2009/04/auditing-access-to-a-file-on-vista/&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Every so often, when I open Outlook, it tells me that my PST file was not closed properly and it’s being checked for errors. It seems from a spot of googling that this isn’t an Outlook problem as such, more that another app opened my PST and did not close it properly.&lt;br /&gt;Task Manager or &lt;a href="http://www.anvir.com/taskmanagerfree"&gt;Anvir Task Manager&lt;/a&gt; (excellent app) shows that, whoever the culprit is, it’s not running the next time I start Outlook. My suspicions are firmly on Skype, especially as there are a ton of postings on it keeping the PST open, but I’ve checked the obvious settings and they don’t &lt;em&gt;seem&lt;/em&gt; to be the culprit.&lt;br /&gt;Right, I thought, let’s turn on file auditing and I can see which process accesses the PST file… Wow! What a faff this is, in Vista. Prior to Vista, auditing was really easy but now things have got way more “powerful” (according to Microsoft) or “difficult” (according to me). What is particularly galling is that you can even go and enable access audits on a specific file, and Vista won’t give you a hint that File System auditing isn’t even enabled! So, after a bit of digging around, this is how you audit access to a file;&lt;br /&gt;&lt;h4&gt;Turn on File System auditing&lt;/h4&gt;You need to use a horrid app called AuditPol.Exe – the semantics of this are a bit too esoteric for me, but here’s what you need to enable file system auditing;&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;1: D:\Windows\system32&amp;gt; auditpol /set /subcategory:"&lt;span style="color: darkred;"&gt;file system&lt;/span&gt;" /success:enable /failure:enable&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that the whole “auditpol” command is on one line.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Enable Auditing for a file&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Now, go and right click the file you want to be audited, right click and go to properties. Go to the “Security” tab, and then click on “Advanced”. Now that you are in the Advanced dialogue go to the second tab, which should be called “Auditing”. You may have a button marked “Continue” if you are still using UAC – if so, click this and accept the next dialogue;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIVRJIFj1I/AAAAAAAAACU/vc1KJMfSLDs/s1600-h/image%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="185" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SeIVRSlnLeI/AAAAAAAAACY/YovnPtkG0ac/image_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally, you get the auditing dialogue. Clock on “Add” and enable the auditing that you’re looking for. If you just want to know what / who opens the file, you just need “List folder / read data” auditing.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SeIVRxayUHI/AAAAAAAAACc/vUOSTYuuf88/s1600-h/image%5B5%5D.png"&gt;&lt;img alt="image" border="0" height="244" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SeIVSdrvlzI/AAAAAAAAACg/GS4kyXOfDAg/image_thumb%5B1%5D.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="193" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Very important; the “Name” entry defaults to your user ID, which means that it will only audit access by you. If you want to record access by anyone (and remember services may be running under the SYSTEM or other account) then you need to click the “Change” button and set it to audit access by “Everyone”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Checking the event log for audit records&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Last stage; you can check the Windows Event Log (via the “Administrative Tools” group or by running EventVwr.exe) to see audit results. Check the Windows Logs / Security log for event ID 4663, or the Task Category of “File System”;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_eUBd1u0gFH0/SeIVSyEsd0I/AAAAAAAAACk/nmpTICTgbB0/s1600-h/image%5B8%5D.png"&gt;&lt;img alt="image" border="0" height="179" src="http://lh6.ggpht.com/_eUBd1u0gFH0/SeIVTW-S-qI/AAAAAAAAACo/VjtLkrnWMQQ/image_thumb%5B2%5D.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Remember to disable when you fixed your problem&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Best advice suggests that, once you’ve got to the bottom of your file access problems, you should disable auditing. To do this, follow these steps in reverse order; remove the audit options from the file, then disable auditing with AuditPol.ex;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;1: D:\Windows\system32&amp;gt; auditpol /set /subcategory:"&lt;span style="color: darkred;"&gt;file system&lt;/span&gt;" /success:disable /failure:disable&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-4675565049136581400?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/4675565049136581400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/04/auditing-access-to-file-on-vista.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/4675565049136581400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/4675565049136581400'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/04/auditing-access-to-file-on-vista.html' title='Auditing access to a file on Vista'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_eUBd1u0gFH0/SeIVRSlnLeI/AAAAAAAAACY/YovnPtkG0ac/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-8846986371855796607</id><published>2009-02-23T00:17:00.001Z</published><updated>2009-02-23T00:17:23.256Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Via Epia'/><category scheme='http://www.blogger.com/atom/ns#' term='MythTV'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Installing MythTV onto a 586, using a shell script</title><content type='html'>&lt;p&gt;For background, see &lt;a title="Compiling and installing MythTV on a VIA EPIA 800 (586) system" href="http://skotl.blogspot.com/2009/02/compiling-and-installing-mythtv-on-via.html"&gt;Compiling and installing MythTV on a VIA EPIA 800 (586) system&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;First, the basics. You need to install MythBuntu 8.10 onto your system first. The reason I stipulate this is that MythBuntu already has all the pre-requisite scaffolding and configuration to get MythTV up and running – we are just going to update the applications to be 586-friendly.&lt;/p&gt;  &lt;p&gt;You can probably take the manual instructions (see separate post) and get MythTV compiled on anotehr distro but that will take a little experimentation.&lt;/p&gt;  &lt;p&gt;So; you’ve got MythBuntu up and running. Now download the &lt;a href="http://sites.google.com/site/skotcode/Home/BuildMyth586.sh"&gt;script from here&lt;/a&gt;, and make it runnable by typing;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&amp;#160; &lt;/font&gt;&lt;font face="Courier"&gt;chmod 700 ./BuildMyth586.sh&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Then execute the script by either;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&amp;#160; ./BuildMyth586.sh&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;or&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;&amp;#160; sudo ./BuildMyth586.sh&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;the latter may be the best bet as a number of tasks require to be run as root (make install for example), plus the entire process takes several hours on an 800Mhz CPU. Running the whole script via sudo means you only need to enter your password at the start.&lt;/p&gt;  &lt;p&gt;You will see the following prompt;&lt;/p&gt;  &lt;table border="0" cellspacing="4" cellpadding="2" width="589"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="44"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="531"&gt;         &lt;p&gt;&lt;font face="Courier"&gt;This script will download, compile and install MythTV              &lt;br /&gt;onto a MythBuntu system. It has been checked on               &lt;br /&gt;^Ubuntu 8.10 but *may* work on other releases               &lt;br /&gt;Please ensure that you have backed up your system               &lt;br /&gt;before progressing. &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;You may be prompted for your password every so often. This              &lt;br /&gt;is passed to 'sudo' to perform operations requiring root               &lt;br /&gt;access.&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Press &lt;em&gt;Return &lt;/em&gt;to continue&amp;#160; and, all being well, you should see a succession of messages scrolling up the screen, similar to the following;&lt;/p&gt;  &lt;table border="0" cellspacing="4" cellpadding="2" width="589"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="44"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="531"&gt;         &lt;p&gt;&lt;font face="Courier"&gt;Getting Subversion (&lt;/font&gt;&lt;a href="http://svn.mythtv.org/svn/branches/release-0-21-fixes/)"&gt;&lt;font face="Courier"&gt;http://svn.mythtv.org/svn/branches/release-0-21-fixes/)&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;Getting Build Essentials (g++ build-essential linux-headers-2.6.27-7-generic)              &lt;br /&gt;Getting Myth Build Dependencies (libfreetype6 libqt3-mt-mysql libmp3lame0 libmp3lame-dev libXxf86vm-dev libxv-dev libfreetype6-dev qt3-dev-tools)               &lt;br /&gt;Getting Myth Plugins Build Dependencies (libmad0-dev libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev libtag1-dev libtiff4-dev libexif-dev kdelibs4-dev)               &lt;br /&gt;Building Myth - this could take a loooong time...&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;If anything goes wrong you will see a message similar to this;&lt;/p&gt;  &lt;table border="0" cellspacing="4" cellpadding="2" width="589"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="44"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="531"&gt;&lt;font face="Courier"&gt;Getting Subversion (&lt;/font&gt;&lt;a href="http://svn.mythtv.org/svn/branches/release-0-21-fixes/)"&gt;&lt;font face="Courier"&gt;http://svn.mythtv.org/svn/branches/release-0-21-fixes/)&lt;/font&gt;&lt;/a&gt;           &lt;br /&gt;&lt;font face="Courier"&gt;&lt;strong&gt;Failed: Check /home/scott/MythBuild/_logsvn.out&lt;/strong&gt;             &lt;br /&gt;scott@mythtv1:~$&lt;/font&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Check the file that is mentioned (&lt;font face="Courier"&gt;MythBuild/_logsvn.out&lt;/font&gt; in this example) for help in diagnosing the problem.&lt;/p&gt;  &lt;p&gt;Eventually(!) the script should complete and you will see the following;&lt;/p&gt;  &lt;table border="0" cellspacing="4" cellpadding="2" width="589"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="44"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="531"&gt;         &lt;p&gt;&lt;font face="Courier"&gt;Complete - all looks good! &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;To start the back end, run /etc/init.d/mythtv-backend start             &lt;br /&gt;To run the front end, go to the Applications / Multimedia menu &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;Remember to be careful when updating applications - if you             &lt;br /&gt;update the MythTV applications this will probably restore the versions              &lt;br /&gt;that do not work on a 586. If you do this, then either rerun this              &lt;br /&gt;script or run make install from the following folders &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;&amp;#160;&amp;#160;&amp;#160; /home/scott/MythBuild/release-0-21-fixes/mythtv &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;&amp;#160;&amp;#160;&amp;#160; /home/scott/MythBuild/release-0-21-fixes/mythplugins &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier"&gt;For information on running MythTV refer to the documentation at             &lt;br /&gt;www.mythtv.org or www.mythbuntu.org              &lt;br /&gt;scott@mythtv1:~$&lt;/font&gt; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;If you intend this machine to be a backed, then start the backend services as detailed. Then you can run the frontend by going to the Applications / Multimedia menu.&lt;/p&gt;  &lt;p&gt;I’m not going to go into any detail on configuring and using MythTV – the official sites do a much better job than I ever could.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-8846986371855796607?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/8846986371855796607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/02/installing-mythtv-onto-586-using-shell.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8846986371855796607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/8846986371855796607'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/02/installing-mythtv-onto-586-using-shell.html' title='Installing MythTV onto a 586, using a shell script'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-2870035154029121558</id><published>2009-02-22T23:53:00.002Z</published><updated>2009-03-01T15:59:22.260Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Via Epia'/><category scheme='http://www.blogger.com/atom/ns#' term='MythTV'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Compiling and installing MythTV on a VIA EPIA 800 (586) system</title><content type='html'>&lt;p&gt;I have four of these old 586-based 800Mhz &lt;a href="http://www.via.com.tw/en/products/mainboards/"&gt;EPIA&lt;/a&gt; boards lying around and I’ve been desperate to find a (funky) use for them. Eventually, I concluded that these would make great (if not super-powerful) media front-ends and, after a bit of R&amp;amp;D, I settled on &lt;a href="http://www.mythtv.org/"&gt;MythTV&lt;/a&gt; as the app that was going to make this happen.&lt;/p&gt;&lt;p&gt;So I toyed around with MythTV on a faster test box and decided to install the excellent &lt;a href="http://www.mythbuntu.org/"&gt;MythBuntu distro&lt;/a&gt; onto the EPIA and promptly got extremely confused. Whenever I started any of the Myth apps I was rewarded with… nothing! Starting the apps from the menus had zero effect so I started a shell and ran first the backend (&lt;span style="font-family:Courier;"&gt;mythbackend&lt;/span&gt;) and then the front end (&lt;span style="font-family:Courier;"&gt;mythfrontend&lt;/span&gt;) and got;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Courier;"&gt;illegal instruction&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Ah! Now we’re getting somewhere, I thought… A quick bit of Google and I’m sure I’ll get the answer! I got the answer, all right - the team behind MythTV stopped supporting the 586 a long time ago and this “Illegal Instruction” was telling the truth; MythTV was trying to run an instruction that my CPU did not have.&lt;/p&gt;&lt;p&gt;A quick (well, not that quick) shot at other distros including standard Ubuntu and MythDora showed that they were all using non-586 compatible builds.&lt;/p&gt;&lt;p&gt;Not to be outdone, and still desperate to find something to do with my EPIAs I decided to build my own 586-compatible version of MythTV on top of an existing MythBuntu system. I chose MythBuntu as the base because it already had all of the harnessing for a dedicated MythTV box – it was just missing code that would execute.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;The following has all been tested on a MythBuntu 8.10 system which, unsurprisingly, is based on Ubuntu 8.10. It &lt;em&gt;may&lt;/em&gt; work on other systems but you’re probably on your own there. &lt;/p&gt;&lt;p&gt;There are two routes you can follow to here; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Download the script that will do everything for you, &lt;a href="http://sites.google.com/site/skotcode/Home/BuildMyth586.sh"&gt;from here&lt;/a&gt; &lt;/li&gt;&lt;li&gt;Run the commands one at a time &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I’ve documented both approaches but the script is probably easier because;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It captures the output from each command (which can be veeeeeeeeeeeery long) into separate log files so you don’t get the display cluttered up &lt;/li&gt;&lt;li&gt;It checks that each command completes before moving on to the next &lt;/li&gt;&lt;li&gt;It’s just easier! &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Related posts;&lt;/p&gt;&lt;table border="0" cellspacing="4" cellpadding="2" width="589"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="42"&gt; &lt;/td&gt;&lt;td valign="top" width="177"&gt;Installing from the script&lt;/td&gt;&lt;td valign="top" width="352"&gt;&lt;a title="Installing MythTV onto a 586, using a shell script" href="http://skotl.blogspot.com/2009/02/installing-mythtv-onto-586-using-shell.html"&gt;Installing MythTV onto a 586, using a shell script&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="42"&gt; &lt;/td&gt;&lt;td valign="top" width="177"&gt;What the script does&lt;/td&gt;&lt;td valign="top" width="352"&gt;coming soon&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="42"&gt; &lt;/td&gt;&lt;td valign="top" width="177"&gt;Installing by hand&lt;/td&gt;&lt;td valign="top" width="352"&gt;coming soon&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Please let me know how you get on.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-2870035154029121558?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/2870035154029121558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/02/compiling-and-installing-mythtv-on-via.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/2870035154029121558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/2870035154029121558'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/02/compiling-and-installing-mythtv-on-via.html' title='Compiling and installing MythTV on a VIA EPIA 800 (586) system'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-4717009177898966587</id><published>2009-02-04T12:48:00.002Z</published><updated>2009-02-26T22:40:49.239Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Live Writer'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Top 10 reasons to use Windows Live Writer for writing your blog posts</title><content type='html'>&lt;p&gt;Following on from my &lt;a href="http://skotl.blogspot.com/2009/02/posting-code-snipped-on-blogspotcom.html"&gt;article on using Live Writer&lt;/a&gt; for code snippets, I found this &lt;a href="http://www.webtechdaily.com/2008/10/01/top-10-reasons-to-use-windows-live-writer-for-writing-your-blog-posts/"&gt;excellent article on WebTechDaily&lt;/a&gt; that gives 10 reasons to use WLW for blog posts.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-4717009177898966587?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/4717009177898966587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/02/top-10-reasons-to-use-windows-live.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/4717009177898966587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/4717009177898966587'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/02/top-10-reasons-to-use-windows-live.html' title='Top 10 reasons to use Windows Live Writer for writing your blog posts'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-6573603155000688335</id><published>2009-02-02T22:21:00.002Z</published><updated>2009-02-26T22:47:12.382Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Live Writer'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Posting code snippets on BlogSpot.com</title><content type='html'>&lt;p&gt;One of the things that surprised me, when I started fiddling around with BlogSpot a couple of months back, is that there is no inherent capability to format source code in a posting.&lt;/p&gt;  &lt;p&gt;I came across a few solutions (well, hacks…) and even posted on one solution &lt;a href="http://skotl.blogspot.com/2009/01/bloggercom-is-not-programmer-friendly.html"&gt;last month&lt;/a&gt;. It was still a pretty yucky solution, though, involving hosting the code snippets at another site and then hacking the HTML to refer to it. It also seemed (although, this could have been my incompetence) to be very easy to screw up the rest of formatting in the posting.&lt;/p&gt;  &lt;p&gt;Anyway – I found a &lt;strong&gt;better solution&lt;/strong&gt;! Using &lt;a href="http://windowslivewriter.spaces.live.com/"&gt;Microsoft’s Windows Live Writer&lt;/a&gt;, I can compose my postings offline in a much friendlier front end. OK – lots of other tools can do this too, but the two things I love about Live Writer are;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;It has in-built support for BlogSpot, so I can display my blog right in the tool and then publish out to BlogSpot with one click &lt;/li&gt;    &lt;li&gt;It has support for “plugins”, including a number of source code formatters. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now, don’t worry too much about the fact that this is a Microsoft tool. It seems perfectly happy with BlogSpot and, other than a requirement for the dotNet Framework 2.0 to be installed, does not seem hugely Microsoft-centric.&lt;/p&gt;  &lt;h2&gt;Installing Microsoft Windows Live Writer&lt;/h2&gt;  &lt;p&gt;To get this running, you need to wander &lt;a href="http://windowslivewriter.spaces.live.com/"&gt;over here&lt;/a&gt; and download and install the Live Installer. Now, just watch out that this installer gives you the option to install a whole load of apps – I’m not sure what all the others do (and don’t particularly care), but I was only interested in Writer. So I selected that, de-selected the rest and let it carry on.&lt;/p&gt;  &lt;h2&gt;Installing the Source Code plug-in (and other plug-ins!)&lt;/h2&gt;  &lt;p&gt;Next stage is to get the plug-in and install it. You can do this a number of ways;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Go get it directly, &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=10d724ab-0d28-4c78-8310-a6e2cfdef891"&gt;from here&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Browse the &lt;a href="http://gallery.live.com/results.aspx?bt=9&amp;amp;pl=8"&gt;Windows Live Writer Gallery here&lt;/a&gt; and pick your own Source Code formatter (there are quite a few) &lt;/li&gt;    &lt;li&gt;Within Writer, click on the &lt;a href="http://lh4.ggpht.com/_eUBd1u0gFH0/SYdxwiQeXKI/AAAAAAAAABc/zMFSQaS-utU/s1600-h/image%5B6%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Add a plug-in..." border="0" alt="Add a plug-in..." src="http://lh6.ggpht.com/_eUBd1u0gFH0/SYdxxR2xA1I/AAAAAAAAABg/KOemHL7BrAk/image_thumb%5B1%5D.png?imgmax=800" width="106" height="18" /&gt;&lt;/a&gt; tag way over on the right hand side, which actually takes you to the same place as option 2) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;When you get to the gallery, you’ll see tons of optional plug-ins including Twitter Notify, Digg This, etc.&lt;/p&gt;  &lt;h2&gt;A warning if your Windows installation is not on Drive C:!&lt;/h2&gt;  &lt;p&gt;One point to note is that the Source Code Formatter plug-in expects to find Windows, and more importantly, “Program Files” on C:\. If, like me, your Windows install is on another drive (mine is on D:) then the plug-in files will “accidentally” end up in C:. The solution, is to find them in “C:\Program Files\Windows Live Writer\Plugins” and copy them to “D:\Program Files\Windows Live\Writer” – &lt;em&gt;note also that the program folder in C:\ does not appear to be correct&lt;/em&gt;&lt;/p&gt;  &lt;h2&gt;Using the Source Code Formatter&lt;/h2&gt;  &lt;table border="0" cellspacing="4" cellpadding="2" width="525"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="351"&gt;         &lt;p&gt;It’s easy to use. Once you’ve installed it, and restarted Writer, you should see a new entry in the “Insert” menu on the right hand side.&lt;/p&gt;          &lt;p&gt;All you need to do is click on that Insert Source Code link, select the options you want and insert the code. See the screen shot below for an example.&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="160"&gt;&lt;a href="http://lh3.ggpht.com/_eUBd1u0gFH0/SYdxx_AI5vI/AAAAAAAAABk/zBq8rngnjKU/s1600-h/image%5B9%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SYdxyZAKVsI/AAAAAAAAABo/SdzjwiKbrLc/image_thumb%5B2%5D.png?imgmax=800" width="142" height="241" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_eUBd1u0gFH0/SYdx0DsvVpI/AAAAAAAAABs/fM9RyrCxDyQ/s1600-h/image%5B13%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_eUBd1u0gFH0/SYdx0834HbI/AAAAAAAAABw/oHfzpk0eJpw/image_thumb%5B4%5D.png?imgmax=800" width="644" height="291" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Note that I’ve selected my favourite options, which are “Line Numbers”, “Enable Box”, “Alternating Lines” and “Enable Selection”. The outputed code is shown here;&lt;/p&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  1: &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  2: &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  3: &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  4: &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  5: &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; ProjectBase.Core;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  6: &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; ProjectBase.Core.PersistenceSupport;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  7: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  8: &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; theCmdb.Core&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  9: {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 10:     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AuditType : PersistentObject&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 11:     {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 12:         #region Declarations&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 13:         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; _internalName = &amp;quot;&lt;span style="color: #8b0000"&gt;&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 14:         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; _name = &amp;quot;&lt;span style="color: #8b0000"&gt;&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 15:         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; _description = &amp;quot;&lt;span style="color: #8b0000"&gt;&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 16:         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; _formatString = &amp;quot;&lt;span style="color: #8b0000"&gt;{0}&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 17:         #endregion&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 18: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 19:         #region Constructors&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 20:         &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; AuditType()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 21:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 22:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 23: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 24:         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AuditType(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; name)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 25:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 26:             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._name = name;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 27:             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._internalName = name;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 28:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 29: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 30:         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AuditType(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; name, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; description)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 31:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 32:             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._name = name;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 33:             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._internalName = name;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 34:             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._description = description;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 35:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 36:         #endregion&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 37: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 38:         #region Properties&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 39:         &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 40:         &lt;span style="color: #808080"&gt;/// Name of this Audit type&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 41:         &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 42:         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Name&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 43:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 44:             &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 45:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 46:                 &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _name;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 47:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 48:             &lt;span style="color: #0000ff"&gt;set&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 49:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 50:                 _name = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 51:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 52:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 53: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 54:         &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 55:         &lt;span style="color: #808080"&gt;/// Internal name of this system type&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 56:         &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 57:         [DomainSignature]&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 58:         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; InternalName&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 59:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 60:             &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 61:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 62:                 &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _internalName;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 63:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 64:             &lt;span style="color: #0000ff"&gt;set&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 65:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 66:                 _internalName = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 67:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 68:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 69: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 70: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 71:         &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 72:         &lt;span style="color: #808080"&gt;/// Audit type description&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 73:         &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 74:         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Description&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 75:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 76:             &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 77:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 78:                 &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _description;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 79:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 80:             &lt;span style="color: #0000ff"&gt;set&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 81:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 82:                 _description = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 83:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 84:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 85: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 86:         &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 87:         &lt;span style="color: #808080"&gt;/// The format string used to write the audit message&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 88:         &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 89:         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FormatString&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 90:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 91:             &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 92:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 93:                 &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _formatString;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 94:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 95:             &lt;span style="color: #0000ff"&gt;set&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 96:             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 97:                 _formatString = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 98:             }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 99:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;100:         #endregion&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;101: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;102:         #region Overrides&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;103:         &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;string&lt;/span&gt; ToString()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;104:         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;105:             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; InternalName;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;106:         }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;107:         #endregion&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;108: &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;109:     }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;110: }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Posting from Writer&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Posting to BlogSpot is very easy (assuming you’ve already logged in to your Blog from within Writer). Just hit the Publish button and you’re almost there. An oddity, is that I would have assumed that “Publish” meant, well, publish. Instead it seems to mean “Publish to draft” so you still need to go to BlogSpot and commit your posting. A small price for a very nice tool. &lt;strong&gt;&lt;em&gt;Update&lt;/em&gt;&lt;/strong&gt;; it &lt;em&gt;does&lt;/em&gt; publish when it was created entirely within Writer – if you are editing a Post that was originally created within BlogSpot then it’s only a draft…&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Credits&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That’s about it! Finally, I’d like to direct you to &lt;a href="http://www.amergerzic.com/"&gt;Amer Gerzic’s site&lt;/a&gt; – he is the creator of this wonderful plug-in.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-6573603155000688335?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/6573603155000688335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/02/posting-code-snipped-on-blogspotcom.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6573603155000688335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6573603155000688335'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/02/posting-code-snipped-on-blogspotcom.html' title='Posting code snippets on BlogSpot.com'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_eUBd1u0gFH0/SYdxxR2xA1I/AAAAAAAAABg/KOemHL7BrAk/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-1941168404054162434</id><published>2009-01-22T00:33:00.003Z</published><updated>2009-02-26T22:41:02.070Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='Anti Virus'/><title type='text'>Anti Virus...</title><content type='html'>Greetings from Hamburg, Germany...&lt;br /&gt;Over here on business; meeting tomorrow and flying back on Friday.&lt;br /&gt;&lt;br /&gt;The good news? I flew from Edinburgh (EDI) to Heathrow (LHR) T5 and from there to Hamburg but, because I still have a BA gold card I got to visit the "First Lounge" for the &lt;em&gt;(ahem)&lt;/em&gt; first time. All in all, it was a similar experience to the old T4 First experience but they have a separate area for the champagne bar. And so, this morning, I was relaxing with the Times (GoBama being very appropriate) and some canadian bacon, some scrambled eggs and a glass of Krug.&lt;br /&gt;&lt;br /&gt;Where was I? Oh yeah; anti virus products...&lt;br /&gt;A while ago (two years and five days to be exact) I bought a Kaspkersky Protection for Three PCs bundle from PC World. I had my main PC plus the ancillaries so I would easily use the three licences, right?&lt;br /&gt;So, here we are, two years on and my Kaspersky rollout is precisely one. In the meantime, I moved my backend services to Linux, and I installed Clam and AVG and all was good...&lt;br /&gt;&lt;br /&gt;Then, yesterday, I got a message that my main PCs AV (Kaspersky) was out of date and that updates were no longer possible.&lt;br /&gt;WHAT? No Warning?&lt;br /&gt;What about my three licences? OK, this is my fault; if I never installed it anywhere else, what do I expect?&lt;br /&gt;&lt;br /&gt;I'll tell you what I expect; goddarn warning! I don't expect to go from 100% one day to 0% the next...&lt;br /&gt;&lt;br /&gt;So, here's where I'm at...&lt;br /&gt;&lt;br /&gt;Clamshell is doing great at protecting my mail server.&lt;br /&gt;AVG does fine protecting my "throwaway" laptops&lt;br /&gt;And I just installed Avira Free on the workstations I care about.&lt;br /&gt;&lt;br /&gt;My question to you is this; why should I install anything above Avira for my main workstations?&lt;br /&gt;&lt;em&gt;(Kaspersky fans need not apply)&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-1941168404054162434?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/1941168404054162434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/01/anti-virus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/1941168404054162434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/1941168404054162434'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/01/anti-virus.html' title='Anti Virus...'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-553105268505046519</id><published>2009-01-17T02:54:00.005Z</published><updated>2009-02-26T22:41:14.638Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Blogger.com is not programmer friendly (Updated)</title><content type='html'>I've been trying to squeeze my ponderings into the blogger.com space and I'm just so....... frustrated....&lt;br /&gt;&lt;br /&gt;1) There is no generic code format. I tried to use the quotes but they are just unfathomable.&lt;br /&gt;2) The HTML editor is infathomable. I end up with tiny, tiny, tiny text because I'm not closing quotes correctly. Now, My Google, if I was in charge of the content and I could place my quotes wherever I fancied, then I would buy into that. However, I am at the mercy of your formatting engine (even when I switch to HTML mode) and you still make it unpredictable and unusable...&lt;br /&gt;&lt;br /&gt;Update; A workaround has been posted at &lt;a href="http://hype-free.blogspot.com/2006/12/how-to-publish-good-looking-code-on.html"&gt;http://hype-free.blogspot.com/2006/12/how-to-publish-good-looking-code-on.html&lt;/a&gt; - I'm not keen on the suggestion that I host the source outside the blog and line to that, but it's still a much better solution that Google's Blogger.com provides out of the box.&lt;br /&gt;&lt;br /&gt;Update again; a &lt;strong&gt;&lt;em&gt;much&lt;/em&gt;&lt;/strong&gt; better solution is to use Live Writer and a Source Code Formatter plugin - &lt;a href="http://skotl.blogspot.com/2009/02/posting-code-snipped-on-blogspotcom.html"&gt;see here for step by step&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-553105268505046519?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/553105268505046519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/01/bloggercom-is-not-programmer-friendly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/553105268505046519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/553105268505046519'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/01/bloggercom-is-not-programmer-friendly.html' title='Blogger.com is not programmer friendly (Updated)'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-7930500703935154714</id><published>2009-01-11T01:06:00.003Z</published><updated>2009-02-26T22:41:26.506Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Via Epia'/><category scheme='http://www.blogger.com/atom/ns#' term='MythTV'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>MythTV and some very old EPIA 800's</title><content type='html'>A couple of years ago, I thought it would be a wizard idea to buy a bunch of &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-error"&gt;Epia&lt;/span&gt; Mini-&lt;span id="SPELLING_ERROR_1" class="blsp-spelling-error"&gt;ITX&lt;/span&gt; boards, shoe-horn them into a single chassis, and then set each one to a specific task (file server, &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-error"&gt;uPnP&lt;/span&gt; media server, mail server, &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-error"&gt;apache&lt;/span&gt; server).&lt;br /&gt;Needless to say, the project never really got off the ground and I'm now running all of these applications on an HP ML110, bought for £95, which is running &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-error"&gt;VMWare&lt;/span&gt; Server 2.0 64bit.&lt;br /&gt;&lt;br /&gt;So, now, I'm left with four &lt;span id="SPELLING_ERROR_5" class="blsp-spelling-error"&gt;Epia&lt;/span&gt; boards that I &lt;em&gt;must&lt;/em&gt; be able to find a use for, right?&lt;br /&gt;&lt;br /&gt;The plan is... use them as &lt;span id="SPELLING_ERROR_6" class="blsp-spelling-error"&gt;dumbish&lt;/span&gt; media front-ends. One in the study, one in the living room and one on the kitchen, all able to surf the web, play MP3s and the odd video. Playing BBC &lt;span id="SPELLING_ERROR_7" class="blsp-spelling-error"&gt;iPlayer&lt;/span&gt; and &lt;span id="SPELLING_ERROR_8" class="blsp-spelling-error"&gt;youTube&lt;/span&gt; would be a bonus.&lt;br /&gt;&lt;br /&gt;Easy, huh? Just download one of the many Linux media front ends and off we go? Nope, because most of them seem to need a 686 level CPU and these old &lt;span id="SPELLING_ERROR_9" class="blsp-spelling-error"&gt;Epias&lt;/span&gt; are resolutely 586.&lt;br /&gt;&lt;span id="SPELLING_ERROR_10" class="blsp-spelling-error"&gt;MythDora&lt;/span&gt; (based on &lt;span id="SPELLING_ERROR_11" class="blsp-spelling-error"&gt;RedHat&lt;/span&gt;) refused to boot, because we were missing some important instruction.&lt;br /&gt;I managed to install &lt;span id="SPELLING_ERROR_12" class="blsp-spelling-error"&gt;MythBuntu&lt;/span&gt;, but trying to start the &lt;span id="SPELLING_ERROR_13" class="blsp-spelling-error"&gt;MythTv&lt;/span&gt; front-end fails with an "illegal instruction" message. Further investigation shows that the &lt;span id="SPELLING_ERROR_14" class="blsp-spelling-error"&gt;MythBuntu&lt;/span&gt; &lt;span id="SPELLING_ERROR_15" class="blsp-spelling-error"&gt;distrib&lt;/span&gt; (and most &lt;span id="SPELLING_ERROR_16" class="blsp-spelling-error"&gt;MythTv&lt;/span&gt; binaries) have been compiled to require a 686 level CPU.&lt;br /&gt;Not to be beaten, I am now going through the relatively &lt;span id="SPELLING_ERROR_17" class="blsp-spelling-corrected"&gt;tortuous&lt;/span&gt; process of recompiling MythTv for a 586 class processor. I'll let you know how I get on ;-) &lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; – now working! Details at &lt;a title="Compiling and installing MythTV on a VIA EPIA 800 (586) system" href="http://skotl.blogspot.com/2009/02/compiling-and-installing-mythtv-on-via.html"&gt;Compiling and installing MythTV on a VIA EPIA 800 (586) system&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-7930500703935154714?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/7930500703935154714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/01/mythtv-and-some-very-old-epia-800s.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/7930500703935154714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/7930500703935154714'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/01/mythtv-and-some-very-old-epia-800s.html' title='MythTV and some very old EPIA 800&amp;#39;s'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-5436079343345293055</id><published>2009-01-08T01:42:00.003Z</published><updated>2009-02-26T22:41:45.350Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharp Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='#Architecture'/><title type='text'>#Architecture</title><content type='html'>My vote of support for my hobby project is to Billy McCafferty's Sharp Architecture.&lt;br /&gt;&lt;br /&gt;The code is at &lt;a href="http://code.google.com/p/sharp-architecture/"&gt;http://code.google.com/p/sharp-architecture/&lt;/a&gt; and the newsgroups are at &lt;a href="http://groups.google.com/group/sharp-architecture"&gt;http://groups.google.com/group/sharp-architecture&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you want to create a project with ASP.NET MVC or NHibernate, then start here!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-5436079343345293055?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/5436079343345293055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/01/architecture.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/5436079343345293055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/5436079343345293055'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/01/architecture.html' title='#Architecture'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-6272808381461564611</id><published>2009-01-08T01:34:00.003Z</published><updated>2009-02-26T22:42:01.052Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtual Machines'/><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='VMWare'/><title type='text'>Backing up VMs</title><content type='html'>A lot of my production systems (web, email, dev) are now running on VMs.&lt;br /&gt;&lt;br /&gt;I've been worried about my belts and braces approach to these VMs and I have now combined a mix of scripting (DOS) and syncing (SyncToy 2.0) to ensure that I have local copies of the VMs that I can restore at a few moments notice.&lt;br /&gt;&lt;br /&gt;I'm still working on a few points, most notably the unpredictable nature of PLink, and will post a how to shortly...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-6272808381461564611?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/6272808381461564611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/01/backing-up-vms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6272808381461564611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6272808381461564611'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/01/backing-up-vms.html' title='Backing up VMs'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-6454507654290915001</id><published>2009-01-08T01:18:00.004Z</published><updated>2009-02-26T22:42:11.976Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><title type='text'>Finding duplicate files</title><content type='html'>At work we have a problem. We've got an expensive Storage Area Network (SAN) which isn't expensive purely because of the servers and disks, but also because we back up a lot of that data every single night.&lt;br /&gt;Now, imagine that (like us) you are an ISV. So, we have a nightly build which results in a code base of around 900MB. &lt;em&gt;Some&lt;/em&gt; of these make it to testing. &lt;em&gt;Some&lt;/em&gt; of these make it to release candidate and &lt;em&gt;some&lt;/em&gt; of these actually become a release.&lt;br /&gt;Our main file server has it's storage on the SAN so even taking into account the fact that most releases never hit the customers, we have issues with duplicate files on the server /SAN. Consider an overnight build...&lt;br /&gt;&lt;br /&gt;We end up with a build (21390) in the build area. Good for the Devs....&lt;br /&gt;Testers then copy it to their own area...&lt;br /&gt;It gets released so we maintain a "gold" copy of the released code.&lt;br /&gt;The Service Desk have their own library of released code.&lt;br /&gt;&lt;br /&gt;With a typical release, we end up with at least four copies of the 900MB code; auto-build, test, gold-release, support-library.&lt;br /&gt;&lt;br /&gt;SAN is one of the most expensive resources that I need to account for, so I looked around for a utility that could help me. I was hampered on a number of fronts;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Vitally, most of the dup utilities did not expect to run against shares with ~100,000 folders and millions of files&lt;/li&gt;&lt;li&gt;They seemed to be aimed at people who wanted to delete dups. I don't want to do that; I want to investigate failures in process and fix that&lt;/li&gt;&lt;li&gt;Their view of a duplicate did not match mine, which is; Suffix, Size, MD5 hash&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So, I decided to write my own!&lt;/p&gt;&lt;p&gt;The app searches a folder or share, and then breaks down files into the following sets;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;All large files (as defined by you, when you run the program)&lt;/li&gt;&lt;li&gt;Sets of files that have the same suffix, and are the same length&lt;/li&gt;&lt;li&gt;Sets of files that have the same suffix, length and md5 signature&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These sets are then displayed in to the user, where you have the option to save the details to a CSV file.&lt;/p&gt;&lt;p&gt;Using this, we have been able to discover duplicate files (obviously) but also failures in process. For example, when files are sent to us as part of a support incident, we were copying them to several different folders. We were also storing builds in one folder and then testing by copying to another. This app identified where people were not following the correct process and were copying files to secondary folders.&lt;/p&gt;&lt;p&gt;You can download the &lt;a href="http://www.elbest.net/files/DuplicateFileFinder.exe"&gt;app from here&lt;/a&gt;. I'll be posting the source to CodeProject shortly.&lt;/p&gt;&lt;p&gt;S.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-6454507654290915001?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/6454507654290915001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2009/01/finding-duplicate-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6454507654290915001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/6454507654290915001'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2009/01/finding-duplicate-files.html' title='Finding duplicate files'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-3530157282720284069</id><published>2008-12-29T03:20:00.003Z</published><updated>2009-02-26T22:42:24.454Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ITIL'/><category scheme='http://www.blogger.com/atom/ns#' term='ITSM'/><title type='text'>So, what's ITIL?</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;My new favourite sentence starter is "so..."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;ITIL is the Information Technology Infrastructure Library (see &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/ITIL"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Wikipedia&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;So what, so boring. Short answer? It's Incident / Problem / Change...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;An Incident is when they call your help desk (ITIL=Service Desk). "It's a disaster, I can't get my email!!!"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;The resolution to the Incident can be as simple as "restart the mail server". This is pure Service Desk "restore service" or, in the olden days of break/fix; "can you try turning it off and on".&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;Problem Management is about the holy grail of RCA (Root Cause Analysis) - so why does this keep happening? Because, my dear head-of-service, your Exchange server has 6GB RAM and runs out of memory ever ~7 weeks then it spontaneously reboots.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;The Change (remember Incident / Problem / Change) is to add more memory to the Exchange Server. Done deal; Inc/Prob/Chg. Except for a couple of things...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;1) Any Change will likely lead to new incidents, hence Inc/Prob/Chng/Inc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;2) Root Cause Analysis is the key - without this, you won't move forward&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;Remember that you need to record failure data and use this as the input to problem management.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;That's why the vast majority of organisations do not implement decent problem management.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;That's also why the vast majority of organisations keep on fixing the same faults...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-3530157282720284069?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/3530157282720284069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2008/12/so-whats-itil.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3530157282720284069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3530157282720284069'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2008/12/so-whats-itil.html' title='So, what&apos;s ITIL?'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-681692173192435184.post-3242971092058996509</id><published>2008-12-29T03:13:00.003Z</published><updated>2008-12-29T03:19:47.910Z</updated><title type='text'>So, why?</title><content type='html'>So this came about because I am writing a hobby app around a new CMDB. New what? Don't worry... I'm just playing...&lt;br /&gt;&lt;br /&gt;Anyways, I'm learning a whole load of new technology as I blossom from an amateur to a hobbyist level programmer. In particular, I'm getting to grips with &lt;a href="http://www.hibernate.org/"&gt;NHibernate &lt;/a&gt;(database abstraction), &lt;a href="http://www.asp.net/mvc/"&gt;MVC&lt;/a&gt; and a fabulous framework for tying it all together at &lt;a href="http://code.google.com/p/sharp-architecture/"&gt;SharpArchitecture&lt;/a&gt; from &lt;a href="http://devlicio.us/blogs/billy_mccafferty/"&gt;Billy McCafferty&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Stick with me for a trip into the &lt;em&gt;serious&lt;/em&gt; unknown...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/681692173192435184-3242971092058996509?l=skotl.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skotl.blogspot.com/feeds/3242971092058996509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://skotl.blogspot.com/2008/12/so-why.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3242971092058996509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/681692173192435184/posts/default/3242971092058996509'/><link rel='alternate' type='text/html' href='http://skotl.blogspot.com/2008/12/so-why.html' title='So, why?'/><author><name>Skot</name><uri>http://www.blogger.com/profile/15220125891947522176</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_eUBd1u0gFH0/SVgq8ct6TrI/AAAAAAAAAAU/FZKWlCVExdc/S220/DSC_0002.JPG'/></author><thr:total>0</thr:total></entry></feed>
