<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WiredPrairie</title>
	<atom:link href="http://www.wiredprairie.us/blog/index.php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredprairie.us/blog</link>
	<description>A little bit of everything: software, usability, .NET, WPF, design, ASP.NET, Silverlight, and more!</description>
	<lastBuildDate>Fri, 05 Mar 2010 14:43:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Valid Trust Anchor?</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/906</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/906#comments</comments>
		<pubDate>Fri, 05 Mar 2010 14:43:59 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/906</guid>
		<description><![CDATA[On the off chance someone understands this error and can help, I’m posting the wifi errors my Windows 7 Ultimate laptops started to encounter at work on wifi. My laptop is not part of the corporate domain (as it’s a personal laptop). Until very recently, everything worked without any trouble, and IT is not aware [...]]]></description>
			<content:encoded><![CDATA[<p>On the off chance someone understands this error and can help, I’m posting the wifi errors my Windows 7 Ultimate laptops started to encounter at work on wifi. My laptop is not part of the corporate domain (as it’s a personal laptop). Until very recently, everything worked without any trouble, and IT is not aware of any changes that they made that would explain these errors.</p>
<p>I’ve got Personal certificates installed in my user profile, and my employer’s Trusted Root Certification Authorities certificate is installed. Neither have expired.</p>
<p>The first symptom is that I now get prompted for credentials when connecting to the wifi access point:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Network Authentication" border="0" alt="Network Authentication" src="http://www.wiredprairie.us/blog/wp-content/uploads/2010/03/image1.png" width="400" height="220" /> </p>
<p>We discovered that just hitting OK here without providing any credentials was OK. It should have been automatically using the certificate I have installed.</p>
<p>After a few moments, this confusing dialog is displayed:</p>
<p>&#160;<img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.wiredprairie.us/blog/wp-content/uploads/2010/03/image2.png" width="400" height="314" /> </p>
<p>“The credentials provided by the server could not be validated. We recommend that you terminate the connection and contact your administrator with the information provided in the details. You may still connect but doing so exposes you to the security risk by a possible rogue server.</p>
<p>The server XYZ presented a valid certificate issued by Company Name Certificate Authority but Company Name Certificate Authority is not configured as a valid trust anchor for this profile.”</p>
<p>Clicking the Connect button then seems to work. So for now, we agreed that it was OK – but, we have no idea what’s going on. If I learn more, I’ll post more details here. But in the meantime – if anyone else has an idea about this – I’d appreciate hearing about it!&#160; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/906/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restoring a machine from a Windows Home Server</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/903</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/903#comments</comments>
		<pubDate>Fri, 05 Mar 2010 02:54:45 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/903</guid>
		<description><![CDATA[I’ve been having a few issues at work with certificates and wifi. So, the other night I decided to do a fresh install of Windows 7 Ultimate onto my laptop. It’s not as easy as I’d like with my Sony Vaio, as there are drivers for Windows 7, but Sony doesn’t document the sequence that [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been having a few issues at work with certificates and wifi. So, the other night I decided to do a fresh install of Windows 7 Ultimate onto my laptop. It’s not as easy as I’d like with my Sony Vaio, as there are drivers for Windows 7, but Sony doesn’t document the sequence that they should be installed in for maximum success (and let me tell you – it’s easy to mess up and have problems).</p>
<p>Fast forward several days later and I’m sitting at work again – still having troubles, even after having reinstalled everything! I brought in a second laptop and it too was having the problem. OK. It’s not my laptop. ARRRRGH!</p>
<p>After some significant time spent with a guy from our IT department, we decided to ignore some of the scary warnings that were being presented to me – and forge ahead and successfully connected to the 802.1x network configuration. (“No valid trust anchor for this profile?”)</p>
<p>I decided rather than continuing to restore all of the software, etc. that I had setup prior to doing the fresh installation of Windows 7, I’d use the restore feature of my Windows Home Server. </p>
<p>I downloaded the latest Restore CD from Microsoft and proceeded to follow the instructions. I was reading through some of the technical details of how it all works while waiting for the download and read that there was even a way to get drivers for the laptop if the default drivers available on the restore CD weren’t sufficient. <strong>Cool.</strong></p>
<p>I booted from the Restore CD, followed a few steps and a dialog showed up that suggested that it couldn’t find drivers for my network card. OK. I know there’s a work around. I grabbed the files which are stored with the backup of my laptop, and copied them to a USB stick and tried the option to scan for the files. Nothing. Recopied. Nothing. Try different port. Nothing. What the heck??!? I won’t be able to use the backup if I can’t get the network connected. </p>
<p>I keep getting the error, “No Drivers were found for your hardware.” But, THEY ARE THERE! I SWEAR THEY ARE! </p>
<p>I grabbed the memory stick and stomped it into a million pieces. </p>
<p>OK, actually I decided to reformat the stick just to see if there was something odd about it.</p>
<p>I brought up the format dialog and it was suggesting I reformat the USB stick as exFat. Oh drat. That’s what it was formatted with. I reformatted the USB stick as FAT32, copied the files and now my restoration is off and running with an estimated 1 hour and 44 minutes to go over my gigabit network.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/903/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 Remote Desktop Performance Tips</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/902</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/902#comments</comments>
		<pubDate>Thu, 04 Mar 2010 13:31:23 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/902</guid>
		<description><![CDATA[I was disappointed, but certainly not surprised, to see that Microsoft employees blogging that Visual Studio 2010 performance over remote desktop would almost match, or be slightly slower than Visual Studio 2008 performance.
However, they got some good advice on how to optimize your RDP experience with Visual Studio. 
http://blogs.msdn.com/jgoldb/archive/2010/02/27/optimizing-visual-studio-2010-and-wpf-applications-for-remote-desktop.aspx
Slow connections:

On slow connections, change remote desktop [...]]]></description>
			<content:encoded><![CDATA[<p>I was disappointed, but certainly not surprised, to see that Microsoft employees blogging that Visual Studio 2010 performance over remote desktop would almost match, or be slightly slower than Visual Studio 2008 performance.</p>
<p>However, they got some good advice on how to optimize your RDP experience with Visual Studio. </p>
<p><a href="http://blogs.msdn.com/jgoldb/archive/2010/02/27/optimizing-visual-studio-2010-and-wpf-applications-for-remote-desktop.aspx">http://blogs.msdn.com/jgoldb/archive/2010/02/27/optimizing-visual-studio-2010-and-wpf-applications-for-remote-desktop.aspx</a></p>
<p>Slow connections:</p>
<ol>
<li>On slow connections, change remote desktop connection settings to use 16-bit color.</li>
<li>If running on high latency connections, select a “high latency” connection speed in RDC options:     <br /><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.wiredprairie.us/blog/wp-content/uploads/2010/03/image.png" width="400" height="455" /> </li>
<li>On XP/Vista, grab the new <a href="http://support.microsoft.com/kb/969084">remote desktop client, version 7.0</a>.</li>
<li>Disable all check boxes except Persistent bitmap caching.</li>
<li>Also recommended is using a smaller window size (but that may be the most difficult to do).</li>
</ol>
<h3>WPF Application Optimization for Remote Desktop</h3>
<h3></h3>
<p>In addition to the performance tips for Visual Studio, there’s a very nice set of best practices to follow for how to optimize any WPF application for use over remote desktop. Until the long-ago Longhorn promise of truly remoted-WPF applications support is added to the platform, we’ll need to optimize your WPF applications if they may be used over remote desktop.</p>
<p>The worst offender that I’ve encountered in the past is that animations, even hidden behind an opaque element, still cause that area of your application to be sent for each frame of the animation! (You might need to think about how silly that seems).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/902/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome error dialog.</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/900</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/900#comments</comments>
		<pubDate>Wed, 17 Feb 2010 13:25:43 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Humor]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/900</guid>
		<description><![CDATA[I’m just thankful that I didn’t need to choose between OK or Cancel …

]]></description>
			<content:encoded><![CDATA[<p>I’m just thankful that I didn’t need to choose between OK or Cancel …</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.wiredprairie.us/blog/wp-content/uploads/2010/02/image.png" width="385" height="160" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/900/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gogo Inflight Internet</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/898</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/898#comments</comments>
		<pubDate>Tue, 16 Feb 2010 01:50:15 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/898</guid>
		<description><![CDATA[I just won a free usage on my next Gogo enabled flight (in-flight internet) by entering here:
http://upshot.gogoinflight.com/
You can also be awarded a 25% or 50% discount. You just pick which item will be the first to arrive, and a silly view-only game plays ……
&#160;
(The dumb thing was that the thing wouldn’t take my wiredprairie.us e-mail [...]]]></description>
			<content:encoded><![CDATA[<p>I just won a free usage on my next Gogo enabled flight (in-flight internet) by entering here:</p>
<p><a href="http://upshot.gogoinflight.com/">http://upshot.gogoinflight.com/</a></p>
<p>You can also be awarded a 25% or 50% discount. You just pick which item will be the first to arrive, and a silly view-only game plays ……</p>
<p>&#160;</p>
<p><em>(The dumb thing was that the thing wouldn’t take my wiredprairie.us e-mail address!)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/898/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Adobe the Devil?</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/896</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/896#comments</comments>
		<pubDate>Wed, 27 Jan 2010 02:26:24 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/896</guid>
		<description><![CDATA[John Nack makes an extremely rational and systematic analysis of how many voices on the Internet consider Adobe to be the Devil. Is Adobe and in turn Flash Player the antagonist of all that is good about the web? Are they set to destroy the evil proposed Html 5 standards because they might compete with [...]]]></description>
			<content:encoded><![CDATA[<p>John Nack makes an extremely rational and systematic analysis of how many voices on the Internet consider Adobe to be the Devil. Is Adobe and in turn Flash Player the antagonist of all that is good about the web? Are they set to destroy the evil proposed Html 5 standards because they might compete with Flash Player?</p>
<p>Read and ponder. </p>
<p><a href="http://blogs.adobe.com/jnack/2010/01/sympathy_for_the_devil.html">Sympathy for the Devil</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/896/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheese and Cheeseburgers!</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/894</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/894#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:27:23 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Recommendations]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/894</guid>
		<description><![CDATA[Honestly, I eat maybe 1 or 2 beef cheeseburgers in a year (and I don’t even care for most cheese!). Regardless, I still thought this web site, Cheese and Burger Society is really well done (pun not intended!).
It uses Adobe Flash, but really to good effect. There’s a voice over for each recipe.
 
“Number 7… [...]]]></description>
			<content:encoded><![CDATA[<p>Honestly, I eat maybe 1 or 2 beef cheeseburgers in a year (and I don’t even care for most cheese!). Regardless, I still thought this web site, <a href="http://www.cheeseandburger.com/">Cheese and Burger Society</a> is really <strong>well done </strong>(pun not intended!).</p>
<p>It uses Adobe Flash, but really to good effect. There’s a voice over for each recipe.</p>
<p><a href="http://www.cheeseandburger.com/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.wiredprairie.us/blog/wp-content/uploads/2010/01/image1.png" width="393" height="316" /></a> </p>
<p>“Number 7… it’s not for the guy who makes spreadsheets for a living.”</p>
<p>“Limburger, I once fought off three hungry bears to protect my Limburger. True story.”</p>
<p>There are interesting cheese facts:</p>
<p>Famous for its pungent tendencies, this brave and bold Belgian cheese does nothing but intensify with age. Limburger was created to complement the highly flavored meats commonly eaten in Belgium and Germany. Today, a single cheese plant in Monroe, Wisconsin produces all the surface-ripened Limburger made in the United States.</p>
<p>(Monroe, Wisconsin is relatively close to the WiredPrairie homestead.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/894/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resource Intensive WPF Progress Bar (animation)</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/891</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/891#comments</comments>
		<pubDate>Tue, 26 Jan 2010 02:51:11 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/891</guid>
		<description><![CDATA[I’m using a progress bar in a small WPF application I’m working on and noticed that the Private Working Set for my application seemed higher than I expected. 
My application, once simplified down to it’s most basic element, consisted of:
Window, Grid, ProgressBar
On my Windows 7 x64 machine, running the application uses around 29MB (private working [...]]]></description>
			<content:encoded><![CDATA[<p>I’m using a progress bar in a small WPF application I’m working on and noticed that the Private Working Set for my application seemed higher than I expected. </p>
<p>My application, once simplified down to it’s most basic element, consisted of:</p>
<p>Window, Grid, ProgressBar</p>
<p>On my Windows 7 x64 machine, running the application uses around 29MB (private working set).</p>
<p>Removing the <strong>animation </strong>only from the visual template drops the private working set to 19MB.</p>
<p>So, it appears that the animation alone causes an extra 10MB of private working set to be needed. Sorry, but that’s crazy (especially for my application)!</p>
<p>If anyone has any specific theories – speak up! Here&#8217;s the basic starting Window I created:</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">Window
    </span><span style="color: red">xmlns</span><span style="color: blue">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    </span><span style="color: red">xmlns</span><span style="color: blue">:</span><span style="color: red">x</span><span style="color: blue">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    </span><span style="color: red">xmlns</span><span style="color: blue">:</span><span style="color: red">Microsoft_Windows_Themes</span><span style="color: blue">=&quot;clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero&quot; </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Class</span><span style="color: blue">=&quot;PerfProgressBar.Window1&quot;
    </span><span style="color: red">Title</span><span style="color: blue">=&quot;Window1&quot; </span><span style="color: red">Height</span><span style="color: blue">=&quot;300&quot; </span><span style="color: red">Width</span><span style="color: blue">=&quot;300&quot;&gt;
</span><span style="color: blue">    &lt;</span><span style="color: #a31515">Grid</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ProgressBar </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&quot;progressBar1&quot; </span><span style="color: red">Value</span><span style="color: blue">=&quot;100&quot; </span><span style="color: blue">/&gt;
    &lt;/</span><span style="color: #a31515">Grid</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">Window</span><span style="color: blue">&gt;
</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>I’m not going to post the entire ProgressBar template, but if you want to reproduce the problem (and see how the animation impacts the memory requirements, just comment out the “Animation” rectangle in the control template (and in the trigger as well):</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">Rectangle </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&quot;Animation&quot; </span><span style="color: red">Fill</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">TemplateBinding </span><span style="color: red">Foreground</span><span style="color: blue">}&quot; </span><span style="color: red">Grid.ColumnSpan</span><span style="color: blue">=&quot;3&quot; </span><span style="color: red">Grid.RowSpan</span><span style="color: blue">=&quot;2&quot;&gt;
    &lt;</span><span style="color: #a31515">Rectangle.OpacityMask</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">MultiBinding</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">MultiBinding.Converter</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Microsoft_Windows_Themes</span><span style="color: blue">:</span><span style="color: #a31515">ProgressBarHighlightConverter</span><span style="color: blue">/&gt;
            &lt;/</span><span style="color: #a31515">MultiBinding.Converter</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Binding </span><span style="color: red">Source</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">StaticResource </span><span style="color: red">ProgressBarIndicatorAnimatedFill</span><span style="color: blue">}&quot;/&gt;
            &lt;</span><span style="color: #a31515">Binding </span><span style="color: red">Path</span><span style="color: blue">=&quot;ActualWidth&quot; </span><span style="color: red">ElementName</span><span style="color: blue">=&quot;Background&quot;/&gt;
            &lt;</span><span style="color: #a31515">Binding </span><span style="color: red">Path</span><span style="color: blue">=&quot;ActualHeight&quot; </span><span style="color: red">ElementName</span><span style="color: blue">=&quot;Background&quot;/&gt;
        &lt;/</span><span style="color: #a31515">MultiBinding</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Rectangle.OpacityMask</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">Rectangle</span><span style="color: blue">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">Trigger </span><span style="color: red">Property</span><span style="color: blue">=&quot;IsIndeterminate&quot; </span><span style="color: red">Value</span><span style="color: blue">=&quot;false&quot;&gt;
    &lt;</span><span style="color: #a31515">Setter </span><span style="color: red">Property</span><span style="color: blue">=&quot;Fill&quot; </span><span style="color: red">TargetName</span><span style="color: blue">=&quot;Animation&quot; </span><span style="color: red">Value</span><span style="color: blue">=&quot;#80B5FFA9&quot;/&gt;
&lt;/</span><span style="color: #a31515">Trigger</span><span style="color: blue">&gt;
</span></pre>
<p>Apparently, the ProgressBarHighlightConverter is intense (a little double checking in Reflector confirms!).</p>
<p>(All animations have some price of course – as an experiment I rotated the progressbar in a storyboard and that used about 7MB).</p>
<p>The moral of the story here really is to make sure you do some sanity checks against your [fill-in-the-blank] technology so that you understand how it uses system resources such as memory, CPU, etc, as it may have an impact on the success or failure of your application. I’ll leave out the gratuitous animations in my application so it doesn’t use memory unnecessarily.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/891/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling automatic Sys.UI.Control attachment</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/890</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/890#comments</comments>
		<pubDate>Sun, 17 Jan 2010 18:26:54 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/890</guid>
		<description><![CDATA[If you’re using the Microsoft Ajax Library (learn), you may not always want to start the automatic “attach” process that takes place when the page loads. It’s easy to disable, but not yet documented any place I could find easily.
&#60;script src=&#34;Scripts/MicrosoftAjax/Start.debug.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34;&#62;

    var ajaxPath = &#34;&#34;;

    Sys.activateDom = [...]]]></description>
			<content:encoded><![CDATA[<p>If you’re using the Microsoft Ajax Library (<a href="http://www.asp.net/ajaxlibrary/learn.ashx" target="_blank">learn</a>), you may not always want to start the automatic “attach” process that takes place when the page loads. It’s easy to disable, but not yet documented any place I could find easily.</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">script </span><span style="color: red">src</span><span style="color: blue">=&quot;Scripts/MicrosoftAjax/Start.debug.js&quot; </span><span style="color: red">type</span><span style="color: blue">=&quot;text/javascript&quot;&gt;&lt;/</span><span style="color: #a31515">script</span><span style="color: blue">&gt;
&lt;</span><span style="color: #a31515">script </span><span style="color: red">type</span><span style="color: blue">=&quot;text/javascript&quot;&gt;

    var </span>ajaxPath = <span style="color: #a31515">&quot;&quot;</span>;

    Sys.activateDom = <span style="color: blue">false</span>;</pre>
<p>All you must do is set <strong>Sys.activateDom</strong> to <strong>false</strong> as shown above (make sure this is set <strong>after</strong> the new Start.js JavaScript file loads, otherwise your code will crash when you try to set the Sys object before it has been properly constructed). </p>
<p>Then, to begin the attach process, just call <strong>Sys.activateElements</strong>:</p>
<pre class="code">Sys.activateElements(document.documentElement);</pre>
<p>In the code line above, though I’ve specified that I want the entire HTML document activated, you could provide any element you want as a starting point (for example to optimize the use of the library and prevent unnecessary DOM searching for example).</p>
<p>I’m adding the delay in some JavaScript code because I wanted to set up a few variables in advance of the attach occurring. I tend to write my JavaScript code in an object oriented fashion these days (using the prototype pattern), including code that is interacting with the DOM. In this case, I’ll create a class that represents the logic of the page rather than following the typical purely functional model that is done on many JavaScript pages. But, when using the “<strong>eval</strong>” syntax of the Microsoft Ajax library “{{ code }}”, occasionally, I’ll need to delay the <strong>eval</strong> or the page will crash. </p>
<p>From my recent post on making a simple <a href="http://www.wiredprairie.us/blog/index.php/archives/885" target="_blank">command extension to the Microsoft Ajax library</a>, I wanted to make that more object oriented by referring to an instance of my class, rather than pointing directly to a function:</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">body sys</span><span style="color: blue">:</span><span style="color: red">attach</span><span style="color: blue">=&quot;wpc&quot;
    </span><span style="color: #a31515">wpc</span><span style="color: blue">:</span><span style="color: red">onbubbleevent</span><span style="color: blue">=&quot;{{$view.onCommand}}&quot;
    </span><span style="color: #a31515">xmlns</span><span style="color: blue">:</span><span style="color: red">sys</span><span style="color: blue">=&quot;javascript:Sys&quot; </span><span style="color: #a31515">xmlns</span><span style="color: blue">:</span><span style="color: red">wpc</span><span style="color: blue">=&quot;javascript:WiredPrairie.Commanding&quot;&gt;
</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><strong>$view </strong>represents the instance of my page’s behavior. However, if the attach were to occur too early, this variable is not yet set. I’m using the slick <a href="http://www.asp.net/ajaxlibrary/HOW%20TO%20Load%20a%20Custom%20Script%20with%20Dependencies.ashx">script loading functionality</a> of the ajax library, specifying the various JavaScript libraries and their dependencies, including my page’s behavior. It’s not until that JavaScript code is loaded that the code can create an instance – and that could be AFTER the page has already done the attach logic. The attach happens before <strong>Sys.onReady</strong> for example. (Sys.<strong>onDomReady</strong> happens before <strong>onReady</strong>, but not all JavaScript files may have been downloaded).</p>
<pre class="code">Sys.onReady(<span style="color: blue">function</span>() {
    $view = <span style="color: blue">new </span>WiredPrairie.MainView();

    Sys.activateElements(document.documentElement);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>When using the <strong>sys:attach</strong> attribute, note that the attach and instantiation process happens <strong>before</strong> any code you’ve specified in <strong>onReady</strong> is executed (Microsoft currently uses the same method for determining when everything is ready by adding a function call to <strong>onReady</strong> – but their call is first in the queue). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/890/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Jeffrey A Carver Science Fiction E-books</title>
		<link>http://www.wiredprairie.us/blog/index.php/archives/889</link>
		<comments>http://www.wiredprairie.us/blog/index.php/archives/889#comments</comments>
		<pubDate>Sun, 10 Jan 2010 21:46:54 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Recommendations]]></category>

		<guid isPermaLink="false">http://www.wiredprairie.us/blog/index.php/archives/889</guid>
		<description><![CDATA[Jeffrey Carver has provided a number of his science fiction books for free on his web site here. I’ve just completed reading the free Chaos Chronicles series (books 1-4) and enjoyed them quite a lot. Each book isn’t very long, so it’s easy enough to get through the series without drowning in sci-fi tech details. [...]]]></description>
			<content:encoded><![CDATA[<p>Jeffrey Carver has provided a number of his science fiction books for free on his web site <a href="http://www.starrigger.net/" target="_blank">here</a>. I’ve just completed reading the free Chaos Chronicles series (books 1-4) and enjoyed them quite a lot. Each book isn’t very long, so it’s easy enough to get through the series without drowning in sci-fi tech details. </p>
<p>My only “new year’s resolution” this year was recorded on <a href="http://twitter.com/wiredprairie" target="_blank">Twitter</a> thusly:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.wiredprairie.us/blog/wp-content/uploads/2010/01/image.png" width="450" height="316" /> </p>
<p>So, I just threw some money in Jeffrey’s tip-jar as a thank-you for the e-books. I’m sure it was more $ than he would have gotten directly from me if I had purchased the physical books from a reseller like Amazon.</p>
</p>
<p>Amazon has the fourth book in paperback at $7.99: <a href="http://www.amazon.com/gp/product/0812571207?ie=UTF8&amp;tag=wiredp-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0812571207">Sunborn (Chaos Chronicles)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wiredprairie.us/blog/index.php/archives/889/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
