<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3396052887976185753</id><updated>2012-02-12T21:36:56.420-08:00</updated><category term='c#'/><category term='Microsoft AJAX'/><category term='General'/><category term='WPF'/><category term='.net 3.0'/><category term='Atlas asp.net'/><title type='text'>Atlas and .net finds</title><subtitle type='html'>Mostly I'll be blogging about Atlas features and examples, but will touch upon many current .net topics and no doubt some .net 3.0 topics as it draws closer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-2449937954074169610</id><published>2007-02-22T18:39:00.000-08:00</published><updated>2007-02-22T18:40:23.321-08:00</updated><title type='text'>Uploading large files through Web Services</title><content type='html'>&lt;a href="http://www.codeproject.com/soap/MTOMWebServices.asp"&gt;http://www.codeproject.com/soap/MTOMWebServices.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-2449937954074169610?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/2449937954074169610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=2449937954074169610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/2449937954074169610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/2449937954074169610'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/uploading-large-files-through-web.html' title='Uploading large files through Web Services'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-3692273037606732218</id><published>2007-02-14T13:56:00.000-08:00</published><updated>2007-02-14T13:58:02.660-08:00</updated><title type='text'>Simple web chart example</title><content type='html'>A decent article, even if the example is in VB.Net:&lt;br /&gt;&lt;a href="http://www.sitepoint.com/article/asp-net-graphs-raise-the-bar"&gt;http://www.sitepoint.com/article/asp-net-graphs-raise-the-bar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-3692273037606732218?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/3692273037606732218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=3692273037606732218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/3692273037606732218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/3692273037606732218'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/simple-web-chart-example.html' title='Simple web chart example'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-4535904674410937241</id><published>2007-02-13T20:27:00.000-08:00</published><updated>2007-02-13T20:28:46.413-08:00</updated><title type='text'>Javascript in Asp.Net 2 examples</title><content type='html'>Good starting point for comparing Asp.Net 1.1 and 2.0 when writing javascript:&lt;br /&gt;&lt;a href="http://dotnetslackers.com/articles/aspnet/JavaScript_with_ASP_NET_2_0_Pages_Part1.aspx"&gt;http://dotnetslackers.com/articles/aspnet/JavaScript_with_ASP_NET_2_0_Pages_Part1.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-4535904674410937241?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/4535904674410937241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=4535904674410937241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/4535904674410937241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/4535904674410937241'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/javascript-in-aspnet-2-examples.html' title='Javascript in Asp.Net 2 examples'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-1847824741657492542</id><published>2007-02-12T18:50:00.000-08:00</published><updated>2007-02-08T14:05:14.624-08:00</updated><title type='text'>General .net code samples</title><content type='html'>There are some nice samples of different tasks us .net programmers come across time to time at Mike Woodring's personal samples dump &lt;a href="http://www.bearcanyon.com/dotnet/"&gt;area&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-1847824741657492542?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/1847824741657492542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=1847824741657492542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1847824741657492542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1847824741657492542'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/general-net-code-samples.html' title='General .net code samples'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-3564577250113997672</id><published>2007-02-08T03:28:00.000-08:00</published><updated>2007-02-04T14:45:52.622-08:00</updated><title type='text'>Office 2007 and RSS feeds</title><content type='html'>RSS is definitely the key to up to date info about software releases like WPF/E or AJAX.  But with RSS feeds comes one simple problem... how to get them all in a decent manner.&lt;br /&gt;&lt;br /&gt;My basic issue with RSS readers I've tried is that RSS feeds are spread apart as much as possible.  By this I mean to read blogs, you generally have to click on an object for each blogger to read their new blog for the day, then onto the next blog that's been updated today.  It can take a few clicks to read the latest blogs.&lt;br /&gt;&lt;br /&gt;My goal was to always have one central feed, or perhaps 3 or 4.  Maybe like Programming, News, Sports, Fun.  So every programming blog I subscribe to goes into one folder.  So when I log in that morning I have simply have 5 unread Programming blogs. &lt;br /&gt;&lt;br /&gt;So think about email with Outlook.  You can sort by sender, date, subject, conversation (great for newsgroups BTW) and where you want you can send certain emails to other folders to keep them out of the "main stream".  You log in that morning and X emails await you, which is great.  So when I heard Office 2007 would support RSS, I figured this would be very similar and allow such flexibility.  I was wrong... kind of.&lt;br /&gt;&lt;br /&gt;By default Office 2007 adds each feed to a new folder, and doesn't make it obvious there is an alternative, which I find frustrating.  Once added, each folder is completely separate and can't be merged into one giant feed.  However in each folder, you still have all the ordering features, but what's the point when it's all one blog.&lt;br /&gt;&lt;br /&gt;So this is how I've setup my RSS in Outlook 2007.  It's the long way but worth it in the end I think, solving the problem I had.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Right Click on RSS Feeds and choose "Add a New RSS Feed"&lt;/li&gt;&lt;li&gt;Enter the URL for the RSS Feed (usually found by clicking the orange antennae symbol and copying the URL it takes you too)&lt;/li&gt;&lt;li&gt;Click Add, and when the next dialog appears click Advanced.&lt;/li&gt;&lt;li&gt;Click Change Folder &lt;/li&gt;&lt;li&gt;While RSS Feeds is highlighted click New Folder and type a general name for you feed like Programming&lt;/li&gt;&lt;li&gt;Highlight Programming and press OK&lt;/li&gt;&lt;li&gt;Also notice the Downloads section has a "Download the full article as .html..."  I click that as some really good posts include images which make things worthwhile.&lt;/li&gt;&lt;li&gt;Press OK and then Yes to finish it off, and you have your feed going to a Programming folder.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;There is absolutely nothing stopping you adding more feeds to this folder, with the added benefits, that if you check your feeds folder today, the Programming folder will contain all useful programming feeds for today, in full html format and you don't need an external program to achieve this.  And all in your new install of Office 2007, which I know for me, adds a nice reason to upgrade.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-3564577250113997672?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/3564577250113997672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=3564577250113997672' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/3564577250113997672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/3564577250113997672'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/office-2007-and-rss-feeds.html' title='Office 2007 and RSS feeds'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-8520006553751979850</id><published>2007-02-04T14:42:00.000-08:00</published><updated>2007-02-04T14:45:52.922-08:00</updated><title type='text'>Good .net code links</title><content type='html'>Always nice to have somewhere to look when trying to work out how to acheive a new task in .net.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/"&gt;http://www.codeplex.com/ &lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.gotcodesnippets.net/"&gt;http://www.gotcodesnippets.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gotdotnet.com/"&gt;http://www.gotdotnet.com/&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-8520006553751979850?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/8520006553751979850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=8520006553751979850' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/8520006553751979850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/8520006553751979850'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/good-net-code-links.html' title='Good .net code links'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-6328367320604656060</id><published>2007-02-01T02:21:00.000-08:00</published><updated>2007-02-01T03:28:29.780-08:00</updated><title type='text'>wpf/e in the real world</title><content type='html'>I have to get something off my chest.  I've been having a play with wpf/e.  In short that is the Microsoft codename to a technology that allows programmers to bring some of the great benefits of the new .net 3.0 GUI WPF to browsers near you including Firefox browsers and Macintosh computers. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The real beauty is the language behind wpf/e is XAML, which is a large improvement from standard winforms or HTML programming, and in fact takes some of the best parts of each.&lt;br /&gt;&lt;br /&gt;As an example, winforms is pretty lacking when it comes to anything 3D.  WPF, and even wpf/e gives an easy way to make a control seem like it's been moved elsewhere in 3D by using transformations.  But even better like HTML which allows you to store GUI objects in GUI objects a lot easier than winforms, you can do that transform to the top level GUI object and the inner objects all do the transform too.  This is the case with events too.  You can add click events which cascade down the child objects, which is not possible in winforms.&lt;br /&gt;&lt;br /&gt;So this is all good, but considering this is avialable for many browsers and OS's it's even better.  From what I've played with you can do some real magic in a browser using wpf/e which brings us much closer to the browser nirvana.  That is where web forms are a better solution to a solid windows app.  I'd hope to get all happy and optimistic here, but the cons are yet to come.&lt;br /&gt;&lt;br /&gt;I'm not an expert on the subject but some of the above is just the beginning, as the project is still evolving and I haven't dug nearly deep enough just yet. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;OK, there had to be a downside to such a nice multi platform graphics platform.&lt;br /&gt;&lt;br /&gt;wpf/e is as mentioned a cut down version of WPF.  And I love some of the features they have squeezed in but, there is a massive issue here... javascript.  It is the backend language for wpf/e, which has me deeply concerned.  Forgetting those poor folk who run their browsers without javascript of course (as most others have already since AJAX appeared on the scene), javascript programming is just not fun or easy.  We started asp.net sites without really needing javascript,  and now with Microsoft AJAX and wpf/e they want us to have half our code in javascript. &lt;br /&gt;&lt;br /&gt;In some way I can forgive the above as javascript at least is fairly common.  My biggest concern is lack of databinding.  In such a modern language, Microsoft knows that data is a central point, but have opted to not support data at all, a very strange move.  Are they worried that such a comprehensive browser plugin would eliminate the need for windows?  Because as it is, to bind any data to any wpf/e control needs:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;javascript&lt;/li&gt;&lt;li&gt;AJAX&lt;/li&gt;&lt;li&gt;Web services (technically not needed but easier)&lt;/li&gt;&lt;li&gt;more javascript to get the AJAX data returned&lt;/li&gt;&lt;li&gt;some method of filling the data a the wpf/e data template&lt;/li&gt;&lt;li&gt;some more javascript to put the templates into a grid like structure&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The above isn't friendly enough for most, and in fact brings me to think they simply trying to match Flash with this version.&lt;/p&gt;&lt;p&gt;OK, I finally mentioned it, yes Flash.  Personally, I'm not a big fan of Flash at all, but it is pretty hard to avoid.  The good Flash programmers improve your experience on the web, others, not so much.  The percentage of sites that are improved are fairly low by the way.  Now that I bring Flash into the equation, a quick comparison needs to be made:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I'm not going to say wpf/e is better graphically, as I've seen some pretty impressive Flash pages over time.  But I will say it seems to be at least match.&lt;/li&gt;&lt;li&gt;Users aren't always happy to install a plugin to get a page to work, especially after installing Flash after weeks/months/years of websites using it.  The only thing in MS's favour is it's MS, which most people would at least trust.&lt;/li&gt;&lt;li&gt;Where MS could have moved forward in leaps and bounds would have been a solid DB backend, but it didn't happen.  With this programmers would have/will flock to wpf/e in droves.  Even hooking up to a web service without javascript code would be a good start if it's possible&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;OK, so that's about my rant for now.  Personally, I'm in no hurry to program for wpf/e (or Flash) especially when Microsoft AJAX brings forward so much more than what asp.net did but with all the high quality DB support that asp.net has, and of course works anywhere without plugins.  &lt;/p&gt;&lt;p&gt;All I can hope is wpf/e improves enough to keep MS interested, as it has plenty of potential if given time to evolve.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-6328367320604656060?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/6328367320604656060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=6328367320604656060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/6328367320604656060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/6328367320604656060'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/02/wpfe-in-real-world.html' title='wpf/e in the real world'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-8968351459054910885</id><published>2007-01-24T19:12:00.000-08:00</published><updated>2007-01-24T19:13:42.343-08:00</updated><title type='text'>The Perfect Service</title><content type='html'>Some good tips when looking at writing a service:&lt;br /&gt;&lt;a href="http://www.15seconds.com/issue/040624.htm"&gt;http://www.15seconds.com/issue/040624.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-8968351459054910885?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/8968351459054910885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=8968351459054910885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/8968351459054910885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/8968351459054910885'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/01/perfect-service.html' title='The Perfect Service'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-1390358479471502034</id><published>2007-01-24T13:32:00.000-08:00</published><updated>2007-01-24T13:33:16.456-08:00</updated><title type='text'>Keeping scroll position</title><content type='html'>Check this out later:&lt;br /&gt;&lt;a href="http://aspalliance.com/356"&gt;http://aspalliance.com/356&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-1390358479471502034?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/1390358479471502034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=1390358479471502034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1390358479471502034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1390358479471502034'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/01/keeping-scroll-position.html' title='Keeping scroll position'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-460703858431607936</id><published>2007-01-14T21:42:00.000-08:00</published><updated>2007-01-14T21:43:34.428-08:00</updated><title type='text'>Google Checkout example for .net</title><content type='html'>Very cool example of how to use the Google Checkout with .net sample code:&lt;br /&gt;&lt;a href="http://www.windowsdevcenter.com/pub/a/windows/2007/01/09/build-a-net-app-for-google-checkout.html?CMP=OTC-U49S05779020&amp;ATT=Build+a+NET+App+for+Google+Checkout"&gt;http://www.windowsdevcenter.com/pub/a/windows/2007/01/09/build-a-net-app-for-google-checkout.html?CMP=OTC-U49S05779020&amp;amp;ATT=Build+a+NET+App+for+Google+Checkout&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-460703858431607936?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/460703858431607936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=460703858431607936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/460703858431607936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/460703858431607936'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/01/google-checkout-example-for-net.html' title='Google Checkout example for .net'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-1586753830839971954</id><published>2007-01-11T14:24:00.000-08:00</published><updated>2007-01-11T14:26:22.923-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net 3.0'/><title type='text'>Reading and writing Excel in .net 3.0</title><content type='html'>Excellent article on how to work with excel files in .net 3.0:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/useritems/ExcelPackage.asp"&gt;http://www.codeproject.com/useritems/ExcelPackage.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-1586753830839971954?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/1586753830839971954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=1586753830839971954' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1586753830839971954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1586753830839971954'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2007/01/reading-and-writing-excel-in-net-30.html' title='Reading and writing Excel in .net 3.0'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-3844159945048750121</id><published>2006-11-08T13:20:00.000-08:00</published><updated>2006-11-08T13:59:14.980-08:00</updated><title type='text'>Vista is RTM and pricing.</title><content type='html'>It's of no surprise to most that the full version of Vista is complete on November 8, because that date has been pretty firmly set for a while.  That leaves the November 30 release for business customers and January 30 for retail looking pretty solid.  After using RC1 I figured the date sounded very reasonable a month or so ago.&lt;br /&gt;&lt;br /&gt;&lt;a&gt;http://windowsvistablog.com/blogs/windowsvista/archive/2006/11/08/windows-vista-releases-to-manufacturing.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While plenty of work has been going on in Microsoft, a lot of discussion has been happening outside discussing the features, version comparisons and pricing of Vista.&lt;br /&gt;&lt;br /&gt;My current reasons why I would upgrade to Vista from XP include:&lt;br /&gt;IIS7&lt;br /&gt;Improved Media Centre&lt;br /&gt;Nice built in search&lt;br /&gt;Easier to find and open any programs&lt;br /&gt;Built in .net 3.0, IE7, Media Player 11, DVD movie maker&lt;br /&gt;Excellent backup restore options&lt;br /&gt;Repartioning tool&lt;br /&gt;Use USB key to speed up computer (at $Au27 for 1GB very cheap speed increase)&lt;br /&gt;&lt;br /&gt;And why I wouldn't:&lt;br /&gt;Home Premium doesn't have remote desktop or IIS, which means it's a downgrade from XP media centre&lt;br /&gt;Too many annoying popups when doing daily tasks&lt;br /&gt;May still not be stable enough compared to XP&lt;br /&gt;Price, in Australia at least&lt;br /&gt;&lt;br /&gt;So what do I mean by price in Australia?  Take a quick look at two upgrade options I have and compare US prices to Australian prices:&lt;br /&gt;Home Premium Upgrade&lt;br /&gt;$US in US = $159&lt;br /&gt;$US in Au = $230&lt;br /&gt;&lt;br /&gt;Ultimate Upgrade&lt;br /&gt;$US in US = $259&lt;br /&gt;$US in Au = $380&lt;br /&gt;&lt;br /&gt;That's RRP, so it's likely big US chains will come out even cheaper (as should a few Australian stores to).  But have a look at the gap between Ultimate upgrade prices in Australia and the US.  Rediculous!&lt;br /&gt;&lt;br /&gt;I'm certainly going to heavily investigate my options of getting a copy in the US, even though I know it will be locked down pretty tight.&lt;br /&gt;&lt;br /&gt;That said I'm willing to upgrade and hoping to get Ultimate given the few extra features that I will use.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/11/vista-is-rtm-and-pricing.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/11/vista-is-rtm-and-pricing.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-3844159945048750121?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/3844159945048750121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=3844159945048750121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/3844159945048750121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/3844159945048750121'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/11/vista-is-rtm-and-pricing.html' title='Vista is RTM and pricing.'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-2222153146703045399</id><published>2006-11-06T20:24:00.000-08:00</published><updated>2006-11-08T15:00:30.873-08:00</updated><title type='text'>.net 3.0 official release</title><content type='html'>With Vista literally on our doorstep, the .net 3.0 framework has been officially released.&lt;br /&gt;&lt;br /&gt;Check out all the usual downloads for the official version here:&lt;br /&gt;&lt;a&gt;http://www.netfx3.com/blogs/news_and_announcements/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And of course don't forget the Virtual labs to help you get up and running:&lt;br /&gt;&lt;a&gt;http://labs.netfx3.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;UPDATED:&lt;br /&gt;Here is the whole list of links including the Office 2007 downloads for Visual Studio and AJAX for asp.net:&lt;br /&gt;&lt;a&gt;http://msdn.microsoft.com/vstudio/devsolutions/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And since it's supported on XP and every version of Vista, I'm looking forward to getting stuck into WPF especially over the next few months now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-2222153146703045399?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/2222153146703045399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=2222153146703045399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/2222153146703045399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/2222153146703045399'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/11/net-30-official-release.html' title='.net 3.0 official release'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-559497399705881348</id><published>2006-11-02T13:55:00.000-08:00</published><updated>2006-11-08T14:00:26.798-08:00</updated><title type='text'>Vista retail licensing.  Microsoft backs down.</title><content type='html'>This is slightly off topic, and no doubt not really programming related, more programmer related.&lt;br /&gt;&lt;br /&gt;Vista retail licensing has been a well discussed topic over the last few weeks.  In short for someone like me it went like this:&lt;br /&gt;As long as I only upgrade my machine hardware once in the years that I want to use Vista as my OS, I'm fine.  Once I upgrade a 2nd time though I need to buy a new version of Vista.  To me this is scarey, and means I'd really want to make sure the next hardware upgrade would be a good one, as I'm not that happy with outlaying hundreds of dollars after only owning Vista for a couple of years.&lt;br /&gt;&lt;br /&gt;BUT NOT ANY MORE!!!!!&lt;br /&gt;&lt;br /&gt;Microsoft have officially backed down and will now allow a single user to upgrade their hardware as much as they like.  For me that takes the expected usage from 2-3 years, to whenever a better OS worth buying comes out, as I'm more than happy with my core hardware like the case, and will most likely just upgrade components as mine get out of date.&lt;br /&gt;&lt;br /&gt;Take a look at the official blog about this:&lt;br /&gt;&lt;a&gt;http://windowsvistablog.com/blogs/windowsvista/archive/2006/11/02/news-revision-to-windows-vista-retail-licensing-terms.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Very good news from Microsoft, thanks for listening to the 5-10% of people who would actually care about this change of licensing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-559497399705881348?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/559497399705881348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=559497399705881348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/559497399705881348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/559497399705881348'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/11/vista-retail-licensing-microsoft-backs.html' title='Vista retail licensing.  Microsoft backs down.'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-5630954932161013203</id><published>2006-09-25T02:43:00.000-07:00</published><updated>2006-09-25T06:01:27.412-07:00</updated><title type='text'>WPF for beginners: Hello world</title><content type='html'>I've decided to start a WPF blog by diving into a working app, that shows off a few features.  It couldn't be a WPF Hello World without a few fancy features, so the app shows off a couple of the new styles and animations. In itself it's amazing functionality without 3rd party products, but is all the more impressive when you learn there is no code behind at all.  And this is the tip of the iceberg.  WPF XAML has a lot of depth, and prove once again that Microsoft is giving programmers the tools they need, and it's up to us to make the most of those tools now.  In a way, it would have been ideal if XAML was the first windows forms platform for .net, as there will be few doubters once you give the XAML a go.&lt;br /&gt;&lt;br /&gt;Getting started:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;In Visual Studio 2005 goto File -&gt; New -&gt; Project from the main menu&lt;/li&gt;&lt;li&gt;Select Project Type "NET Framework 3.0"&lt;/li&gt;&lt;li&gt;Choose "Windows Application (WPF)" (note that XAML Browser Application would be near identical code, except will run in a browser)&lt;/li&gt;&lt;li&gt;Change the name and location if needed and press OK.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;XAML&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;XAML is the new forms designer technology for WPF.  I'm not going to go into detail about XAML, but there are some cool features you'll see in these examples.  Firstly, controls have become infinitely more flexible than Winforms.  Take for example a Button.  Like Winforms you have basic properties like Background and Foreground colors, and can simply put some text in between the tags and have a button.  Add a Click event and off you go ... BUT XAML allows you to take that text away and put a Panel in the Button tags.  And in that panel, you can put other controls.  If you want your button to have 3 images side by side, with text going diagonally across the images, you can.  Not only for buttons, most controls allow this feature.  The "content" area of a button or other controls only allow one child, but once that child is a panel, you suddenly open up a whole new world.&lt;/p&gt;&lt;p&gt;Another cool feature is the Properties design.  Within your Button tag, you can simply put a Background="White" to set the Background property, much like Winforms.  But again, you can open this up, but adding a tag after the Button tag, like &amp;lt;Button.Background&gt;.  Inside those tags, you suddenly have a lot of freedom again, and can add images, gradients, etc.  Other Properties can do other sorts of things too, and in many cases I've found it beneficial adding these tags outside the main tag, as flexibility follows.&lt;/p&gt;&lt;p&gt;Also remember that XAML has inheritence built in nicely.  Controls can inherit properties from the parent controls, which is handy for databinding etc.  Styles also can inherit from other styles, which makes building a consistant but complicated GUI relatively easy.  And again with animations, like scaling a control to be bigger, child object simply scale with it, and even other animations will apply over that new size.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Very widely used, we can store styles in a Resource section, in this case &amp;lt;Window.Resources&gt;, which would most likely come straight after the root Window tag.  In XAML, these resources can be referenced by calling StaticResource and using the x:Key name.  So if we have a Style in the Windows.Resources section, we need to give it a key like &amp;lt;Style Key="StandardButtonStyle"&gt;.  To use this style &amp;lt;Button Style="{StaticResource StandardButtonStyle}"&gt;.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Style&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;A lot of power comes from our style objects.  You can take these as far as you want to really.  Like CSS stylesheets for HTML we can setup standard looks for our controls, setup styles to target specific control types (ie. all buttons on a form), inherit from other styles and even triggers styles and animations from events and properties of the control.  What was formerly not possible, or at least very tricky with lots of code, can now take only a few lines of XAML and effect many controls.&lt;/p&gt;&lt;p&gt;As mentioned earlier a Style must have an x:Key so that other controls can find it using StaticResource.  Also mentioned we can inherit from another style using BasedOn="{StaticResource EarlierStyle}".  This allows you to build styles from a basic look adding extra functionality as you go up.  A style can also target a type of items like this TargetType="x:Type Button".  Note that if you target a type, you can't inherit from a style that targeted another type, so take care in building your styles up properly.&lt;/p&gt;&lt;p&gt;Setters give you the most basic functionality in a style.  &amp;lt;Setter Property="Background" value="Red"&gt; will cause any control that uses that style and doesn't override Background to have a Red background.  By splitting Value out into another tag you can also get more advanced behaviour &amp;lt;Setter Property="Background"&gt; &amp;lt;Setter.Value&gt; &amp;lt;LinearGradientBrush&gt;&lt;p&gt;Triggers allow you to change the look, or add animations when properties are certain values or events are triggered.  By allowing us to do a lot more visual work in the XAML, we are getting closer to the true separation of GUI and code behind.  In Winforms we have a lot of code behind to keep the application looking right, but with XAML it's more than likely possible to keep most of that code in nice clean XAML.  &lt;/p&gt;&lt;p&gt;To perform an animation based on an event like Loaded or Click &amp;lt;Style.Triggers&gt; &amp;lt;EventTrigger RoutedEvent="Click"&gt; &amp;lt;EventTrigger.Actions&gt; &amp;lt;BeginStoryboard&gt; &amp;lt;Storyboard&gt; &amp;lt;ColorAnimation&gt;&lt;p&gt;To have a Trigger based on a property choose &amp;lt;Trigger Property="Control.IsMouseOver" Value="true"&gt;  &amp;lt;Setter Property="Background" Value="Red"&gt; &amp;lt;Trigger.EnterActions&gt;... &amp;lt;Trigger.ExitActions&gt;.  In this case when the property IsMouseOver is true, we can change the background to Red, and when it's false, it will use the default style.  Also by adding tags EnterActions and ExitActions we can start animations when the property becomes true and when it becomes false.  &lt;/p&gt;&lt;p&gt;Very cool.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Effects&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I have only touched upon effects in this example, but like styles, effects are available and work the same for most controls.  The beauty of WPF is you learn how to use an effect, then you can use that effect on buttons, panels, textbox's etc, as effects are applicable to the UIElement on which all those controls are based upon.  Many effects add to the GUI feature set, such as a blur effect, glow, drop shadow, bevel, emboss.  These can also be animated, as shown in this example.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Animation&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In XAML, we again have struck gold with animations that can be done without writing a line of code behind or using timers.  WPF uses it's internal timeline to get property values from one value to another.  And once again, proeperty is fairly vague allowing us to simply make a control disappear by setting it's Opacity from 1 to 0, or it can be setting complex transformations of the control, parallel to other property changes.&lt;/p&gt;&lt;p&gt;To setup an animation we use the Storyboard seen earlier &amp;lt;BeginStoryboard&gt; &amp;lt;Storyboard&gt; &amp;lt;DoubleAnimation TargetName="CloseButton" TargetProperty="Opacity" From="1" to="0" duration="0:0:0.5" autoreverse="false"&gt; ...  In this case DoubleAnimation indicates From and To must be a Double, which could be basically &amp;lt;Type&gt;Animation where Type could be Int32, Byte, Color etc.  From and To are start and end values, Duration is a time (0.5 seconds here) and AutoReverse indicates once it's finished the animation will happen in the other direction.  Also set RepeatBehavior="Forever" if you want this animation to continue.  By adding a tag under &amp;lt;Storyboard&gt; for &amp;lt;ParellelTimeline&gt;, we can run several animations at once, so we can make the Border and Foreground change color at the same time.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Transform&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The last feature I've added to this sample shows a simple ScaleTransform when a button is clicked.  We can rotate, skew or scale using &amp;lt;Button.RenderTransform&gt; after the Button tag, and make it dead easy to give our app a 3D feel.  &lt;/p&gt;&lt;p&gt;If you want more than one Transform, your next tag should be &amp;lt;TransformGroup&gt; otherwise add the Transformation tag &amp;lt;ScaleTransform ScaleX="1" ScaleY="1.5"&gt;, which in this case stretches the height of the control and all children.  You can again animate this by using &amp;lt;DoubleAnimation TargetProperty="RenderTransform.ScaleX" From="1" To="-1"&gt;, which will take the width from normal to nothing, to normal but with the control backwards.  &lt;/p&gt;&lt;p&gt;Note that the control you are animating must have a ScaleTransform tag for this to work.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There is more detail within this example, but I'm hoping this is easily enough to get your feet wet and start thinking about what is possible with XAML.  Enjoy:&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window&lt;/span&gt; &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="HelloWorld.Window1"&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;="Hello World"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="500"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="500"&lt;/span&gt; &lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window.Resources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- General style --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="GrayGradientStyle"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Control.Background"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="rem"&gt;&amp;lt;!-- Set a standard gray vertical gradient style, which will be inherited --&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter.Value&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;LinearGradientBrush&lt;/span&gt; &lt;span class="attr"&gt;StartPoint&lt;/span&gt;&lt;span class="kwrd"&gt;="0,0"&lt;/span&gt; &lt;span class="attr"&gt;EndPoint&lt;/span&gt;&lt;span class="kwrd"&gt;="0,1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;="LightGray"&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;="DarkGray"&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;="0.7"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;="Silver"&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;LinearGradientBrush&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Setter.Value&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Glow effect used by next style --&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;OuterGlowBitmapEffect&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="OuterGlow"&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="OuterGlow"&lt;/span&gt; &lt;span class="attr"&gt;GlowColor&lt;/span&gt;&lt;span class="kwrd"&gt;="Yellow"&lt;/span&gt; &lt;span class="attr"&gt;GlowSize&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Style to apply for all buttons, inherits GrayGradientStyle --&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Type Button}"&lt;/span&gt; &lt;span class="attr"&gt;BasedOn&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource GrayGradientStyle}"&lt;/span&gt; &lt;span class="attr"&gt;TargetType&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Type Button}"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Opacity"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Margin"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Width"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="BitmapEffect"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource OuterGlow}"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Style.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Trigger&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Button.IsMouseOver"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Foreground"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="Red"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="rem"&gt;&amp;lt;!-- When IsMouseOver is set to true, set the button to full Opacity and show a Yellow glow around the button --&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Trigger.EnterActions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ParallelTimeline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt; &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5"&lt;/span&gt; &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="0:0:00.5"&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="Opacity"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="BitmapEffect.GlowSize"&lt;/span&gt; &lt;span class="attr"&gt;AutoReverse&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt; &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="15"&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="0:0:0.5"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ParallelTimeline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Trigger.EnterActions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="rem"&gt;&amp;lt;!-- When IsMouseOver is set back to false, set the button Opacity back to half --&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Trigger.ExitActions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt; &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5"&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="0:0:01"&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="Opacity"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Trigger.ExitActions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Trigger&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Style.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Style to apply for the window --&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="WindowBackground"&lt;/span&gt; &lt;span class="attr"&gt;TargetType&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Type Window}"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Style.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="rem"&gt;&amp;lt;!-- After the form is loaded continually cycle the background colors back and forth between these colors --&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EventTrigger&lt;/span&gt; &lt;span class="attr"&gt;RoutedEvent&lt;/span&gt;&lt;span class="kwrd"&gt;="Window.Loaded"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EventTrigger.Actions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt; &lt;span class="attr"&gt;RepeatBehavior&lt;/span&gt;&lt;span class="kwrd"&gt;="Forever"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ColorAnimation&lt;/span&gt; &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="LightBlue"&lt;/span&gt; &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="LightCoral"&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="Background.Color"&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="0:0:10"&lt;/span&gt; &lt;span class="attr"&gt;Timeline&lt;/span&gt;.&lt;span class="attr"&gt;DesiredFrameRate&lt;/span&gt;&lt;span class="kwrd"&gt;="10"&lt;/span&gt; &lt;span class="attr"&gt;AutoReverse&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EventTrigger.Actions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EventTrigger&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Style.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Window.Resources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span class="rem"&gt;&amp;lt;!-- Set the style to the above WindowBackground --&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window.Style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StaticResource&lt;/span&gt; &lt;span class="attr"&gt;ResourceKey&lt;/span&gt;&lt;span class="kwrd"&gt;="WindowBackground"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StaticResource&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Window.Style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Main controls --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="rem"&gt;&amp;lt;!-- Hello World Click Me button (automatically picks up Button style) --&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Click Me&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="rem"&gt;&amp;lt;!-- When the button is clicked transform the scale of the Hello World border and turn it's opacity to full and back --&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EventTrigger&lt;/span&gt; &lt;span class="attr"&gt;RoutedEvent&lt;/span&gt;&lt;span class="kwrd"&gt;="Button.Click"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EventTrigger.Actions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ParallelTimeline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;="HelloBorder"&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="RenderTransform.ScaleX"&lt;/span&gt; &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="0:0:5"&lt;/span&gt; &lt;span class="attr"&gt;AutoReverse&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimation&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;="HelloBorder"&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="Opacity"&lt;/span&gt; &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="0:0:5"&lt;/span&gt; &lt;span class="attr"&gt;AutoReverse&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;                    &lt;br /&gt;                                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ParallelTimeline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;BeginStoryboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EventTrigger.Actions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EventTrigger&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Button.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="rem"&gt;&amp;lt;!-- Hello World box --&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Border&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="400"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="300"&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="HelloBorder"&lt;/span&gt; &lt;span class="attr"&gt;BorderBrush&lt;/span&gt;&lt;span class="kwrd"&gt;="Black"&lt;/span&gt; &lt;span class="attr"&gt;BorderThickness&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt; &lt;span class="attr"&gt;Opacity&lt;/span&gt;&lt;span class="kwrd"&gt;="0.3"&lt;/span&gt; &lt;span class="attr"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource GrayGradientStyle}"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Border.RenderTransform&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="rem"&gt;&amp;lt;!-- Will mean Border is invisible due to ScaleX being 0 --&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ScaleTransform&lt;/span&gt; &lt;span class="attr"&gt;ScaleX&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;ScaleY&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;CenterX&lt;/span&gt;&lt;span class="kwrd"&gt;="200"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Border.RenderTransform&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="400"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="300"&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="HelloText"&lt;/span&gt; &lt;span class="attr"&gt;TextWrapping&lt;/span&gt;&lt;span class="kwrd"&gt;="Wrap"&lt;/span&gt; &lt;span class="attr"&gt;FontSize&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt; &lt;span class="attr"&gt;TextAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock.Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="rem"&gt;&amp;lt;!-- Set a nice radial gradient for the Hello World text --&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RadialGradientBrush&lt;/span&gt; &lt;span class="attr"&gt;GradientOrigin&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5,0.5"&lt;/span&gt; &lt;span class="attr"&gt;Center&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5,0.5"&lt;/span&gt; &lt;span class="attr"&gt;RadiusX&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;RadiusY&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;="Yellow"&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;="0.2"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;="Orange"&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;="Red"&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;RadialGradientBrush&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TextBlock.Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Hello World&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;            &lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Border&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Window&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/09/wpf-for-beginners-hello-world.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/09/wpf-for-beginners-hello-world.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-5630954932161013203?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/5630954932161013203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=5630954932161013203' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/5630954932161013203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/5630954932161013203'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/09/wpf-for-beginners-hello-world.html' title='WPF for beginners: Hello world'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-7700688195884524181</id><published>2006-09-18T15:41:00.000-07:00</published><updated>2006-09-18T15:43:09.378-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><title type='text'>Getting started on WPF and .net 3.0 RC1</title><content type='html'>I've downloaded Vista RC1 over the weekend and decided that Vista is getting very close, so it's definitely time to get cranking with .net 3.0. At this point in time information is scattered, confusing and light on, so I'll be hoping to help share my investigations with others out there. It seems like it's going to be a learning curve, but hopefully at the end it's worthwhile.&lt;br /&gt;&lt;br /&gt;But for the moment, at RC1, it's probably still a little too risky to fully convert an important machine to Vista, so I'd suggest you get hold of a test machine. Below is some of the software you can use to get you up and running on a test PC, before the .net 3.0 and Vista become official versions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Vista RC1&lt;/strong&gt;&lt;br /&gt;I'm very impressed with Vista RC1. It's clearly a "pretty" OS, up there with the latest Mac OS (which I've reluctantly used a bit) and any screenshots I've seen of the fancier Linux OS's. It's features are growing on me, but as a sceptic I'd still say for the vast majority of users there are mild improvements apart from visual ones. With tools like Media Center, DVD authoring, automatic mobile device recognition (eg my PDA) and calender built into the OS, it does avoid a bit of the countless software installs we are used to with a fresh OS, so there is something to be gained from getting Vista.&lt;br /&gt;&lt;br /&gt;Go get it now here: &lt;a href="http://www.microsoft.com/windowsvista/getready/preview.mspx"&gt;http://www.microsoft.com/windowsvista/getready/preview.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Windows Server 2003&lt;/strong&gt;&lt;br /&gt;Of course if you aren't willing to be a guinea pig for Microsoft, but still want a fresh, legal version of XP for a test machine to try out .net 3.0, Micrsoft is giving out a 6 month trial of Windows server 2003. The beauty of this is you get 6 months uninterupted development on a machine, without Vista complaining that the shipped version is out. You also get a stable fast OS that will run all the .net 3.0 goodness. Not a bad option for a test PC.&lt;br /&gt;&lt;br /&gt;Windows Server 2003 180 day trial: &lt;a href="http://www.microsoft.com/windowsserver2003/evaluation/trial/default.mspx"&gt;http://www.microsoft.com/windowsserver2003/evaluation/trial/default.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Visual Studio trial&lt;/strong&gt;&lt;br /&gt;Microsoft have of course outdone themselves with the Express editions of Visual Studio. And I'm sure these will include Visual WPF tools later on, but for now WPF programming is best done in Visual Studio from what I've been told.&lt;br /&gt;&lt;br /&gt;Again if you don't have this already, Microsoft has 180 day trial for you:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/vstudio/products/trial/"&gt;http://msdn.microsoft.com/vstudio/products/trial/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Windows .net 3.0 SDK:&lt;/strong&gt;&lt;br /&gt;A must for developing applications in .net 3.0 is the SDK itself:&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=117ECFD3-98AD-4D67-87D2-E95A8407FA86&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=117ECFD3-98AD-4D67-87D2-E95A8407FA86&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Visual Studio Extensions&lt;/strong&gt;&lt;br /&gt;The extensions for Visual Studio setup all the test projects, so rather than starting with empty projects you can start a new WPF project, which makes life that little bit easier.&lt;br /&gt;&lt;br /&gt;The .net 3.0 Visual Studio extensions (RC1):&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=935AABF9-D1D0-4FC9-B443-877D8EA6EAB8&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=935AABF9-D1D0-4FC9-B443-877D8EA6EAB8&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WPF&lt;/strong&gt;&lt;br /&gt;I'm more than interested in WPF than the rest of .net 3.0 at the moment, so here are a couple of tasters that I will be reading over the next few days/weeks also. I'm sure there is way more out there, but for now there is more than enough to get you started. I will be putting my own articles on this blog also, to hopefully go through some of the features in a simplified way.&lt;br /&gt;&lt;br /&gt;Here is a nice article with an overview to what WPF is all about. There is no real detail, but it does help to get your head around what XAML will look like, and what WPF can do for you:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/windowsvista/reference/default.aspx?pull=/library/en-us/dnlong/html/introducingwpf.asp"&gt;http://msdn.microsoft.com/windowsvista/reference/default.aspx?pull=/library/en-us/dnlong/html/introducingwpf.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This site gives a good all round look at WPF, with plenty of code samples and tutorials to get you started (click on Download Code... for the files and tutorials):&lt;br /&gt;&lt;a href="http://wpf.netfx3.com/"&gt;http://wpf.netfx3.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Of course all the other .net 3.0 technologies are here too:&lt;br /&gt;&lt;a href="http://www.netfx3.com/default.aspx"&gt;http://www.netfx3.com/default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And one more link to the mother of information about WPF:&lt;br /&gt;&lt;a href="http://windowssdk.msdn.microsoft.com/en-us/library/ms754130.aspx"&gt;http://windowssdk.msdn.microsoft.com/en-us/library/ms754130.aspx&lt;/a&gt;&lt;br /&gt;which can be found in your Windows SDK (hopefully this works on other machines):&lt;br /&gt;ms-help://MS.MSSDK.1033/MS.NETFX30SDK.1033/wpf_conceptual/html/f667bd15-2134-41e9-b4af-5ced6fafab5d.htm&lt;br /&gt;&lt;br /&gt;I am due to be looking at a lot of this over the next few weeks and will share my findings. Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/09/net-30-rc1-on-fresh-machine.html"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/09/net-30-rc1-on-fresh-machine.html" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-7700688195884524181?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/7700688195884524181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=7700688195884524181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/7700688195884524181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/7700688195884524181'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/09/net-30-rc1-on-fresh-machine.html' title='Getting started on WPF and .net 3.0 RC1'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-5919852815550534437</id><published>2006-09-12T21:05:00.000-07:00</published><updated>2006-09-12T21:54:00.533-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft AJAX'/><title type='text'>Microsoft AJAX is the new Atlas</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Georgia;"&gt;It's worth a mention that Atlas is changing it's name and is release date is set to late 2006. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Georgia;"&gt;In short the new naming is like this:&lt;br /&gt;"Microsoft AJAX Library" for all Atlas client controls&lt;br /&gt;"ASP.NET 2.0 AJAX Extensions" for the asp.net server side Atlas controls&lt;br /&gt;"ASP.NET AJAX Control Toolkit" for the current Atlas control toolkit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;"&gt;Of course I'm getting all this from the wonderful ScottGu blog article:&lt;br /&gt;&lt;/span&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2006/09/11/_2200_Atlas_2200_-1.0-Naming-and-Roadmap.aspx"&gt;&lt;span style="font-family:Georgia;"&gt;http://weblogs.asp.net/scottgu/archive/2006/09/11/_2200_Atlas_2200_-1.0-Naming-and-Roadmap.aspx&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;"&gt;Why is it that this naming bugs me? Beta technologies always have the cool and unusual names, whereas the final product is usually so plain and boring. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;"&gt;I can only imagine that searches will be slower and more painful with this new naming. Put "Atlas C#" and other terms into a search engine you will get your results pretty easily. Put "Microsoft AJAX C#" or "ASP.NET AJAX C#" and you may be confused with other AJAX libraries or articles about AJAX as a technology etc. So with this naming we'll need rock solid intellisense and documentation otherwise our lives just got harder.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;"&gt;And to those that haven't followed the Atlas project, it would simply sound like Microsoft found that AJAX was taking off and quickly tacked a library together and and said "Hey, now we have AJAX... see Microsoft AJAX." The truth is the project has been very well thought out. A free client side library, a free asp.net library and a free community built toolkit. It sounds far too open source and cool to be Microsoft. At least too cool to be "Microsoft AJAX"! I see it as one of those projects, along with the wonderful express products, that really reflects Microsofts future potential as a helping hand to programmers, not an evil dictatorship set to make everyone learn the hard way to code with the highest money outlay.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;"&gt;Oh well, it's only a name in the end, the technology is still cool and I'd still tip it to be the number 1 AJAX library for .net shortly after it's release.&lt;/span&gt; Lets hope Scott and the others keep pushing the technology to great heights.&lt;/p&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/09/microsoft-ajax-is-new-atlas.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/09/microsoft-ajax-is-new-atlas.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-5919852815550534437?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/5919852815550534437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=5919852815550534437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/5919852815550534437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/5919852815550534437'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/09/microsoft-ajax-is-new-atlas.html' title='Microsoft AJAX is the new Atlas'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-665823758426918011</id><published>2006-09-05T19:48:00.000-07:00</published><updated>2006-09-05T20:01:20.258-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>C# object arrays BinarySearch, Sort and IComparer</title><content type='html'>&lt;p&gt;This isn't so much a new or very difficult thing, but it's something I've happened to come across twice recently, and I've needed to dig up the example code both times, so thought I'd add it to my blog for future reference.&lt;br /&gt;&lt;br /&gt;Basically, I'm getting much more interested in dealing with object arrays rather than DataSets even in smaller projects. I feel like I have more control over certain things with object arrays, like business logic and customising properties. Now one of my projects was .net 2.0 so I used the generic List&lt;&gt; which was quite nicely put together, but my other project is a 1.1 project, so needed a slightly more outdated method. &lt;/p&gt;&lt;p&gt;I'll explain that one here, and probably add a note about the List&lt;&gt; way to do the same (plus more) next time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Setting up the object array&lt;/strong&gt;&lt;br /&gt;For a very basic example I've got a class with a couple of fields in it for an Mp3 list: &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;public&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;class&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class &lt;/span&gt;&lt;span style="font-size:85%;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;private&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;string&lt;/span&gt;&lt;span style="font-size:85%;"&gt; _Artist;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;private&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;string&lt;/span&gt;&lt;span style="font-size:85%;"&gt; _Song;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;private&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="font-size:85%;"&gt; _Ranking;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;public&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;string&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Artist { &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;get&lt;/span&gt;&lt;span style="font-size:85%;"&gt; { &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; _Artist;} &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;set&lt;/span&gt;&lt;span style="font-size:85%;"&gt; {_Artist = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;value&lt;/span&gt;&lt;span style="font-size:85%;"&gt;;}}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Song { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _Song;} &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; {_Song = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;;}}&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; Ranking { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _Ranking;} &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; {_Ranking = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;;}}&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Mp3Class (&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Artist, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Song, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; Ranking)&lt;br /&gt;{&lt;br /&gt;_Artist = Artist; _Song = Song; _Ranking = Ranking;&lt;br /&gt;}&lt;br /&gt;} &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;A basic example to get some data into this would be:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Mp3Class[] mp3s = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class[5];&lt;br /&gt;mp3s[0] = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Cave"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Ship Song"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, 9);&lt;br /&gt;mp3s[1] = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Nirvana"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Smells like teen spirit"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, 3);&lt;br /&gt;mp3s[2] = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Sonic Youth"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"100%"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, 1);&lt;br /&gt;mp3s[3] = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Cave"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Red right hand"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, 4);&lt;br /&gt;mp3s[4] = &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Nirvana"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Heart shaped box"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, 7);&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Array class&lt;/strong&gt;&lt;br /&gt;So the thing you really need to get your head around working with arrays of objects is the Array class. It's very similar to working with List&lt;&gt;, but missing a few features. For simple arrays, things like IndexOf, Sort and even BinarySearch can be straight forward, but with object arrays a little more work is needed, but fortunately not too much.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Array.Sort&lt;/strong&gt;&lt;br /&gt;For sorting our class, there is one big thing that makes it more difficult. Which property do you sort on? In this case all are valid, as you may be ordering by artist, by ranking or even by song, but that means we need to implement another class to help us out. The IComparer interface gives us the ability to sort things how we wish using our objects. Basically, if we want to sort this list by Artist, we can implement an IComparer class which compares the Artist string, and Sort will do the rest, or if we want to sort by Ranking, we can compare the ranking numbers and Sort will do the rest. Here are those two examples:&lt;br /&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;public&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;class&lt;/span&gt;&lt;span style="font-size:85%;"&gt; ArtistCompareClass : IComparer&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="font-size:85%;"&gt; IComparer.Compare(&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;object&lt;/span&gt;&lt;span style="font-size:85%;"&gt; x, &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;object&lt;/span&gt;&lt;span style="font-size:85%;"&gt; y)&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="font-size:85%;"&gt; RetVal = String.Compare((x &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;as&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class).Artist, (y &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;as&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Mp3Class).Artist, &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;true&lt;/span&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; RetVal;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; RankingCompareClass : IComparer&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; IComparer.Compare(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; x, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; y)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; RetVal = (x &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Mp3Class).Ranking - (x &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Mp3Class).Ranking;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; RetVal;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:georgia;font-size:100%;"&gt;The ArtistCompareClass cheats by using String.Compare (with case insensitivity). IComparer.Compare is simply looking for a negative if the first object should be ordered earlier, 0 if they are the same and a positive number if the 2nd object should be ordered earlier. Passing this object to Array.Sort will sort the array alphabetically by Artist.&lt;br /&gt;&lt;br /&gt;The RankingCompareClass implements the same IComparer.Compare, so again, if the first Ranking is smaller it returns a negative, if they are the same a 0, if the 2nd Ranking is smaller a positive. This will order the object array by Ranking.&lt;br /&gt;&lt;br /&gt;The call to sort the array will look like this:&lt;br /&gt;&lt;/span&gt;Array.Sort(mp3s, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RankingCompareClass());&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;You now have the mp3s ordered by Ranking.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Array.BinarySearch&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;The BinarySearch as the name suggests searches the array using the same IComparer (or at least can do it this way). So again IComparer helps us search through an array of objects, when the language would otherwise have no idea of what it's searching for.&lt;br /&gt;&lt;br /&gt;Note: Remember these key things when using a BinarySearch: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;You must sort by the IComparer before using BinarySearch&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;It won't work (100%) if your "key" is not unique&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;If the result is negative, you can do a bitwise operation to see the closest match&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;If you are only searching a subset of the array, it will still return the item in the entire array that's a match.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:georgia;font-size:100%;"&gt;Here are a couple of examples. I'll give you another IComparer which will help do "real" searches easier. In this case we'll send through the ranking as the 2nd parameter rather than a full object. As you can imagine if someone wanted to search for the song with ranking number 5, it's easier to pass through 5 than new Mp3Class("", "", 5):&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; RankingCompareValueClass : IComparer&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; IComparer.Compare(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; x, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; y)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; RetVal = (x &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Mp3Class).Ranking - (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;)y;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; RetVal; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;} &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;To find the object which matches a search with a ranking of 4 (MatchingObject is 2, which is the 3rd object in the array):&lt;br /&gt;&lt;/span&gt;Array.Sort(mp3s, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RankingCompareClass());&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; MatchingObject = Array.BinarySearch(mp3s, 5, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RankingCompareValueClass());&lt;br /&gt;MessageBox.Show(mp3s[MatchingObject].Artist + &lt;span style="color:#800000;"&gt;" - "&lt;/span&gt; + mp3s[MatchingObject].Song);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;If the user tried to search for a ranking of 5, we could take them to the next closest match (MatchingObject is 3, which is the 4th object in the array):&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Array.Sort(mp3s, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RankingCompareClass());&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; MatchingObject = Array.BinarySearch(mp3s, 5, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RankingCompareValueClass());&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (MatchingObject &lt; matchingobject =" ~MatchingObject;"&gt;&lt;span style="color:#800000;"&gt;" - "&lt;/span&gt; + mp3s[MatchingObject].Song);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;That's about it. It's worth pointing out that List&lt;&gt; does most of this stuff plus more, and is slightly easier to use, so I'd tend to use that for any 2.0+ projects. &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/09/c-object-arrays-binarysearch-sort-and.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/09/c-object-arrays-binarysearch-sort-and.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-665823758426918011?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/665823758426918011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=665823758426918011' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/665823758426918011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/665823758426918011'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/09/c-object-arrays-binarysearch-sort-and.html' title='C# object arrays BinarySearch, Sort and IComparer'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-1713479118471406059</id><published>2006-08-29T15:49:00.000-07:00</published><updated>2006-08-29T16:11:57.243-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Atlas asp.net'/><title type='text'>Atlas HoverMenuExtender example</title><content type='html'>&lt;span style="font-family:Georgia;font-size:100%;"&gt;The Atlas HoverMenuExtender is one of my favourite controllers in the Atlas toolkit. I've often thought about having all those minor details off the main screen, but still have them easily and quickly accessible. I see this control as a nice easy way to do this, so I'll show you how I'd do that.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;What is it?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;The Atlas HoverMenuExtender gives you a way to easily add a panel with extra content to a control, without clutteruing up the screen. You can bind all the data in your grid, while at the same time binding your hover menu panel, therefore keeping all you code in one simple place but adding nice functionality.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Pros?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Clean up your interface by only showing key data, and showing extra data on hover&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Have a fast way to show master/detail data&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Hide all your extra command buttons in a GridView&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Cons?&lt;/span&gt;&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;For a first time user of your site, it may not be that obvious that extra data is available on mouse over&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;It may also be annoying that menus keep popping up whenever scrolling past a grid&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Must set the visibility to hidden in the stylesheet to make sure the panel doesn't show quickly when the page is loading&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;As a note I had a slight hitch when trying this extender in a real situation, in that nothing showed. Funnily enough it worked in Firefox though, and it turned out that an "overflow:auto" (ie HTML scroll bar) in another control on that form caused the issue&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;PopDelay says how long to leave the popup there, whereas I would have though it would indicate how long to wait before showing it. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;strong&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Tips&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;I feel there are a couple of tricks to the trade here, and some of these apply to other Atlas extenders also:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;In my example, having width="100%" on the GridRowPanel (panel shown in grid before popup) means the popup will appear anywhere on the grid, otherwise it will only appear when hovering over the actual content. Another way to fix this is have a background color. Also this works as I would have expected in Firefox, just not IE.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;The popup window must be hidden by default, otherwise you will notice the control breifly while the page loads. Atlas will make it visible again when it needs to. Do this with Visibility:hidden in the stylesheet or add style="display:none"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;The HoveMenuExtender MUST be placed in the ItemTemplate/EditTemplate etc for a GridView. This is because the target control is internal to that template, and therefore isn't visible to controls outside the grid.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Certainly on a grid PopDelay should be short to avoid ugly or unreadable popups for other rows.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Example&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;In this example, I'd like to show a few extra fields in a GridView when hovering over a row with the mouse. &lt;/span&gt;&lt;ol&gt;&lt;li&gt;Add an Atlas ScriptManager to the form&lt;/li&gt;&lt;li&gt;Setup a GridView with an ItemTemplate with many columns&lt;/li&gt;&lt;li&gt;Add the databinding code how you wish to your data.&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;In the ItemTemplate have one panel for the columns you want to show and one for the columns you want to have as the hover panel&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Make sure the hover panel has Visibility:hidden in the style or style="display:none" in the panel tag&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Add a HoverMenuExtender inside the ItemTemplate&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Set the TargetControlID to the panel you want to permanently display on the grid.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Set the PopupControlID to the panel you want to show when the mouse hovers over the grid&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Finally set a HoverCssClass for how you want the main grid row to look when hovered over&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;PopupPosition dictates on which edge of the TargetControlID you want the popup to appear&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;OffsetX, OffsetY say how far down and right to place the popup from PopupPosition.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;PopDelay means how long the popup will show once the mouse leaves the control. Set this to a low amount on grids.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;Here is the code:&lt;/span&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Page Language="C#" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Import Namespace="System.Collections.Generic" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span class="kwrd"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Mp3Class&lt;br /&gt;  {&lt;br /&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; _Mp3Number;&lt;br /&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _Artist;&lt;br /&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _SongTitle;&lt;br /&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;decimal&lt;/span&gt; _Rating;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; Mp3Number { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; _Mp3Number; } set { _Mp3Number = value; } }&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Artist { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; _Artist; } set { _Artist = value; } }&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; SongTitle { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; _SongTitle; } set { _SongTitle = value; } }&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;decimal&lt;/span&gt; Rating { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; _Rating; } set { _Rating = value; } }&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; Mp3Class(&lt;span class="kwrd"&gt;int&lt;/span&gt; Mp3Number, &lt;span class="kwrd"&gt;string&lt;/span&gt; Artist, &lt;span class="kwrd"&gt;string&lt;/span&gt; SongTitle, &lt;span class="kwrd"&gt;decimal&lt;/span&gt; Rating)&lt;br /&gt;    {&lt;br /&gt;      &lt;span class="kwrd"&gt;this&lt;/span&gt;.Mp3Number = Mp3Number;&lt;br /&gt;      &lt;span class="kwrd"&gt;this&lt;/span&gt;.Artist = Artist;&lt;br /&gt;      &lt;span class="kwrd"&gt;this&lt;/span&gt;.SongTitle = SongTitle;&lt;br /&gt;      &lt;span class="kwrd"&gt;this&lt;/span&gt;.Rating = Rating;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;    List&amp;lt;Mp3Class&amp;gt; Mp3List = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;Mp3Class&amp;gt;();&lt;br /&gt;    Mp3List.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Mp3Class(1, &lt;span class="str"&gt;"Bernard Fanning"&lt;/span&gt;, &lt;span class="str"&gt;"Wish You Well"&lt;/span&gt;, 8));&lt;br /&gt;    Mp3List.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Mp3Class(2, &lt;span class="str"&gt;"Ben Lee"&lt;/span&gt;, &lt;span class="str"&gt;"Catch My Disease"&lt;/span&gt;, 7));&lt;br /&gt;    Mp3List.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Mp3Class(3, &lt;span class="str"&gt;"Gorillaz"&lt;/span&gt;, &lt;span class="str"&gt;"Feel Good Inc."&lt;/span&gt;, 9));&lt;br /&gt;    Mp3List.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Mp3Class(4, &lt;span class="str"&gt;"Foo Fighters"&lt;/span&gt;, &lt;span class="str"&gt;"Best Of You"&lt;/span&gt;, 6));&lt;br /&gt;    Mp3List.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Mp3Class(5, &lt;span class="str"&gt;"Gorillaz"&lt;/span&gt;, &lt;span class="str"&gt;"Dare"&lt;/span&gt;, 9));&lt;br /&gt;    TopFiveList.DataSource = Mp3List;&lt;br /&gt;    TopFiveList.DataBind();&lt;br /&gt;  }&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Atlas HoverMenuExtender&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/css"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    .popupMenu {background-color:Silver;position:absolute;visibility:hidden;border-width:1px;border-style:solid;border-color:Black;}&lt;br /&gt;    .popupHover {background-color:Gray;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;atlas:ScriptManager&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="scriptmgr"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;atlas:ScriptManager&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="form1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Top 5 Mp3's&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;  &lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:GridView&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="TopFiveList"&lt;/span&gt; &lt;span class="attr"&gt;ShowHeader&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="attr"&gt;GridLines&lt;/span&gt;&lt;span class="kwrd"&gt;="Both"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="200px"&lt;/span&gt; &lt;span class="attr"&gt;AutoGenerateColumns&lt;/span&gt;&lt;span class="kwrd"&gt;="False"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Columns&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:BoundField&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="attr"&gt;DataField&lt;/span&gt;&lt;span class="kwrd"&gt;="Mp3Number"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="HoverPnl"&lt;/span&gt; &lt;span class="attr"&gt;CssClass&lt;/span&gt;&lt;span class="kwrd"&gt;="popupMenu"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="300px"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="display:none"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Artist&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ArtistLbl"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Eval("Artist") %&amp;gt;'&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Song Title&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Label1"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Eval("SongTitle") %&amp;gt;'&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Song Rating&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Label2"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Eval("Rating") %&amp;gt;'&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="GridRowPnl"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="100%"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Label3"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Eval("SongTitle") %&amp;gt;'&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:HoverMenuExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="HoverMenuExtender1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:HoverMenuProperties&lt;/span&gt; &lt;span class="attr"&gt;PopupPosition&lt;/span&gt;&lt;span class="kwrd"&gt;="right"&lt;/span&gt; &lt;span class="attr"&gt;HoverCssClass&lt;/span&gt;&lt;span class="kwrd"&gt;="popupHover"&lt;/span&gt; &lt;span class="attr"&gt;PopupControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="HoverPnl"&lt;/span&gt;&lt;br /&gt;                  &lt;span class="attr"&gt;TargetControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="GridRowPnl"&lt;/span&gt; &lt;span class="attr"&gt;PopDelay&lt;/span&gt;&lt;span class="kwrd"&gt;="50"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;cc1:HoverMenuExtender&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;        &lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Columns&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;    &lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:GridView&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;  &lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/08/atlas-hovermenuextender-example.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/08/atlas-hovermenuextender-example.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-1713479118471406059?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/1713479118471406059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=1713479118471406059' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1713479118471406059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/1713479118471406059'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/08/atlas-hovermenuextender-example.html' title='Atlas HoverMenuExtender example'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-6407794978283699837</id><published>2006-08-22T16:04:00.000-07:00</published><updated>2006-08-22T18:02:18.802-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Atlas asp.net'/><title type='text'>Atlas Extender with code behind</title><content type='html'>So my first venture into Atlas code was to convert a fairly simple winforms app into a webform. I wouldn't have dreamt of doing this without Atlas or AJAX, because although it's dealing with data (which .net does so well), there is also a lot of drag and drop, resizing panel etc etc. The only other problem is that it's also building the page dynamically in the winforms app, which leaves me wondering how the extenders can be used if they are usually created in the aspx source. Fortunately there is a way.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is it?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;An extender is the same as my previous blog, but in this case it's linking the controls to the extender using server side or code behind code. Without this ability, we'd be stuck with Atlas effects on only the controls you can design.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How does it help me?&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;It will only help if you need to add controls dynamically. Where you can I'd still suggest to put the properties on the form itself like previously explained.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Pros?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Gives you the ability to add controls dynamically and still give them Atlas behaviors&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Cons?&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Extender properties can't be added after the page init procedures. Eg a button click happens after a page init, therefore you can't add extender properties in a button click.&lt;/li&gt;&lt;li&gt;You must add the dynamic controls to the form before finalising your extender properties. So if the code is adding a lot of controls to a panel, you must wait until the panel is added to the form before adding the extender properties.&lt;/li&gt;&lt;li&gt;Potentially adds more difficultly to debugging.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Another simple example here with an Atlas DragPanelExtender. No controls on the aspx form, and one control added dynamically to the DragPanelExtender.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Add an atlas ScriptManager to a webform.&lt;/li&gt;&lt;li&gt;Drag an atlas DragPanelExtender onto the form.&lt;/li&gt;&lt;li&gt;Double click on the form to create a Page_Load method in your code behind.&lt;/li&gt;&lt;li&gt;In the code behind dynamically add a panel, another panel within that panel to be the drag panel, and another control to be the content inside the main panel.&lt;/li&gt;&lt;li&gt;Add these to the form.&lt;/li&gt;&lt;li&gt;Now create a DragPanelProperties object and set the TargetControlID to the main panel and the DragHandleID to the header panel which is to be the draggable control.&lt;/li&gt;&lt;li&gt;Link this to the control to the extender by adding the object to the TargetProperties collection.&lt;/li&gt;&lt;li&gt;All done, the dynamic control will now appear with the Atlas effects also.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Full Code:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Page Language="C#" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span class="kwrd"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (!IsPostBack)&lt;br /&gt;    {&lt;br /&gt;      BuildPageDynamically();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; BuildPageDynamically()&lt;br /&gt;  {&lt;br /&gt;      &lt;span class="rem"&gt;// One of 3 main panels.&lt;/span&gt;&lt;br /&gt;      Panel p = &lt;span class="kwrd"&gt;new&lt;/span&gt; Panel();&lt;br /&gt;      p.Height = 200;&lt;br /&gt;      p.Width = 200;&lt;br /&gt;      p.ID = &lt;span class="str"&gt;"Panel1"&lt;/span&gt;;&lt;br /&gt;      p.BorderWidth = 1;&lt;br /&gt;      p.BackColor = System.Drawing.Color.PaleVioletRed;&lt;br /&gt;  &lt;br /&gt;      &lt;span class="rem"&gt;// Add a header panel to drag by.&lt;/span&gt;&lt;br /&gt;      Panel HeaderPanel = &lt;span class="kwrd"&gt;new&lt;/span&gt; Panel();&lt;br /&gt;      HeaderPanel.Height = 20;&lt;br /&gt;      HeaderPanel.Width = 200;&lt;br /&gt;      HeaderPanel.ID = &lt;span class="str"&gt;"HeaderPanel1"&lt;/span&gt;;&lt;br /&gt;      HeaderPanel.BorderWidth = 1;&lt;br /&gt;      HeaderPanel.BackColor = System.Drawing.Color.PapayaWhip;&lt;br /&gt;      p.Controls.Add(HeaderPanel);&lt;br /&gt;        &lt;br /&gt;      &lt;span class="rem"&gt;// Add a label in the main panel.&lt;/span&gt;&lt;br /&gt;      Label l = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();&lt;br /&gt;      l.Text = &lt;span class="str"&gt;"Drag me"&lt;/span&gt;;&lt;br /&gt;      l.Width = 200;&lt;br /&gt;      p.Controls.Add(l);&lt;br /&gt;    &lt;br /&gt;      &lt;span class="rem"&gt;// Add the main panel onto the main form&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;this&lt;/span&gt;.Controls.Add(p);&lt;br /&gt;    &lt;br /&gt;      &lt;span class="rem"&gt;// Create a new properties for the extender.&lt;/span&gt;&lt;br /&gt;      DragPanelProperties dpp = &lt;span class="kwrd"&gt;new&lt;/span&gt; DragPanelProperties();&lt;br /&gt;      dpp.TargetControlID = p.ID;&lt;br /&gt;      dpp.DragHandleID = HeaderPanel.ID;&lt;br /&gt;    &lt;br /&gt;      &lt;span class="rem"&gt;// Add the properties to the extender&lt;/span&gt;&lt;br /&gt;      DragPanelExtender1.TargetProperties.Add(dpp);&lt;br /&gt;    &lt;br /&gt;  }&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Atlas Extender Code Behind&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;atlas:ScriptManager&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="scriptmgr"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;= &lt;span class="kwrd"&gt;"server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="form1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:DragPanelExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="DragPanelExtender1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;cc1:DragPanelExtender&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/08/atlas-extender-with-code-behind.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/08/atlas-extender-with-code-behind.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-6407794978283699837?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/6407794978283699837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=6407794978283699837' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/6407794978283699837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/6407794978283699837'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/08/atlas-extender-with-code-behind.html' title='Atlas Extender with code behind'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-6877880009741749739</id><published>2006-08-21T15:37:00.000-07:00</published><updated>2006-08-21T17:49:43.327-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Atlas asp.net'/><title type='text'>Understanding Atlas Extenders</title><content type='html'>&lt;p&gt;&lt;span style="font-family:georgia;"&gt;I'm not here to offer a brilliant new view on what an Extender is, but I feel my lack of higher education sometimes leaves me scratching my heads on Microsoft’s explanation of their good work, so I’m here to give an easy example of what an Atlas extender does for you.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;strong&gt;What is it?&lt;br /&gt;&lt;/strong&gt;.net has a great feature in extensibility. What is this? It means that if you write a new effect you can implement it on controls that don't have that functionality. The best example in winforms is the ToolTip. Before you drop a ToolTip on a form, you have no way of having hints, but once you've dropped one on a form, all your controls suddenly have a "ToolTip on toolTip1" property where you can add a hint. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:georgia;"&gt;An Atlas extender does a similar thing for web controls. It adds properties onto your web controls, to allow special AJAX or javascript effects without needing inheritance or anything complex to work.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;strong&gt;How does it help me?&lt;br /&gt;&lt;/strong&gt;Generally Atlas extenders are at their most useful when there is a nice javascript feature you have, but you want to attach it to your asp.net web controls. Rather than inheriting controls to add javascript niceness, you simply write an extender and use it on what controls you want to.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Pros?&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;There is nothing stopping you writing your own, but Microsoft has already gathered over 20 different extenders written by various authors. This is available for download in the Atlas toolkit &lt;/span&gt;&lt;a href="http://atlas.asp.net/atlastoolkit/"&gt;&lt;span style="font-family:georgia;"&gt;http://atlas.asp.net/atlastoolkit/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;.&lt;br /&gt;This alone makes Atlas a compelling argument. Imagine that every decent extender that gets written gets added to the Atlas toolkit. By this time next year we could have 100 controls, which any user can access by simply downloading the toolkit. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;After writing the extender, you can get javascript features in your web controls without writing a line of javascript code. This is nice as feature rich controls come without writing complex javascript code in your web form. The less code on the main page the better. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Another nice feature is you can see which Atlas extenders have been added to your web control in the Properties section. Compare this with trying to dig through javascript to see which control a certain web control that function effects and you’ll realise the Atlas extender way is much neater. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;You can add extender properties in server side code (code behind). Very nice.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:georgia;"&gt;Cons?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;I’m not an expert here, but it seems to me that as the toolkit grows, so will the size of the included toolkit dll, and therefore slow down initial page loads at a new site. This of course isn’t a downside of extenders, but the toolkit itself. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Also the extenders don’t work on html controls like a div (from what I’ve seen), so you’re stuck using the asp version of that control, which can make it harder to get extra javascript functionality sometimes. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;From what I’ve seen you can’t add the extender properties to a control in the design view, but once they’re added you can see them there. (at least this isn't working on my Web Developer Express)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;On the other hand you can't see the extender properties in the source view.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:georgia;"&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;I’ll give a simple example here, because I’ll probably go through a lot of these controls in more detail later on. For now I’ll show the simplest example. It will extend an asp:Button to include a confirmation dialog using the ConfirmButtonExtender:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Add an Atlas ScriptManager to the form. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Drag a ConfirmButtonExtender onto a web form. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Dragging this adds a simple extender tag. All extender tags have a list of property tags within them to attach an extender to a control and give it other properties. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Drag an asp:Button onto the web form. Call it “AtlasBtn”. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Goto the Source view and find the ConfirmButtonExtender. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Start adding a new tag in the middle of that tag by pressing “&lt;”. IntelliSense should kick in and show cc1:ConfirmButtonProperties&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:georgia;"&gt;Add properties in there for ConfirmText (like "Are you really sure?") and TargetControlID="AtlasBtn".&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-family:georgia;"&gt;That’s all there is to it. Now when the user clicks on that button, the server side code on AtlasBtn will only execute once the user confirms the dialog, otherwise nothing will happen. Note also that when clicking on AtlasBtn in the Design view now, the properties show the Atlas Extender &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;?xml:namespace prefix = cc1 /&gt;&lt;cc1:confirmbuttonproperties.&gt;&lt;span style="font-family:georgia;"&gt;Full code:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Page Language="C#" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="asp"&gt;&amp;lt;%@ Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span class="kwrd"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AtlasBtn_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;    Response.Write(&lt;span class="str"&gt;"Added this text through server side code now."&lt;/span&gt;);&lt;br /&gt;  }&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Atlas Extender example&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;atlas:ScriptManager&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="scriptmgr"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="form1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="AtlasBtn"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Click to add"&lt;/span&gt; &lt;span class="attr"&gt;OnClick&lt;/span&gt;&lt;span class="kwrd"&gt;="AtlasBtn_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:ConfirmButtonExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ConfirmButtonExtender1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:ConfirmButtonProperties&lt;/span&gt; &lt;span class="attr"&gt;ConfirmText&lt;/span&gt;&lt;span class="kwrd"&gt;="Are you really sure?"&lt;/span&gt; &lt;span class="attr"&gt;TargetControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="AtlasBtn"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;cc1:ConfirmButtonExtender&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://atlasandnetfinds.blogspot.com/2006/08/understanding-atlas-extenders.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://atlasandnetfinds.blogspot.com/2006/08/understanding-atlas-extenders.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-6877880009741749739?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/6877880009741749739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=6877880009741749739' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/6877880009741749739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/6877880009741749739'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/08/understanding-atlas-extenders.html' title='Understanding Atlas Extenders'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3396052887976185753.post-5532045727165636387</id><published>2006-08-15T03:06:00.000-07:00</published><updated>2006-08-15T04:50:15.848-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Why I'm here.</title><content type='html'>&lt;strong&gt;My reasons?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;What sort of world do we live in, when someone like me is starting a blog? It's still a hard question to answer, but it's best answered by explaining why I shouldn't start a blog. I barely passed English in high school, so my writing skills are average. I never studied at uni, so my programming skills are mostly self taught. I'm usually one of the last to know of cool technologies, and rarely dig deep enough to get the full picture of any one technology. And I certainly don't have inside knowledge or know people who work for Microsoft.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;My background&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;OK, maybe I need to go back a little further. I did do some studies, acheiving a diploma in computer programming in Perth, Western Australia, where I grew up. It was a career change (or start), based mostly on my love for computers and self taught games programming in C++. I learned mainly from internet tutorials and a couple of books, about the time Doom was the PC benchmark game. I didn't keep any of that code, but I can safely say my programming sucked. It got slightly better by the time I was graduated, and my background was enough to assure high grades.&lt;br /&gt;&lt;br /&gt;My first workplace was a small custom software house, programming Delphi applications. It was an excellent hands on job, covering programming, customer support, quoting, and database design. I was taught a lot, but I do feel like I'd never learned to program the best way. I didn't spend my free time learning, so my development was slow.&lt;br /&gt;&lt;br /&gt;2 and 1/2 years later it was time to move to Sydney for work reasons and for Kirsty (now my wife and mother of my son Luke, 1, with another due later this year). Another couple of years was spent working for retailer Dick Smith Electronics again mainly in Delphi and interbase, mainly getting out of bad programming habits thanks to the help of an excellent programming team. After a while I finally found my own urges to learn more, and .net was the clean break I needed. I've still got my job with Dickies, and my last 3 years have been split between Delphi and Visual Studio.net apps. My works been great helping me to work more on the project side of things, but I've decided to keep pushing my programming knowledge further also.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;So . . . my reasons?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Oh yeah, I knew there was a point. I've read plenty of blogs over the last couple of years, but there's no doubt, that subscribing to a few blogs recently filled me in a lot more on blogs. It's not just about experts giving up their knowledge for free, it's also about getting good information more widely distributed, because even if it's not your own work, I still want to know about it. It's also about having a central place to find out about a single technology... like Atlas.&lt;br /&gt;&lt;br /&gt;Atlas is not even released yet, but already it's blown me away. My web programming skills are almost non-existant, mainly because programming for the web was painful compared with Delphi apps. .net changed that somewhat, .net 2.0 somewhat more, but it was AJAX that really got me interested. But then again, there were several small implementations for .net AJAX assemblies and support/documentation/tutorials was very low, so I didn't jump in head first. So I was thrilled to see Microsoft attempting an AJAX implementation, which is of course Atlas. Once you've put your first UpdatePanel on a form you're hooked. And even though documentation/support for Atlas is low at the moment, and there are problems with it (come on it's a beta), I feel like it's worth the effort to work it out.&lt;br /&gt;&lt;br /&gt;And while I'm here I'll also put up interesting notes from .net Winforms apps, and keep an eye out for .net 3.0, which is shaping up to be a big step up especially looking at WPF and WPF/E. And given the current rate of development at Microsoft there will be plenty of things worth blogging about in the next year or so.&lt;br /&gt;&lt;br /&gt;If you've read this far you've done well, thanks for reading. I'll be looking to start with some Atlas basics over the next few days, and hopefully not entirely embarrass myself or mislead people.&lt;br /&gt;&lt;br /&gt;Yay, my first blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3396052887976185753-5532045727165636387?l=atlasandnetfinds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atlasandnetfinds.blogspot.com/feeds/5532045727165636387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3396052887976185753&amp;postID=5532045727165636387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/5532045727165636387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3396052887976185753/posts/default/5532045727165636387'/><link rel='alternate' type='text/html' href='http://atlasandnetfinds.blogspot.com/2006/08/why-im-here.html' title='Why I&apos;m here.'/><author><name>Sam Barber</name><uri>http://www.blogger.com/profile/16747204956698204468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
