<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.charteris.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Patrick Long&amp;#39;s Blog</title><link>http://blogs.charteris.com/blogs/patl-closed/default.aspx</link><description>All things regarding Microsoft&amp;#39;s UI Technologies (no cats)</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>Hello World with Silverlight Streaming</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/09/14/hello-word-with-silverlight-streaming.aspx</link><pubDate>Fri, 14 Sep 2007 21:06:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:461</guid><dc:creator>Anonymous</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=461</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/09/14/hello-word-with-silverlight-streaming.aspx#comments</comments><description>&lt;p&gt;New technology = new &amp;quot;Hello World&amp;quot; app, trouble with Silverlight is it makes it far too easy for me to get my ugly mug on the web.&lt;/p&gt;&lt;iframe src="http://silverlight.services.live.com/invoke/24187/HelloWorld/iframe.html" frameborder="0" width="566" scrolling="no" height="250"&gt; &lt;/iframe&gt;
&lt;p&gt;The blog currently runs on Community Server 2007 which understandably does&amp;nbsp;not makes it easy to to put any old markup in your blog posts. This is was the main reason i had never gotten around to playing with the web subset of WPF, Silverlight, that was until now. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/silverlight/streaming.aspx#"&gt;Silverlight Streaming&lt;/a&gt; allows me to package&amp;nbsp;up Silverlight applications,&amp;nbsp;upload them to Microsoft&amp;#39;s servers and then pull them down to my pages. However&amp;nbsp;that was not the complete solution.&amp;nbsp;I was still stuck because I could not get the necessary markup and JS into my Community Server blog page. Then whilst i was attending &lt;a href="http://www.microsoft.com/uk/mix07/"&gt;MIX07:UK&lt;/a&gt;&amp;nbsp;I went to Alastair Logan and Danny Thorpe&amp;#39;s &amp;quot;Building next generation web applications using Windows Live Services&amp;quot;. They showed us some great stuff including Silverlight Streaming. They pointed us to the various SDKs and docs at &lt;a href="http://dev.live.com/"&gt;http://dev.live.com&lt;/a&gt;, the key one for me was the Silverlight &amp;quot;&lt;a href="http://dev.live.com/silverlight/iframe.aspx"&gt;Using iframe invocation&lt;/a&gt;&amp;quot;. This shows me how to use an IFRAME to&amp;nbsp;host the Silverlight app in my blog post.&lt;/p&gt;
&lt;p&gt;&amp;lt;edit&amp;gt;&lt;/p&gt;
&lt;p&gt;As Simon Guest points out in this &lt;a class="" href="http://simonguest.com/blogs/smguest/archive/2007/05/23/Embedding-Silverlight-Videos-in-Community-Server.aspx"&gt;post&lt;/a&gt; in still needed to get&amp;nbsp;IFRAMEs allowed on the page.&lt;/p&gt;
&lt;p&gt;&amp;lt;/edit&amp;gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to know how to get the Silverlight application packaged up and into Silverlight Streaming in the first place check these links&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a title="Getting started with Silverlight Streaming" href="http://dev.live.com/silverlight/gettingstarted.aspx"&gt;Getting started with Silverlight Streaming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="Encoding media files for Silverlight Streaming" href="http://dev.live.com/silverlight/encode.aspx"&gt;Encoding media files for Silverlight Streaming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="QuickStart: Package a Video File using Expression" href="http://dev.live.com/silverlight/quickstart01.aspx"&gt;QuickStart: Package a Video File using Expression&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Go on press play just one more time :-)&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx&amp;tags=&amp;title=Hello+World+with+Silverlight+Streaming" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx&amp;tags=&amp;title=Hello+World+with+Silverlight+Streaming"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx&amp;title=Hello+World+with+Silverlight+Streaming&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx&amp;title=Hello+World+with+Silverlight+Streaming&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx&amp;title=Hello+World+with+Silverlight+Streaming" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f09%2f14%2fhello-word-with-silverlight-streaming.aspx&amp;title=Hello+World+with+Silverlight+Streaming"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=461" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Community+Server/default.aspx">Community Server</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>WPF Training Course - Part6 - Data and ItemsControl</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/08/23/wpf-training-course-part6-data-and-itemscontrol.aspx</link><pubDate>Wed, 22 Aug 2007 23:27:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:426</guid><dc:creator>Anonymous</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=426</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/08/23/wpf-training-course-part6-data-and-itemscontrol.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is part&amp;nbsp;6 of the training course originally described &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/18/wpf-training-course-free.aspx"&gt;here&lt;/a&gt;&amp;nbsp;with parts 2,3,&amp;nbsp;4&amp;nbsp;and 5 available &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/19/wpf-training-course-part2.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/27/wpf-training-course-part3-controls.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/07/09/wpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/07/21/wpf-training-course-part5-layout.aspx"&gt;here&lt;/a&gt; respectively. So far we have covered WPF fundamentals, XAML, brushes, shapes, controls, styling, resources and layout. 
&lt;/p&gt;&lt;h3&gt;Part6&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Data&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Binding class&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Converter property&lt;/li&gt;
&lt;li&gt;ElementName property&lt;/li&gt;
&lt;li&gt;Mode property&lt;/li&gt;
&lt;li&gt;Path property&lt;/li&gt;
&lt;li&gt;RelativeSource property&lt;/li&gt;
&lt;li&gt;XPath property&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;LAB12 - Databinding elements to each other&lt;/li&gt;
&lt;li&gt;DataContext&lt;/li&gt;
&lt;li&gt;DataProviders&lt;/li&gt;
&lt;li&gt;LAB13 - Binding to an ObjectDataProvider&lt;/li&gt;
&lt;li&gt;DataTemplates&lt;/li&gt;
&lt;li&gt;DataTemplateSelector&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;ItemsControl&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;ItemsSource property&lt;/li&gt;
&lt;li&gt;ItemTemplate property&lt;/li&gt;
&lt;li&gt;ItemsPanel property&lt;/li&gt;
&lt;li&gt;ItemContainerStyle&lt;/li&gt;
&lt;li&gt;LAB14 - Using ItemControl with ItemsSource, ItemsPanelTemplate, ItemsPanel, ItemContainerStyle and DataTriggers&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;
&lt;p&gt;&lt;a href="http://blogs.charteris.com/files/folders/trainingcourse/entry425.aspx"&gt;Download Part6.zip&lt;/a&gt; which includes a slide deck and the 3 labs. Code to get you started with the labs is included.&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part6+-+Data+and+ItemsControl" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part6+-+Data+and+ItemsControl"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx&amp;title=WPF+Training+Course+-+Part6+-+Data+and+ItemsControl&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx&amp;title=WPF+Training+Course+-+Part6+-+Data+and+ItemsControl&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx&amp;title=WPF+Training+Course+-+Part6+-+Data+and+ItemsControl" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f08%2f23%2fwpf-training-course-part6-data-and-itemscontrol.aspx&amp;title=WPF+Training+Course+-+Part6+-+Data+and+ItemsControl"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=426" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Training/default.aspx">Training</category></item><item><title>Microsoft Surface - Alternative View</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/25/microsoft-surface-alternative-view.aspx</link><pubDate>Wed, 25 Jul 2007 10:46:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:406</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=406</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/25/microsoft-surface-alternative-view.aspx#comments</comments><description>&lt;p&gt;Seeing as I blogged the &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/06/microsoft-surface-behind-the-scenes-video.aspx"&gt;Behind The Scenes look at Microsoft Surface&lt;/a&gt;&amp;nbsp;I thought it only fair to give equal attention to this&amp;nbsp;very funny (IMHO) tongue-in-cheek look at Microsoft Surface.&lt;/p&gt;
&lt;p&gt;&lt;a title="Links to Microsoft Surface Parody on YouTube" href="http://www.youtube.com/watch?v=CZrr7AZ9nCY"&gt;&lt;img alt="" src="http://youtube.com/img/pic_youtubelogo_123x63.gif" border="0" /&gt; Microsoft Surface Parody on YouTube &lt;/a&gt;&lt;/p&gt;&lt;span style="FONT-WEIGHT:bold;"&gt;&lt;/span&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx&amp;tags=&amp;title=Microsoft+Surface+-+Alternative+View" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx&amp;tags=&amp;title=Microsoft+Surface+-+Alternative+View"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx&amp;title=Microsoft+Surface+-+Alternative+View&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx&amp;title=Microsoft+Surface+-+Alternative+View&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx&amp;title=Microsoft+Surface+-+Alternative+View" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f25%2fmicrosoft-surface-alternative-view.aspx&amp;title=Microsoft+Surface+-+Alternative+View"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=406" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Dev+Humour/default.aspx">Dev Humour</category></item><item><title>WPF Training Course - Part5 - Layout</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/21/wpf-training-course-part5-layout.aspx</link><pubDate>Sat, 21 Jul 2007 20:54:30 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:398</guid><dc:creator>Anonymous</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=398</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/21/wpf-training-course-part5-layout.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;This is part 5 of the training course originally described &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/18/wpf-training-course-free.aspx"&gt;here&lt;/a&gt;&amp;nbsp;with parts 2,3 and 4&amp;nbsp;available &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/19/wpf-training-course-part2.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/27/wpf-training-course-part3-controls.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/07/09/wpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx"&gt;here&lt;/a&gt; respectively. So far we have covered WPF fundamentals, XAML, brushes, shapes, controls, styling and resources.  &lt;p&gt;Again if anyone wants to contact me for clarifications or to talk over part of the course just use a Comment or the Contact link at the top of the page. Good luck!  &lt;p&gt;The details of part 5 are below, the labs and&amp;nbsp;any associated code are in the download package. LAB 11 is fairly important to get right and to understand why it is right. You may get something that looks close but it could be light years away from the correct solution, therefore I am going to include a completed solution as well. You don&amp;#39;t have to use it but it is worth referring to when you have finished. Before starting Part5 I strongly suggest looking at parts 1 - 4 as this part&amp;nbsp;really does draw on all the previous ones. If you think you know it all already at least review the contents of each part that I put in the blog post. If you are happy that you know the pre-reqs&amp;nbsp;then great let&amp;#39;s go! &lt;h3&gt;Part5&lt;/h3&gt; &lt;ol&gt; &lt;li&gt;Margins and Padding&lt;/li&gt; &lt;li&gt;Alignment&lt;/li&gt; &lt;li&gt;Layout logic overview&lt;/li&gt; &lt;li&gt;Height and Width&lt;/li&gt; &lt;li&gt;Transforms&lt;/li&gt; &lt;ol&gt; &lt;li&gt;RotateTransform&lt;/li&gt; &lt;li&gt;ScaleTransform&lt;/li&gt; &lt;li&gt;SkewTransform&lt;/li&gt; &lt;li&gt;TranslateTransform&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;RenderTransform vs LayoutTransform&lt;/li&gt; &lt;li&gt;LAB10 - Adding Interactions with Triggers&lt;/li&gt; &lt;li&gt;Dependency Properties Explained&lt;/li&gt; &lt;li&gt;Attached Properties Explained&lt;/li&gt; &lt;li&gt;Layout Panels&lt;/li&gt; &lt;ol&gt; &lt;li&gt;StackPanel&lt;/li&gt; &lt;li&gt;Grid&lt;/li&gt; &lt;li&gt;UniformGrid&lt;/li&gt; &lt;li&gt;DockPanel&lt;/li&gt; &lt;li&gt;Canvas&lt;/li&gt; &lt;li&gt;WrapPanel&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Stretching - Bible&lt;/li&gt; &lt;li&gt;Z-Order&lt;/li&gt; &lt;li&gt;LAB11 - Run dialog (LAB 11 is fairly important to get right and to understand why it is right. You may get something that looks close but it could be light years away from the correct solution, therefore I am going to include a completed solution in the download as well.)&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;a href="http://blogs.charteris.com/files/folders/trainingcourse/entry397.aspx"&gt;Download Part5.zip&lt;/a&gt; which includes a slide deck and the 2 labs. Code to get you started with the labs is included.&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part5+-+Layout" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part5+-+Layout"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx&amp;title=WPF+Training+Course+-+Part5+-+Layout&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx&amp;title=WPF+Training+Course+-+Part5+-+Layout&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx&amp;title=WPF+Training+Course+-+Part5+-+Layout" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-training-course-part5-layout.aspx&amp;title=WPF+Training+Course+-+Part5+-+Layout"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=398" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Training/default.aspx">Training</category></item><item><title>WPF Elements and stretching to the Layout panel</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/21/wpf-elements-and-stretching-to-the-layout-panel.aspx</link><pubDate>Sat, 21 Jul 2007 19:52:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:395</guid><dc:creator>Anonymous</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=395</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/21/wpf-elements-and-stretching-to-the-layout-panel.aspx#comments</comments><description>&lt;p&gt;Debugging&amp;nbsp;layout issues is something I had to do fairly often particularly with some of the complex layouts we were trying in the past. Trying&amp;nbsp;to work out why &amp;quot;such and such&amp;quot; FrameworkElement would not stretch&amp;nbsp;to the&amp;nbsp;size of&amp;nbsp;&amp;quot;whatever&amp;quot; layout panel I was using.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Before we get to the detail of stretching there is one&amp;nbsp;simple layout, debugging technique that I think is worth sharing; It is that setting the backgrounds of all the various panels that you are using,&amp;nbsp;whilst debugging,&amp;nbsp;makes life much easier. Take this relatively simple layout problem&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.charteris.com/blogs/patl/WindowsLiveWriter/WPFElementsandstretchingtotheLayoutpanel_835/LayoutDebugging6.png"&gt;&lt;img style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height="235" src="http://blogs.charteris.com/blogs/patl/WindowsLiveWriter/WPFElementsandstretchingtotheLayoutpanel_835/LayoutDebugging_thumb2.png" width="407" border="0" alt="" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Imagine if we are trying to find work out why the buttons &amp;quot;2&amp;quot; are not aligned to the bottom of the screen even though they have VerticalAlignment set to Bottom. Well colouring the different layout panels will as you can see make it easier to see what is constraining what.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.charteris.com/blogs/patl/WindowsLiveWriter/WPFElementsandstretchingtotheLayoutpanel_835/LayoutDebugging_ColoredBackground2.png"&gt;&lt;img style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height="237" src="http://blogs.charteris.com/blogs/patl/WindowsLiveWriter/WPFElementsandstretchingtotheLayoutpanel_835/LayoutDebugging_ColoredBackground_th.png" width="414" border="0" alt="" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;From this you can see that is more than likely the PaleGoldenRod coloured panel that is causing the panel containing the &amp;quot;2&amp;quot; buttons to layout as they are.&lt;/p&gt;
&lt;h3&gt;Stretching - Bible&lt;/h3&gt;
&lt;p&gt;I know it is a little arrogant to suggest&amp;nbsp;I could write a bible on anything&amp;nbsp;but this was the most often referenced pieces of WPF information I had, on a previous project. I cover it in&amp;nbsp;the upcoming &lt;a class="" href="http://blogs.charteris.com/blogs/patl/archive/2007/07/21/wpf-training-course-part5-layout.aspx"&gt;Part5 of my WPF Training Course&lt;/a&gt;, but I thought it was useful enough to pull out here.&lt;/p&gt;
&lt;p&gt;FrameworkElements have a default of Stretch for their HorizontalAlignment and VerticalAlignment but whether or not this stretching is performed all depends on the containing layout panel and how that Panel is being used. It is this information that&amp;nbsp;I refer to as the &amp;quot;Stretching - Bible&amp;quot;&lt;/p&gt;
&lt;table class=""&gt;

&lt;tr&gt;
&lt;th class=""&gt;Panel&lt;/th&gt;
&lt;th class=""&gt;X Dimension&lt;/th&gt;
&lt;th class=""&gt;Y Dimension&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt;
&lt;td class=""&gt;Canvas &lt;/td&gt;
&lt;td class=""&gt;No&lt;/td&gt;
&lt;td class=""&gt;No&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;Dock &lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;StackPanel (Vertical &lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;No&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;StackPanel (Horizontal)&lt;/td&gt;
&lt;td class=""&gt;No&lt;/td&gt;
&lt;td class=""&gt;Yes &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;Grid&lt;/td&gt;
&lt;td class=""&gt;Yes*&lt;/td&gt;
&lt;td class=""&gt;Yes*&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;WrapPanel &lt;/td&gt;
&lt;td class=""&gt;No&lt;/td&gt;
&lt;td class=""&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;* Except when using &amp;quot;Auto&amp;quot; rows and columns&lt;/p&gt;
&lt;p&gt;Yes in the above table means &amp;quot;Children are stretched to available size&amp;quot;&lt;/p&gt;
&lt;p&gt;No in the above table means &amp;quot;Children are their desired size&amp;quot;&lt;/p&gt;
&lt;p&gt;I find myself referring back to this table whenever I am wondering why elements are not stretching even though I have set their alignment(s) to Stretch. Hope it helps someone else too.&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx&amp;tags=&amp;title=WPF+Elements+and+stretching+to+the+Layout+panel" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx&amp;tags=&amp;title=WPF+Elements+and+stretching+to+the+Layout+panel"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx&amp;title=WPF+Elements+and+stretching+to+the+Layout+panel&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx&amp;title=WPF+Elements+and+stretching+to+the+Layout+panel&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx&amp;title=WPF+Elements+and+stretching+to+the+Layout+panel" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f21%2fwpf-elements-and-stretching-to-the-layout-panel.aspx&amp;title=WPF+Elements+and+stretching+to+the+Layout+panel"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=395" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Microsoft Health CUI released today</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/13/microsoft-health-cui-released-today.aspx</link><pubDate>Thu, 12 Jul 2007 23:51:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:378</guid><dc:creator>Anonymous</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=378</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/13/microsoft-health-cui-released-today.aspx#comments</comments><description>&lt;p&gt;For the last year or so I have been working on the Microsoft Health Common User Interface (CUI) project at Microsoft and today it was released &lt;a href="http://www.mscui.com/"&gt;here&lt;/a&gt; (&lt;a href="http://www.mscui.com/"&gt;www.mscui.com&lt;/a&gt;) and on &lt;a href="http://www.codeplex.com/mscui"&gt;here&lt;/a&gt; on CodePlex (&lt;a title="http://www.codeplex.com/mscui" href="http://www.codeplex.com/mscui"&gt;http://www.codeplex.com/mscui&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The work released today comes from two areas of the ongoing work that Microsoft is doing in this area. First up is &lt;a href="http://www.mscui.com/DesignGuide/DesignGuide.aspx"&gt;Design Guidance,&lt;/a&gt; this is a collection of best practice user interface guidance for clinical applications. Apologies for simply quoting the website but people smarter than me came up with&amp;nbsp;the words so I might as well quote them&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Design Guidance has been produced through a rigorous user-centred design process that incorporates primary and secondary research, usability testing, consultation with software providers and integrated hazard assessments. Patient Safety Assessments (PSAs) are continually performed to ensure the Design Guidance meets safety concerns.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The guidance is targeted at both existing clinical applications and those that are being designed and architected right now. The second part of this release is the implementation of much of that guidance in the form of control libraries for both WinForms 2.0 and ASP.NET. The website contains &lt;a href="http://www.mscui.com/ControlsAndSamples.aspx"&gt;explanation and samples&lt;/a&gt; for each of the Web controls with the &lt;a href="http://www.codeplex.com/mscui"&gt;Codeplex project&lt;/a&gt; hosting a download of both&amp;nbsp;the Winforms and the ASP.NET Control library. &lt;/p&gt;
&lt;p&gt;The ASP.NET controls use much of&amp;nbsp;ASP.NET Ajax and the extensions to that technology provided by the &lt;a href="http://ajax.asp.net/ajaxtoolkit/"&gt;AjaxControlToolkit&lt;/a&gt;. There are some really handy controls on the site that I am sure you will find useful even if you are not working&amp;nbsp;on clinical applications, take for instance the &lt;a href="http://www.mscui.com/Components/DateInputBox.aspx"&gt;DateInputBox&lt;/a&gt; control.&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx&amp;tags=&amp;title=Microsoft+Health+CUI+released+today" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx&amp;tags=&amp;title=Microsoft+Health+CUI+released+today"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx&amp;title=Microsoft+Health+CUI+released+today&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx&amp;title=Microsoft+Health+CUI+released+today&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx&amp;title=Microsoft+Health+CUI+released+today" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f13%2fmicrosoft-health-cui-released-today.aspx&amp;title=Microsoft+Health+CUI+released+today"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=378" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/ASP.Net+AJAX/default.aspx">ASP.Net AJAX</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Windows+Forms/default.aspx">Windows Forms</category></item><item><title>WPF Training Course (Free) - Part4 - ResourceDictionaries, Styles and Triggers</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/09/wpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx</link><pubDate>Mon, 09 Jul 2007 22:54:10 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:370</guid><dc:creator>Anonymous</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=370</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/09/wpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;This is part 4 of the training course originally described &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/18/wpf-training-course-free.aspx"&gt;here&lt;/a&gt;&amp;nbsp;with parts 2 &amp;amp; 3 available &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/19/wpf-training-course-part2.aspx"&gt;here&lt;/a&gt;&amp;nbsp;and &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/27/wpf-training-course-part3-controls.aspx"&gt;here&lt;/a&gt; respectively. So far we have covered WPF fundamentals, XAML, brushes, shapes, controls and&amp;nbsp;control templating. &lt;p&gt;Again if anyone wants to contact me for clarifications or to talk over part of the course just use a Comment or the Contact link at the top of the page. Good luck!  &lt;p&gt;The details of part 4 are below, the labs and&amp;nbsp;any associated code are in the download package &lt;h2&gt;Part4&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;ResourceDictionaries&lt;/li&gt; &lt;ol&gt; &lt;li&gt;Reusing XAML&lt;/li&gt; &lt;li&gt;Why use a ResourceDictionary?&lt;/li&gt; &lt;li&gt;Resource discovery&lt;/li&gt; &lt;li&gt;File-based resource dictionaries&lt;/li&gt; &lt;li&gt;LAB8 - Resources - Referencing System colours, Dynamic and Static&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Styles&lt;/li&gt; &lt;ol&gt; &lt;li&gt;Referencing Styles&lt;/li&gt; &lt;li&gt;TargetType&lt;/li&gt; &lt;li&gt;BasedOn&lt;/li&gt; &lt;li&gt;LAB9 - Debugging Styling Issues&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Triggers&lt;/li&gt; &lt;ol&gt; &lt;li&gt;EventTrigger&lt;/li&gt; &lt;li&gt;Property-based Trigger&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.charteris.com/files/folders/trainingcourse/entry369.aspx"&gt;Download Part4.zip&lt;/a&gt; which includes a slide deck and the 2 labs. Code to get you started with the labs is included.&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx&amp;tags=&amp;title=WPF+Training+Course+(Free)+-+Part4+-+ResourceDictionaries%2c+Styles+and+Triggers" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx&amp;tags=&amp;title=WPF+Training+Course+(Free)+-+Part4+-+ResourceDictionaries%2c+Styles+and+Triggers"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx&amp;title=WPF+Training+Course+(Free)+-+Part4+-+ResourceDictionaries%2c+Styles+and+Triggers&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx&amp;title=WPF+Training+Course+(Free)+-+Part4+-+ResourceDictionaries%2c+Styles+and+Triggers&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx&amp;title=WPF+Training+Course+(Free)+-+Part4+-+ResourceDictionaries%2c+Styles+and+Triggers" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f09%2fwpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx&amp;title=WPF+Training+Course+(Free)+-+Part4+-+ResourceDictionaries%2c+Styles+and+Triggers"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=370" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Training/default.aspx">Training</category></item><item><title>KeyCodes, CharCodes and ASP.NET AJAX</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/04/keycodes-charcodes-and-asp-net-ajax.aspx</link><pubDate>Wed, 04 Jul 2007 21:11:20 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:356</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=356</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/07/04/keycodes-charcodes-and-asp-net-ajax.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;First up this post is as much for me as it is for the person that happens upon it via a SE, this stuff is kind of confusing and I will need reminding. &lt;p&gt;Secondly I am far from an expert, only recently something blindingly obvious about Key Codes and why they are called &lt;i&gt;key&lt;/i&gt; codes was point out to me. Thanks &lt;a href="http://aspadvice.com/blogs/rbirkby/"&gt;Richard&lt;/a&gt;. &lt;h3&gt;KeyCode vs CharCode&lt;/h3&gt; &lt;p&gt;A KeyCode is a not a code for a specific character; for instance the same code is returned whether or not it’s character is UPPER or lower case. The KeyCode resulting from the number 7 being pressed on the main QWERTY part of the keyboard is &lt;b&gt;not&lt;/b&gt; the same as the KeyCode resulting from the number 7 being pressed on the num-pad.&lt;/p&gt; &lt;p&gt;A CharCode on the other hand does map to a specific character and that character can be obtained from the String.fromCharCode function. Do not pass a KeyCode to this function it may work for some KeyCode but on the whole you will get “wild results for many keys”. For example pressing the Down navigational key will result in a KeyCode of 40, passing that into fromCharCode will get you the “(“ character! (I’ve been there and it hurt when I kicked myself) &lt;p&gt;On the whole a KeyCode is what is used in the keyDown and keyUp events with CharCode being the one to use in keyPress. I say “on the whole” because as usual browsers do differ. &lt;a href="http://unixpapa.com/js/key.html"&gt;JavaScript Madness: Keyboard Events&lt;/a&gt; is a great article for giving more detail, particularly around the differences between the browsers.  &lt;p&gt;&lt;a href="http://www.w3.org/2002/09/tests/keys-cancel2.html"&gt;Key and Character Codes vs. Event Types&lt;/a&gt; is a great little page for discovering what charCode and/or KeyCode is sent as a result of a key being pressed on the keyboard. &lt;p&gt;Interestingly whilst we cannot say a KeyCode is a code for a specific character the codes do seem linked. For instance my UK keyboard gives me the KeyCode of 81 when I press the key with the letter “Q” on it however when I switch to a French keyboard that same physical key will give me a KeyCode of 65 (and the character ‘a’). Therefore we can say the KeyCode is not hard-wired to a physical key. If I press the key with the letter “A” on it, whilst in a French keyboard, I get the KeyCode of 81 (and the character ‘q’) which is what I got when I pressed the “Q” key in the UK keyboard. This tells me that the KeyCodes are linked in some way to characters but the link is not absolute and is not true for all keys. &lt;p&gt;If you are checking this out for yourself make sure you restart your browser after changing keyboard. I was testing in IE7 and the keyboard change was not picked up until after I reloaded the browser. &lt;h3&gt;&lt;/h3&gt; &lt;h4&gt;ASP.NET Ajax’s DomEvent wrapper&lt;/h4&gt; &lt;p&gt;Like most of the often used things in AJAX development, there is a cross browser wrapper for the standard JavaScript event object argument, &lt;a href="http://ajax.asp.net/docs/ClientReference/Sys.UI/DomEventClass/default.aspx"&gt;DomEvent&lt;/a&gt;. The docs for DomEvent only ever talk about charCode. Do not do as I did and assume that the DomEvent is mapping KeyCodes and CharCodes to a single charCode member on DomEvent. The follow on form that assumption is that you should &lt;b&gt;always&lt;/b&gt; use DomEvent.CharCode, wrong. There is a documentation error as of 4 July 2007, the docs are missing KeyCode it does exists and the current script v1.0.61025 populates it like so&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (e.type === &lt;span class="str"&gt;&amp;#39;keypress&amp;#39;&lt;/span&gt;) {
    &lt;span class="kwrd"&gt;this&lt;/span&gt;.charCode = e.charCode || e.keyCode;
}
&lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (e.keyCode &amp;amp;&amp;amp; (e.keyCode === 46)) {
    &lt;span class="kwrd"&gt;this&lt;/span&gt;.keyCode = 127;
}
&lt;span class="kwrd"&gt;else&lt;/span&gt; {
    &lt;span class="kwrd"&gt;this&lt;/span&gt;.keyCode = e.keyCode;
}
&lt;/pre&gt;
&lt;p&gt;Note the ‘e’ variable in this code is the original event arg that is being wrapped by DomEvent
&lt;p&gt;Therefore we can safely say that when using&amp;nbsp;DomEvent:
&lt;ul&gt;
&lt;li&gt;The KeyPress event will give us a charCode member populated from either a CharCode or a KeyCode with CharCode taking precedence.&lt;/li&gt;
&lt;li&gt;The KeyDown and KeyUp events will always result in a keyCode member equal to a keyCode&lt;/li&gt;&lt;/ul&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx&amp;tags=&amp;title=KeyCodes%2c+CharCodes+and+ASP.NET+AJAX" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx&amp;tags=&amp;title=KeyCodes%2c+CharCodes+and+ASP.NET+AJAX"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx&amp;title=KeyCodes%2c+CharCodes+and+ASP.NET+AJAX&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx&amp;title=KeyCodes%2c+CharCodes+and+ASP.NET+AJAX&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx&amp;title=KeyCodes%2c+CharCodes+and+ASP.NET+AJAX" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f07%2f04%2fkeycodes-charcodes-and-asp-net-ajax.aspx&amp;title=KeyCodes%2c+CharCodes+and+ASP.NET+AJAX"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=356" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/ASP.Net+AJAX/default.aspx">ASP.Net AJAX</category></item><item><title>WPF Training Course - Part3 - Controls</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/27/wpf-training-course-part3-controls.aspx</link><pubDate>Wed, 27 Jun 2007 22:06:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:351</guid><dc:creator>Anonymous</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=351</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/27/wpf-training-course-part3-controls.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is part 3 of the training course originally described &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/18/wpf-training-course-free.aspx"&gt;here&lt;/a&gt;&amp;nbsp;with part 2 available &lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/19/wpf-training-course-part2.aspx"&gt;here&lt;/a&gt;. From this part onwards the course tends to concentrate more on labs and classroom interaction than on plain slide content. This worked great in a classroom scenario but it may make it hard otherwise. I have edited some of the downloadable slides to make them easier to read in isolation. 
&lt;p&gt;Again if anyone wants to contact me for clarifications or to talk over part of the course just use a Comment or the Contact link at the top of the page. Good luck! 
&lt;h2&gt;Part3&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Controls&lt;/li&gt;
&lt;li&gt;ContentControl&lt;/li&gt;
&lt;li&gt;LAB6 - ContentControls - Creating a UI only a mother could love&lt;/li&gt;
&lt;li&gt;Controls (remixed)&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Retemplating&lt;/li&gt;
&lt;li&gt;LAB7 - Retemplate a Standard Button&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.charteris.com/files/folders/trainingcourse/entry350.aspx"&gt;Download Part3.zip&lt;/a&gt; which includes a slide deck and the 2 labs. Code to get you started with the labs is included. &lt;/p&gt;
&lt;h3&gt;&amp;lt;Edit&amp;gt;&lt;/h3&gt;Replaced part3.zip adding VS2005 versions of the labs to the exisiting VS.NET Orcas versions. Changed lab docs to be Word 97-2003 rather than Word 2007 
&lt;h3&gt;&amp;lt;/Edit&amp;gt;&lt;/h3&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part3+-+Controls" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part3+-+Controls"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx&amp;title=WPF+Training+Course+-+Part3+-+Controls&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx&amp;title=WPF+Training+Course+-+Part3+-+Controls&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx&amp;title=WPF+Training+Course+-+Part3+-+Controls" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f27%2fwpf-training-course-part3-controls.aspx&amp;title=WPF+Training+Course+-+Part3+-+Controls"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=351" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Training/default.aspx">Training</category></item><item><title>Beware the ASP.NET Ajax assemblies from the future</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/25/beware-the-asp-net-ajax-assemblies-from-the-future.aspx</link><pubDate>Mon, 25 Jun 2007 22:48:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:346</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=346</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/25/beware-the-asp-net-ajax-assemblies-from-the-future.aspx#comments</comments><description>&lt;p&gt;We were deploying some assemblies last week that were built in the UK on Friday afternoon and were being copied immediately to a US server. Some of these assemblies contained ASP.NET Ajax components and some of the pages in the website used these and some of the AjaxControlToolkit.&lt;/p&gt;
&lt;p&gt;Preliminary tests showed that something was up and requests for Javascript files being served out of the previously mentioned assemblies were being returned with a HTTP 500 status code(internal server error).&lt;/p&gt;
&lt;p&gt;Looking at the response in &lt;a href="http://www.getfirebug.com/" target="_blank"&gt;Firebug&lt;/a&gt; I could see the call stack was pointing towards&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;System.Web.HttpCachePolicy.UtcSetLastModified&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;System.Web.Handlers.ScriptResourceHandler.PrepareResponseCache&lt;/li&gt;
&lt;li&gt;System.Web.Handlers.ScriptResourceHandler.ProcessRequest&lt;/li&gt;
&lt;li&gt;System.Web.HttpApplication.ExecuteStep&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With an ArgumentOutOfRangeException being thrown. After taking a look with Reflector I hit my favourite search engine and&amp;nbsp;found&amp;nbsp;this &lt;a href="http://plainoldstan.blogspot.com/2007/04/aspnet-ajax-cachepolicysetlastmodifiedd.html"&gt;excellent blog post&lt;/a&gt;. The gist is that the System.Web.Extensions code was getting the last modified DateTime from&amp;nbsp;each assembly and using that to build the Cache entry. In the code that sets the Cache policy&amp;#39;s LastModifiedDate it checks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (utcDate &amp;gt; DateTime.UtcNow)
{
   &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentOutOfRangeException(&lt;span class="str"&gt;&amp;quot;utcDate&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;Our assemblies were all greater than the US server&amp;#39;s UtcNow so we kept seeing the ArgumentOutOfRangeException. The temporary solution was for us to use a File Touch utility such as &lt;a href="http://www.jddesign.f2s.com/touchpro.htm"&gt;TouchPro&lt;/a&gt;&amp;nbsp;to change the modified date to something the US server was happy with. &lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx&amp;tags=&amp;title=Beware+the+ASP.NET+Ajax+assemblies+from+the+future" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx&amp;tags=&amp;title=Beware+the+ASP.NET+Ajax+assemblies+from+the+future"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx&amp;title=Beware+the+ASP.NET+Ajax+assemblies+from+the+future&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx&amp;title=Beware+the+ASP.NET+Ajax+assemblies+from+the+future&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx&amp;title=Beware+the+ASP.NET+Ajax+assemblies+from+the+future" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f25%2fbeware-the-asp-net-ajax-assemblies-from-the-future.aspx&amp;title=Beware+the+ASP.NET+Ajax+assemblies+from+the+future"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=346" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/ASP.Net+AJAX/default.aspx">ASP.Net AJAX</category></item><item><title>WPF Training Course - Part2</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/19/wpf-training-course-part2.aspx</link><pubDate>Mon, 18 Jun 2007 23:03:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:333</guid><dc:creator>Anonymous</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=333</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/19/wpf-training-course-part2.aspx#comments</comments><description>&lt;p&gt;This is part 2 of a training course I originally put together for the Charteris team and am now posting online. See &lt;a class="" href="http://blogs.charteris.com/blogs/patl/archive/2007/06/18/wpf-training-course-free.aspx"&gt;here&lt;/a&gt; for the original Post and details on Part1&lt;/p&gt;
&lt;h2&gt;Part2&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;2D Graphics&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Colour and RGB&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;Brushes&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;SolidColorBrush&lt;/li&gt;
&lt;li&gt;VisualBrush&lt;/li&gt;
&lt;li&gt;LAB3 - Demonstrate Visual created solely for a VisualBrush (See document LAB3 VisualBrush1 - Visual for VisualBrush.doc)&lt;/li&gt;
&lt;li&gt;LAB4 – Reflection Effects (See document LAB4 VisualBrush2 - Reflection.doc)&lt;/li&gt;
&lt;li&gt;GradientBrush&lt;/li&gt;
&lt;li&gt;LAB5 - Touching up our reflection (See document LAB5 GradientBrush - Touching up our reflection.doc)&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;Shapes&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;a class="" href="http://blogs.charteris.com/files/folders/trainingcourse/entry335.aspx"&gt;Download&amp;nbsp;Part2.zip&lt;/a&gt; which includes a slide deck and the three labs. &lt;/p&gt;
&lt;p&gt;Part3 will be on Controls, ContentControls and&amp;nbsp;Control templating&lt;/p&gt;
&lt;h3&gt;&amp;lt;Edit&amp;gt;&lt;/h3&gt;Replaced part2.zip adding VS2005 versions of the labs to&amp;nbsp;the exisiting VS.NET Orcas versions 
&lt;h3&gt;&amp;lt;/Edit&amp;gt;&lt;/h3&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part2" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx&amp;tags=&amp;title=WPF+Training+Course+-+Part2"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx&amp;title=WPF+Training+Course+-+Part2&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx&amp;title=WPF+Training+Course+-+Part2&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx&amp;title=WPF+Training+Course+-+Part2" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f19%2fwpf-training-course-part2.aspx&amp;title=WPF+Training+Course+-+Part2"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=333" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Training/default.aspx">Training</category></item><item><title>WPF Training Course - (Free)</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/18/wpf-training-course-free.aspx</link><pubDate>Mon, 18 Jun 2007 22:52:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:332</guid><dc:creator>Anonymous</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=332</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/18/wpf-training-course-free.aspx#comments</comments><description>&lt;p&gt;Back in April I was asked to put together a training course on Windows Presentation Foundation (WPF) for&amp;nbsp;the Charteris&amp;nbsp;team. The course was well received here and it was agreed that after a bit of time I could release it publically. So&amp;nbsp;I am going to make most the course available here. I will post it in parts and I am happy to take questions, clarifications and comments about each part. Each one will include the relevant powerpoint slides&amp;nbsp;and relevant labs, with code to start you off.&lt;/p&gt;
&lt;h2&gt;Part1&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Fundamentals 
&lt;ol&gt;
&lt;li&gt;Overview 
&lt;li&gt;Components of WPF 
&lt;li&gt;Key classes 
&lt;li&gt;Retained Mode&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;XAML 
&lt;ol&gt;
&lt;li&gt;XAML Overview 
&lt;li&gt;Basic XAML 
&lt;li&gt;Simple Property Setting 
&lt;li&gt;Complex Property Setting 
&lt;li&gt;Property setting - long hand&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;Tools 
&lt;ol&gt;
&lt;li&gt;Microsoft Expression Blend 
&lt;li&gt;Visual Studio Codename Orcas 
&lt;li&gt;XamlPad 
&lt;li&gt;LAB - Explore Editing Tools (See&amp;nbsp; documents &amp;quot;LAB1 Exploring XamlPad.doc&amp;quot; &amp;amp; &amp;quot;LAB2 Exploring Visual Studio Codename Orcas.doc&amp;quot;) 
&lt;li&gt;Developer to Designer&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a class="" href="http://blogs.charteris.com/files/folders/trainingcourse/entry334.aspx"&gt;Download&amp;nbsp;Part1.zip&lt;/a&gt; which includes a slide deck and the three labs. Part2 will be on 2D Graphics, Brushes including VisualBrush, and Shapes.&lt;/p&gt;
&lt;h3&gt;&amp;lt;Edit&amp;gt;&lt;/h3&gt;
&lt;p&gt;The following parts of this course are now available&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fundamentals, XAML and Tools&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/19/wpf-training-course-part2.aspx"&gt;2D Graphics, Brushes and Shapes&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/06/27/wpf-training-course-part3-controls.aspx"&gt;Controls, Content and Retemplating&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.charteris.com/blogs/patl/archive/2007/07/09/wpf-training-course-free-part4-resourcedictionaries-styles-and-triggers.aspx"&gt;ResourceDictionaries, Styles and Triggers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="http://blogs.charteris.com/blogs/patl/archive/2007/07/21/wpf-training-course-part5-layout.aspx"&gt;Layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="http://blogs.charteris.com/blogs/patl/archive/2007/08/23/wpf-training-course-part6-data-and-itemscontrol.aspx"&gt;Data and the ItemsControl&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Edit 10 September 2007 - Removed the now out of date Expression Blend walkthrough&lt;/p&gt;
&lt;h3&gt;&amp;lt;/Edit&amp;gt;&lt;/h3&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx&amp;tags=&amp;title=WPF+Training+Course+-+(Free)" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx&amp;tags=&amp;title=WPF+Training+Course+-+(Free)"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx&amp;title=WPF+Training+Course+-+(Free)&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx&amp;title=WPF+Training+Course+-+(Free)&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx&amp;title=WPF+Training+Course+-+(Free)" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f18%2fwpf-training-course-free.aspx&amp;title=WPF+Training+Course+-+(Free)"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=332" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Training/default.aspx">Training</category></item><item><title>DIV over a SELECT in IE - ASP.NET Ajax Style</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/14/div-over-a-select-in-ie-asp-net-ajax-style.aspx</link><pubDate>Thu, 14 Jun 2007 17:08:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:328</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=328</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/14/div-over-a-select-in-ie-asp-net-ajax-style.aspx#comments</comments><description>&lt;p&gt;First things first I am using a technique that&amp;nbsp;I learnt from Bertrand Le Roy&amp;#39;s&amp;nbsp;blog. I take no credit for realising that if you place an IFRAME at the same place that you are putting your DIV you will be able&amp;nbsp;it will stop the SELECT&amp;nbsp;from showing.&amp;nbsp;As Bertrand points out SELECT elements are Windowed elements and it is this reason that they display through Windowless elements such as a DIV.&lt;/p&gt;
&lt;p&gt;Anyway you can check out Bertrand&amp;#39;s post for more detail &lt;a href="http://weblogs.asp.net/bleroy/archive/2005/08/09/how-to-put-a-div-over-a-select-in-ie.aspx"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The one thing I have to add is my implementation of this technique using the ASP.NET Ajax framework. Mine is slightly neater in that it is all code-based and does not assume an pre-existing IFRAME&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; doIFRAMEHack = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
        
&lt;span class="kwrd"&gt;if&lt;/span&gt; (Sys.Browser.agent === Sys.Browser.InternetExplorer &amp;amp;&amp;amp; Sys.Browser.version &amp;lt; 7){
    &lt;span class="rem"&gt;//Do IFRAME Hack to stop elements like SELECT showing through the Tooltip div&lt;/span&gt;
    doIFRAMEHack = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
}   
 
&lt;span class="rem"&gt;// tooltip happens to be the DIV that we are displaying in this sample&lt;/span&gt;
&lt;span class="kwrd"&gt;var&lt;/span&gt; bounds = Sys.UI.DomElement.getBounds(&lt;span class="kwrd"&gt;this&lt;/span&gt;.get_element());
&lt;span class="kwrd"&gt;var&lt;/span&gt; tooltip = &lt;span class="kwrd"&gt;this&lt;/span&gt;._getTooltip(&lt;span class="kwrd"&gt;true&lt;/span&gt;);

&lt;span class="kwrd"&gt;if&lt;/span&gt;(tooltip)
{
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (doIFRAMEHack){
        &lt;span class="rem"&gt;// Step1 Position IFRAME at same place as Tooltip will be&lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; hackIFRAME = $get(&lt;span class="str"&gt;&amp;quot;divOverSelectHackIFRAME&amp;quot;&lt;/span&gt;);
        
        &lt;span class="kwrd"&gt;if&lt;/span&gt;(!hackIFRAME){
            &lt;span class="rem"&gt;// The IFRAME we are using for the HACK does not exist. &lt;/span&gt;
            &lt;span class="rem"&gt;// Create it and set the necessary properties&lt;/span&gt;
            hackIFRAME = document.createElement(&lt;span class="str"&gt;&amp;quot;IFRAME&amp;quot;&lt;/span&gt;);
            hackIFRAME.src = &lt;span class="str"&gt;&amp;quot;j avascript:&amp;#39;&amp;lt;html&amp;gt;&amp;lt;/html&amp;gt;&amp;#39;;&amp;quot;&lt;/span&gt;
            hackIFRAME.scrolling = &lt;span class="str"&gt;&amp;quot;no&amp;quot;&lt;/span&gt;;
            hackIFRAME.frameBorder = 0;
            hackIFRAME.style.border = &lt;span class="str"&gt;&amp;quot;none&amp;quot;&lt;/span&gt;;
            hackIFRAME.style.display = &lt;span class="str"&gt;&amp;quot;block&amp;quot;&lt;/span&gt;;
            hackIFRAME.style.zindex = 0;
            hackIFRAME.id = &lt;span class="str"&gt;&amp;quot;divOverSelectHackIFRAME&amp;quot;&lt;/span&gt;;
            
            &lt;span class="rem"&gt;// Append it to the bottom of the body so that it laid out&lt;/span&gt;
            &lt;span class="rem"&gt;// after all the Windowed elements&lt;/span&gt;

            document.body.appendChild(hackIFRAME);
        }
        
        &lt;span class="rem"&gt;// Position the IFRAME in the same place that we are positioning the DIV&lt;/span&gt;
        &lt;span class="rem"&gt;// As Bertrand Le Roy said the IFRAME needs to be positioned BEFORE the DIV is&lt;/span&gt;
        Sys.UI.DomElement.setLocation(hackIFRAME, bounds.x, bounds.y + bounds.height);
    }
    
    tooltip.style.display = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;

    Sys.UI.DomElement.setLocation(tooltip, bounds.x, bounds.y + bounds.height);
    &lt;span class="kwrd"&gt;this&lt;/span&gt;._tooltipShown = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
    
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (doIFRAMEHack){
        &lt;span class="rem"&gt;// Step2 Now that ToolTip has some dimensions get them&lt;/span&gt;
        &lt;span class="rem"&gt;// and use them to tidy up the size of the IFRAME&lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; tooltipBounds = Sys.UI.DomElement.getBounds(tooltip);
    
        hackIFRAME.style.height = tooltipBounds.height;
        hackIFRAME.style.width = tooltipBounds.width;    
        hackIFRAME.style.display = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
    }

}
&lt;/pre&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx&amp;tags=&amp;title=DIV+over+a+SELECT+in+IE+-+ASP.NET+Ajax+Style" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx&amp;tags=&amp;title=DIV+over+a+SELECT+in+IE+-+ASP.NET+Ajax+Style"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx&amp;title=DIV+over+a+SELECT+in+IE+-+ASP.NET+Ajax+Style&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx&amp;title=DIV+over+a+SELECT+in+IE+-+ASP.NET+Ajax+Style&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx&amp;title=DIV+over+a+SELECT+in+IE+-+ASP.NET+Ajax+Style" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f14%2fdiv-over-a-select-in-ie-asp-net-ajax-style.aspx&amp;title=DIV+over+a+SELECT+in+IE+-+ASP.NET+Ajax+Style"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=328" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/ASP.Net+AJAX/default.aspx">ASP.Net AJAX</category></item><item><title>Microsoft Surface: Behind-the-Scenes Video</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/06/microsoft-surface-behind-the-scenes-video.aspx</link><pubDate>Wed, 06 Jun 2007 11:50:03 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:322</guid><dc:creator>Anonymous</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=322</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/06/microsoft-surface-behind-the-scenes-video.aspx#comments</comments><description>&lt;p&gt;&lt;a title="http://www.popularmechanics.com/technology/industry/4217348.html" href="http://www.popularmechanics.com/technology/industry/4217348.html"&gt;http://www.popularmechanics.com/technology/industry/4217348.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I realize that &lt;a href="http://www.microsoft.com/surface/"&gt;Surface&lt;/a&gt; has been done to death in the blogosphere but it was not until yesterday that I saw this excellent behind the scenes video. It isn&amp;#39;t&amp;nbsp;one of the Surface demo videos that are hosted up on &lt;a title="http://www.microsoft.com/surface/" href="http://www.microsoft.com/surface/"&gt;http://www.microsoft.com/surface/&lt;/a&gt;&amp;nbsp;so you may well not have seen it.&amp;nbsp;More importantly it gives some behind the scenes information on how the Surface devices work.&lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx&amp;tags=&amp;title=Microsoft+Surface%3a+Behind-the-Scenes+Video" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx&amp;tags=&amp;title=Microsoft+Surface%3a+Behind-the-Scenes+Video"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx&amp;title=Microsoft+Surface%3a+Behind-the-Scenes+Video&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx&amp;title=Microsoft+Surface%3a+Behind-the-Scenes+Video&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx&amp;title=Microsoft+Surface%3a+Behind-the-Scenes+Video" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f06%2fmicrosoft-surface-behind-the-scenes-video.aspx&amp;title=Microsoft+Surface%3a+Behind-the-Scenes+Video"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=322" width="1" height="1"&gt;</description></item><item><title>Creating validatable CompositeControls</title><link>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/01/creating-validatable-compositecontrols.aspx</link><pubDate>Fri, 01 Jun 2007 21:34:00 GMT</pubDate><guid isPermaLink="false">0cdfd867-77e4-483c-9e74-84c93cc8eba0:316</guid><dc:creator>Anonymous</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.charteris.com/blogs/patl-closed/rsscomments.aspx?PostID=316</wfw:commentRss><comments>http://blogs.charteris.com/blogs/patl-closed/archive/2007/06/01/creating-validatable-compositecontrols.aspx#comments</comments><description>&lt;p&gt;I have recently had to create some custom ASP.NET Validators for some CompositeControls that we wrote a couple of month&amp;#39;s back. Now I have written plenty of my own validators before so it was not long before I had a class inheriting from &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.basevalidator.aspx"&gt;BaseValidator&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;It was when I was trying to connect my new MyControlValidator to an instance of MyControl on a page that I came across an interesting problem. The control that would hold the value for validation was not my CompositeControl but the TextBox inside it. &lt;/p&gt;
&lt;p&gt;In ASP.NET validators are connected to the control they&amp;nbsp;are validating by the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa695179(VS.71).aspx"&gt;ControlToValidate&lt;/a&gt; property of the Validator. This is set to the id of the control to be validated. Among many things it is this connection that gets us an id to use for client side validation. The&amp;nbsp;ASP.NET&amp;#39;s client side validation is implemented in WebUIValidation.js, in ASP.NET 1.0 this is was physical&amp;nbsp;.js file that was installed as part of ASP.NET, in&amp;nbsp;version 2.0&amp;nbsp;this changed to&amp;nbsp;become an EmbeddedResource in System.Web.dll. The id will be used in the validating JS to retrieve the control&amp;#39;s value for validation and in the case of ASP.NET 2.0 set focus back to the control when it is invalid. &lt;/p&gt;
&lt;p&gt;I was trying to lay the foundation for future validators of&amp;nbsp;MyControl so I had to make it work. When I set the ControlToValidate to the id of MyControl the code in WebUIValidation struggled. On the client MyControl is rendered as SPAN element so that is no help. I needed to point the ControlToValidate to the id of the internal TextBox but as a consumer of MyControl I could not get at it. Most examples of Validators with CompositeControls have the Validator embedded in the control. That makes it easy to wire up the Validator but I wanted Validators that could be defined external to&amp;nbsp;MyControl&amp;nbsp;so that simple approach was not enough.&lt;/p&gt;
&lt;p&gt;The solution was two-fold, on the server I keep the ControlToValidate pointing at the CompositeControl, that makes it easier for the Validator developer, works well with the server-side validation framework and means I do not have to expose the internals of MyControl. On the client it gets fiddly, the standard JavaScript wants a control to validate that it can get a value from and&amp;nbsp;can set focus to. I decided the best approach was for MyControl to run some script on startup that changes the ControlToValidate on the client to be the id of the internal TextBox. This works well with the validation framework client side and keeps the internals of MyControl within the server and client side implementation of MyControl. This is the client side code to change the controltovalidate .&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;_setValidationTargetToActualControl : &lt;span class="kwrd"&gt;function&lt;/span&gt;(){
&lt;span class="rem"&gt;//&amp;lt;summary&amp;gt;For any attached Validators set the controltovalidate on to &lt;/span&gt;
&lt;span class="rem"&gt;be the internal TextBox&amp;lt;/summary&amp;gt;&lt;/span&gt;
    
   &lt;span class="kwrd"&gt;var&lt;/span&gt; timeInputBox_TextBox = &lt;span class="kwrd"&gt;this&lt;/span&gt;.get_element();
        
   &lt;span class="kwrd"&gt;if&lt;/span&gt; (timeInputBox_TextBox.Validators){
   &lt;span class="kwrd"&gt;for&lt;/span&gt;(&lt;span class="kwrd"&gt;var&lt;/span&gt; validatorIndex = 0;
                               validatorIndex &amp;lt; timeInputBox_TextBox.Validators.length;
                               validatorIndex++){
            
      &lt;span class="kwrd"&gt;var&lt;/span&gt; validator = timeInputBox_TextBox.Validators[validatorIndex];
                
      &lt;span class="rem"&gt;// Switch the controltovalidate to be the id of the&lt;/span&gt;
      &lt;span class="rem"&gt;// internal TextBox rather than the containing SPAN&lt;/span&gt;

      validator.controltovalidate = timeInputBox_TextBox.id;
   }
}&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;The internal TextBox of MyControl, timeInputBox_TextBox, has easy access its associated validators via the Validators property. This is populated by the standard validation javascript on load. &lt;/p&gt;
&lt;div id="SocialBookmarks"&gt;&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx&amp;tags=&amp;title=Creating+validatable+CompositeControls" mce_href="http://del.icio.us/post?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx&amp;tags=&amp;title=Creating+validatable+CompositeControls"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/delicious.gif"&gt;Del.icio.us&amp;nbsp;&lt;/a&gt;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx&amp;title=Creating+validatable+CompositeControls&amp;tags=" mce_href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx&amp;title=Creating+validatable+CompositeControls&amp;tags="&gt;&lt;img border="0" src="/Themes/leanandgreen/images/digg.gif"&gt;Digg It&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx" mce_href="http://www.facebook.com/share.php?u=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/facebook.gif"&gt;Share on Facebook&amp;nbsp;&lt;/a&gt;&lt;a href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx&amp;title=Creating+validatable+CompositeControls" mce_href="http://www.stumbleupon.com/submit?url=http%3a%2f%2fblogs.charteris.com%2fblogs%2fpatl-closed%2farchive%2f2007%2f06%2f01%2fcreating-validatable-compositecontrols.aspx&amp;title=Creating+validatable+CompositeControls"&gt;&lt;img border="0" src="/Themes/leanandgreen/images/stumble.gif"&gt;Stumble It!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.charteris.com/aggbug.aspx?PostID=316" width="1" height="1"&gt;</description><category domain="http://blogs.charteris.com/blogs/patl-closed/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>