<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Timdams&#039;s Blog</title>
	<atom:link href="http://timdams.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://timdams.wordpress.com</link>
	<description>.NET, Microsoft, programming and other stuff that interests me</description>
	<lastBuildDate>Tue, 21 Feb 2012 12:02:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='timdams.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Timdams&#039;s Blog</title>
		<link>http://timdams.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://timdams.wordpress.com/osd.xml" title="Timdams&#039;s Blog" />
	<atom:link rel='hub' href='http://timdams.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2011 in review</title>
		<link>http://timdams.wordpress.com/2012/01/01/2011-in-review/</link>
		<comments>http://timdams.wordpress.com/2012/01/01/2011-in-review/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 12:29:47 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=390</guid>
		<description><![CDATA[The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog. Here&#8217;s an excerpt: The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 18,000 times in 2011. If it were a concert &#8230; <a href="http://timdams.wordpress.com/2012/01/01/2011-in-review/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=390&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.</p>
<p>	<a href="/2011/annual-report/"><img src="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg" width="100%" alt="" /></a></p>
<p>Here&#8217;s an excerpt:</p>
</p>
<blockquote><p>The concert hall at the Syndey Opera House holds 2,700 people.  This blog was viewed about <strong>18,000</strong> times in 2011.  If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.</p></blockquote>
<p><a href="/2011/annual-report/">Click here to see the complete report.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=390&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2012/01/01/2011-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg" medium="image" />
	</item>
		<item>
		<title>7 WP7 dev tools you might not know but will want to have</title>
		<link>http://timdams.wordpress.com/2011/12/13/7-wp7-dev-tools-you-might-not-know-but-will-want-to-have/</link>
		<comments>http://timdams.wordpress.com/2011/12/13/7-wp7-dev-tools-you-might-not-know-but-will-want-to-have/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 09:04:17 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[Tips_and_tricks]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[xaml]]></category>
		<category><![CDATA[helper class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[wp7]]></category>
		<category><![CDATA[nuget]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=382</guid>
		<description><![CDATA[There&#8217;s an incredible amount of guides, tools and utilities to be found on the Internet (or should I say &#8216;tha cloud&#8217;?) for Windows Phone 7 developers. Compiled in this article are some of the tools I&#8217;ve come across on my &#8230; <a href="http://timdams.wordpress.com/2011/12/13/7-wp7-dev-tools-you-might-not-know-but-will-want-to-have/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=382&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s an incredible amount of guides, tools and utilities to be found on the Internet (or should I say &#8216;tha cloud&#8217;?) for Windows Phone 7 developers. Compiled in this article are some of the tools I&#8217;ve come across on my searches which I now use frequently but didn&#8217;t know the existence of beforehand. Read on to change you WP7 development life.<span id="more-382"></span>
</p>
<ul>
<li><strong>WP7Contrib</strong>: Consider this a colorful compilation of the best components and helper tools around. Some of the tools discussed in this article are also in the WP7Contrib project. Basically this project has compiled the best tools around in one single project (making articles of this kind rapidly redundant) with links to the original blogs that this the tool(s). Enumerating what&#8217;s in it is overkill, simple check out all the goodies (UI Controls, patterns, transitions, etc) on their codeplex page: <a href="http://wp7contrib.codeplex.com/">http://wp7contrib.codeplex.com/</a>
		</li>
<li>
			<strong>GridHelper: </strong>This one was pointed out to me yesterday. This tool, available through Nuget, helps you with placing all your elements on the grid according to the Metro-guidelines (i.e. Margin of 12pt from the screenborder, etc.) . Read Jeff Wilcox&#8217;s original post to see what this is all about: <a href="http://www.jeff.wilcox.name/2011/10/metrogridhelper/">http://www.jeff.wilcox.name/2011/10/metrogridhelper/</a><br />
			<br /><img src="http://timdams.files.wordpress.com/2011/12/121311_0904_wp7devtools1.png?w=500" alt="" />
		</li>
<li><strong>LowProfileImageLoader</strong>: David Anson wrote several excellent classes, one of these being an extended Image Control which can be used when the imagesource is an image in &#8216;tha cloud&#8217;. The control will download the image without blocking the UI thread which tends to happen with these things. This control is ideal in other words if you have a large list of images to show on a page. I&#8217;ve used this control in my <a href="http://timdams.wordpress.com/my-wp7-apps/">Belgian Cinema</a> app making the startup of the application way more fluent. Make sure you also check out the DeferredLoadListBox control from the same author which improves the scrolling of long lists in your app. All information can be found on the <a href="http://blogs.msdn.com/b/delay/archive/2010/10/04/there-s-no-substitute-for-customer-feedback-improving-windows-phone-7-application-performance-now-a-bit-easier-with-lowprofileimageloader-and-deferredloadlistbox-updates.aspx">&#8216;Delay&#8217;s Blog&#8217;</a>.
</li>
<li><strong>Placeholder images: </strong>David Anson recently also released a WPF/SL/WP7 control that easily incorporates placeholder images to be used for those images that might not be available or are slow to download. Like all of mr Anson&#8217;s control, this one again can be easily integrated in your existing application by simply changing the your Image-controls to PlaceImage controls with an additional PlaceHolderSource-attribute that points to the local image to be used as placeholder. A combination of the LowProfileImageLoader and this control would be awesome but with some plumbing (all the source code is available) this can be done yourself.  More information on this control can be found <a href="http://blogs.msdn.com/b/delay/archive/2011/09/08/know-your-place-in-life-free-placeimage-control-makes-it-easy-to-add-placeholder-images-to-any-wpf-silverlight-or-windows-phone-application.aspx">here</a>.<strong><br />
			</strong></li>
<li><strong>Your Last About Dialog: </strong>An about box is not a real requirement to get approved on the marketplace, but it does help to have one. Implementing an about box is usually done in the last instance right before you are submitting your app for approval. Anxious to get your app on the marketplace, the about box is usually an ugly, empty page with some textboxes thrown on rapidly…at least in my case that is. Peter Kuhn heard our prayers and create a very simple to use, Nuget, about dialog template to be used in all your WP7 apps from hereon. Once you use the &#8220;Your Last About Dialog&#8221; you will never ever write your own about dialog; believe you me (still think there&#8217;s something grammatically wrong with that expression). More information to be discovered on <a href="http://www.pitorque.de/MisterGoodcat/post/Announcing-Your-Last-About-Dialog-(YLAD).aspx">Peter&#8217;s blog</a>.<br /><img src="http://timdams.files.wordpress.com/2011/12/121311_0904_wp7devtools2.png?w=500" alt="" /><strong><br />
			</strong></li>
<li><strong>Kawagoe Toolkit: </strong>Besides having the most funny toolkit name around, this sweet little thing has some interesting things in it. The toolkit consists of 3 handy little classes being: a Message popup with customizable buttons, an imagecache class (+ an inherited PersistentImageChache and SystemImageCache) ideal if your working with lots of image and lastly the toolkit includes a &#8220;OneShotDispatcherTimer&#8221; with is a DispatcherTimes that promised only to fire once, ever (check out the end of <a href="http://dan.clarke.name/2011/07/wp7contrib-transitions-part-3-%e2%80%93-longlistselector/">this article</a> by Dan Clarke why such a timer can be handy to have around). More information on this toolkit can be found <a href="http://kawagoe.codeplex.com/documentation">here</a>)<strong><br />
			</strong></li>
<li><strong>NotifyPropertyWeaver: </strong>Don&#8217;t you just love databinding?! I certainly do, though I sometimes get tired of the amount of boilerplate I each time need to write when implementing an INotifyPropertyChanged class. If you&#8217;ve only got two or three classes , that&#8217;s no big burden. On the other hand, if you have lots of classes, install the NotifyPropertyWeaver (Nuget available) which will simply write all the boring code for you…it&#8217;s like having a little monkey doing your work, hooray! Get your monkey <a href="http://code.google.com/p/notifypropertyweaver/">here</a>.<strong><br />
			</strong></li>
</ul>
<p>There we go. A little list of must-have tools. I know there&#8217;s lots of other stuff around, but these are the ones I personally use a lot (yeah, I use the Silverlight Toolkit as well, but it felt a  bit redundant to mention this one again here). Enjoy!</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/helper-class/'>helper class</a>, <a href='http://timdams.wordpress.com/tag/nuget/'>nuget</a>, <a href='http://timdams.wordpress.com/tag/visual-studio/'>visual studio</a>, <a href='http://timdams.wordpress.com/tag/wp7-2/'>wp7</a>, <a href='http://timdams.wordpress.com/tag/xaml/'>xaml</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/382/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=382&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/12/13/7-wp7-dev-tools-you-might-not-know-but-will-want-to-have/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/12/121311_0904_wp7devtools1.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/12/121311_0904_wp7devtools2.png" medium="image" />
	</item>
		<item>
		<title>Learning to cook with WP 7.5 data (a book review)</title>
		<link>http://timdams.wordpress.com/2011/12/08/learning-to-cook-with-wp-7-5-data-a-book-review/</link>
		<comments>http://timdams.wordpress.com/2011/12/08/learning-to-cook-with-wp-7-5-data-a-book-review/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 15:32:53 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[review]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[data binding]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wp7]]></category>
		<category><![CDATA[wp7 app remote url caching webclient]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=357</guid>
		<description><![CDATA[Recently I received a review copy of the &#8220;Windows Phone 7.5 Data Cookbook&#8221; by Ramesh Thalli from Packt Publishing (ISBN 978-1-84969-122-2). This book, divided in 8 chapters, shows how simple it is to write data-driven programs WP7 applications. What follows &#8230; <a href="http://timdams.wordpress.com/2011/12/08/learning-to-cook-with-wp-7-5-data-a-book-review/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=357&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I received a review copy of the &#8220;Windows Phone 7.5 Data Cookbook&#8221; by Ramesh Thalli from Packt Publishing (ISBN 978-1-84969-122-2). This book, divided in 8 chapters, shows how simple it is to write data-driven programs WP7 applications.</p>
<p><img src="http://timdams.files.wordpress.com/2011/12/120811_1532_learningtoc1.png?w=500" alt="" /><br />
What follows is an extensive review of this book.<br />
<span id="more-357"></span></p>
<p>The basic premises of the book is the same as the other Packt &#8216;Cookbooks&#8217;: each chapter consists of several step-by-step tutorials (dubbed &#8220;recipes&#8221;) , each time resulting in a mini-program with full functionality.</p>
<p>The main application that is rebuilt each time is a simple task manager. Each chapter 3 or more recipes are shown, usually (re)building the main task application. After each chapter and recipe a short explanation and reference to online sources is given .</p>
<p><img src="http://timdams.files.wordpress.com/2011/12/120811_1532_learningtoc2.png?w=500" alt="" /></p>
<p>The book is aimed at developers who have little to no WP7 experience, however a solid Silverlight understanding is a must (for any WP7 developer that is) to get the most from this book. The 8 chapters are logically ordered, each time increasing in complexity :</p>
<ul>
<li>Chapter 1 is a basic refresher on how <strong>data binding</strong> works in a Windows Phone 7 app.</li>
<li>Chapter 2 describes how the local, <strong>isolated storage</strong> of the phone can be used to save data (to files) or settings. You can check out this chapter <a href="http://www.packtpub.com/sites/default/files/1222EXP-Chapter-2-Isolated-Storage.pdf?utm_source=packtpub&amp;utm_medium=free&amp;utm_campaign=pdf">here</a>.</li>
<li>Chapter 3 explains how <strong>XML data</strong> (local and remote) can be parsed using both Linq-to-XML or an XmlReader. The final recipe than explains how object (de)serialization to/from XML can be accomplished.</li>
</ul>
<p>The first 3 chapters explain topics of which an abundant amount of online tutorials exist. They didn&#8217;t really add much additional value for people already familiar with the basics of WP7. Though it should be pointed out that even the first recipes always did something &#8216;cool&#8217; or new in addition to the core topic: most tutorials stop once the basic idea is explained. In chapter 2, for example, an image file is read and subsequently the image is then used as a background image for the app. It&#8217;s a small addition, but it lifts this (and other) recipe to a new, more usable, real-world example instead of a basic tutorial.</p>
<ul>
<li>Chapter 4 is where the fun stuff starts. Here, the Open Data or <strong>OData</strong> protocol is shown. The OData api of Netflix is used to show movie information on the phone; followed by a demonstration of CRUD operations with OData (using the OData.org api as example). <img src="http://timdams.files.wordpress.com/2011/12/120811_1532_learningtoc3.png?w=500" alt="" /></li>
<li>In chapter 5 we meet the new goodie of the Mango phone, being <strong>On-device databases</strong>. Before Mango things like the Sterling NoSql OODB already existed. However, Mango now also provides out-of-the-box local databases which is, in my opinion, a nifty add-on. In this chapter 3 types of local databases are shown, namely: Sql Lite, Sql CE and McObject&#8217;s Perst (never heard of that one before and still not entirely sure why this one was added to the book). Again, this chapter goes further than most tutorials and also shows how to actually create a database using the SQL Management Studio and also import the db in the actual phone project.</li>
<li><strong>REST services</strong> are up in chapter 6. The first recipe shows the classic example of consuming an RSS feed, which basically is a repetition of the XML- chapter 2 with the addition of downloading the XmlString using the WebClient class . After that, the Twitter API is briefly shown and how it can be used to consume any twitter –data you wish. Finally , a simple rest service server is setup using ASP.NET&#8217;s WebMatrix , with the results being streamed in the JSON format and visualized on the phone.</li>
<li>The second to last chapter 7 is titled <strong>WCF</strong>. The author quickly shows how to setup a WCF service, push some real (task) data to the phone and visualize it. Though these first 2 recipes are again pretty much &#8216;standard tutorial stuff&#8217;, the last one goes a step further and uses an actual SQL Server Express database as the services&#8217; datasource. The ADO.NET Entity Framework (EF) is then used as ORM between the DB and the service (including Linq-to-entities) to provide a real-world example, which was pretty sweet to see.</li>
<li>The final chapter (8) is the, meager, icing on the cake: in a few recipes the very basics of building an <strong>MVVM </strong>application is shown. I&#8217;m still looking for the &#8216;ultimate MVVM tutorial for beginners&#8217; and I&#8217;m afraid this one isn&#8217;t a candidate (truth be told: I haven&#8217;t found any candidates so far except for Pete Browns chapter in his Silverlight 4 in Action book). Aside from not being very extensive, the basics are laid out very clearly including how to use Bugnion&#8217;s MVVM Light Toolkit. Unfortunately it would&#8217;ve been cool if the same &#8216;finale&#8217; was given as in the previous chapter (i.e. retrieve the results from a WCF+EF service) as this was the final chapter.</li>
</ul>
<p>Though the book covers a lot of stuff, it only counts a meager 207 pages: compared to Gill Cleeren&#8217;s <a href="http://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book" target="_blank">Silverlight 4 Data Services Cookbook</a>, the biggest &#8216;loss&#8217; of pages is due to the lack of additional information being given. Basically each recipes can be followed but once you want to find out why this or that step actually works the book can&#8217;t help anymore. It&#8217;s also a shame that only the first few pages of code have the most important parts highlighted in bold fonts. By highlighting this code, it easy to quickly see in a big pile of XAML what the essential part is (even more once the boiler-plate code starts becoming repetitive). For some reason, the author stopped doing that after chapter 1.</p>
<p>To conclude; the concept of independent recipes makes it ideal to pick any chapter (or recipe) and start building stuff, without any dependencies on previous chapters or recipes. The downside however is that this also results in lots of identical steps that need to be taken each recipe. For me, this book is ideal in a classroom environment: students can be given a weekly recipe to solve and expand without the need of having made previous recipes.</p>
<p>If the idea of this cookbook is to whet one&#8217;s appetite of what can be done with the new 7.5 Mango Phone, it certainly succeeds . If on the other hand you expect in-depth explanation of one or more related topics, skip this one.</p>
<p>More information on this book can be found on the publisher&#8217;s site: <a title="booksite" href="http://www.packtpub.com/windows-phone-7-5-for-storing-managing-manipulating-data-cookbook/book" target="_blank">here</a></p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/data-binding/'>data binding</a>, <a href='http://timdams.wordpress.com/tag/ebook/'>ebook</a>, <a href='http://timdams.wordpress.com/tag/twitter/'>twitter</a>, <a href='http://timdams.wordpress.com/tag/wp7-2/'>wp7</a>, <a href='http://timdams.wordpress.com/tag/wp7-app-remote-url-caching-webclient/'>wp7 app remote url caching webclient</a>, <a href='http://timdams.wordpress.com/tag/xaml/'>xaml</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/357/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=357&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/12/08/learning-to-cook-with-wp-7-5-data-a-book-review/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/12/120811_1532_learningtoc1.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/12/120811_1532_learningtoc2.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/12/120811_1532_learningtoc3.png" medium="image" />
	</item>
		<item>
		<title>New WP 7.5 ebook review copy arrived</title>
		<link>http://timdams.wordpress.com/2011/12/07/new-wp-7-5-ebook-review-copy-arrived/</link>
		<comments>http://timdams.wordpress.com/2011/12/07/new-wp-7-5-ebook-review-copy-arrived/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 13:52:57 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[Tips_and_tricks]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[data binding]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=348</guid>
		<description><![CDATA[I just received a review copy of a soon to be published book, titled &#8220;Windows Phone 7.5 Data Cookbook&#8221; by Ramesh Thalli from Packt Publishers. I will put up a review of it soon. However, I can already hint, after &#8230; <a href="http://timdams.wordpress.com/2011/12/07/new-wp-7-5-ebook-review-copy-arrived/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=348&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just received a review copy of a soon to be published book, titled &#8220;Windows Phone 7.5 Data Cookbook&#8221; by Ramesh Thalli from Packt Publishers.<a href="http://timdams.files.wordpress.com/2011/12/windows-phone-7-5-data-cookbook.png"><img src="http://timdams.files.wordpress.com/2011/12/windows-phone-7-5-data-cookbook.png?w=500" alt="" title="Windows Phone 7.5 Data Cookbook"   class="alignright size-full wp-image-349" /></a>  I will put up a review of it soon. However, I can already hint, after quickly flicking through the pages, that many who liked its unofficial predecessor &#8220;Silverlight 4 Data Services Cookbook&#8221;  by Gill Cleeren and Kevi Dockx will also like this one a lot. If you can&#8217;t wait for my review, check out a sample chapter (chapter 2 on using Isolated Storage for data storage)  <a href="http://www.packtpub.com/windows-phone-7-5-for-storing-managing-manipulating-data-cookbook/book" title="here" target="_blank">here</a>.</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/book/'>book</a>, <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/data-binding/'>data binding</a>, <a href='http://timdams.wordpress.com/tag/ebook/'>ebook</a>, <a href='http://timdams.wordpress.com/tag/review/'>review</a>, <a href='http://timdams.wordpress.com/tag/tutorial/'>tutorial</a>, <a href='http://timdams.wordpress.com/tag/wp7-2/'>wp7</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/348/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=348&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/12/07/new-wp-7-5-ebook-review-copy-arrived/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/12/windows-phone-7-5-data-cookbook.png" medium="image">
			<media:title type="html">Windows Phone 7.5 Data Cookbook</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a WP7 app: Listbox items of the same width</title>
		<link>http://timdams.wordpress.com/2011/11/30/creating-a-wp7-app-listbox-items-of-the-same-width/</link>
		<comments>http://timdams.wordpress.com/2011/11/30/creating-a-wp7-app-listbox-items-of-the-same-width/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 11:20:18 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips_and_tricks]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[listbox]]></category>
		<category><![CDATA[wp7]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=340</guid>
		<description><![CDATA[I love databound listboxes in WP7. I do. I really do. However, every time I come to the part of making a nice template for each item (i.e. shiny ugly orange border, etc.) I fail in having items of equal &#8230; <a href="http://timdams.wordpress.com/2011/11/30/creating-a-wp7-app-listbox-items-of-the-same-width/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=340&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I love databound listboxes in WP7. I do. I really do. However, every time I come to the part of making a nice template for each item (i.e. shiny ugly orange border, etc.) I fail in having items of equal size. This is usally what I produce:<img src="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi1.png?w=500" alt="" /></p>
<p>Resulting in:</p>
<p><img src="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi2.png?w=500" alt="" /></p>
<p>In WPF, the trick is to set the HorizontalAlignment=&#8221;Stretch&#8221; property of the Listbox. However, apparently there still some internal bug in the ListBox control, which results in the ListBox simply ingoring that setting.</p>
<p>The solution however is, luckily, provided by Microsoft&#8217;s Peter Torr in a reply in <a href="http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/d93281f3-d369-45b9-ae50-ce273941f959">here</a>.<span style="color:green;font-family:Consolas;font-size:12pt;"><br />
</span></p>
<p>By simply adding the ItemContainerStyle as described in the post , to the ListBox we get the result we are looking for:</p>
<p><img src="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi3.png?w=500" alt="" /></p>
<p>Resulting in ..hooray:</p>
<p><img src="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi4.png?w=500" alt="" /></p>
<p><strong>Update:</strong> As Alex Sorokoletov was so kindly to cmment (thanks for that), there&#8217;s even a simplier solution:</p>
<p>&lt;ListBox.ItemContainerStyle&gt;<br />
&lt;Style TargetType=&#8221;ListBoxItem&#8221;&gt;</p>
<p>&lt;Setter Property=&#8221;HorizontalAlignment&#8221; Value=&#8221;Stretch&#8221; /&gt;<br />
&lt;Setter Property=&#8221;HorizontalContentAlignment&#8221; Value=&#8221;Stretch&#8221;/&gt;</p>
<p>&lt;/Style&gt;<br />
&lt;/ListBox.ItemContainerStyle&gt;</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/listbox/'>listbox</a>, <a href='http://timdams.wordpress.com/tag/wp7-2/'>wp7</a>, <a href='http://timdams.wordpress.com/tag/xaml/'>xaml</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/340/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=340&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/11/30/creating-a-wp7-app-listbox-items-of-the-same-width/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi1.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi2.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi3.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/11/113011_1120_wp7listboxi4.png" medium="image" />
	</item>
		<item>
		<title>Strokes: new features have arrived</title>
		<link>http://timdams.wordpress.com/2011/10/04/strokes-new-features-have-arrived/</link>
		<comments>http://timdams.wordpress.com/2011/10/04/strokes-new-features-have-arrived/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 19:19:38 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[Strokes]]></category>
		<category><![CDATA[achievements]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[strokes]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=316</guid>
		<description><![CDATA[The Strokes project is still ongoing and several interesting new features have been added by my Danish friends! For those unfamiliar with this project (have you never read this blog???) , simply put: Strokes a Visual Studio 2010 extension that &#8230; <a href="http://timdams.wordpress.com/2011/10/04/strokes-new-features-have-arrived/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=316&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Strokes project is still ongoing and several interesting new features have been added by my Danish friends! For those unfamiliar with this project (have you never read this blog???) , simply put: Strokes a Visual Studio 2010 extension that allows users to gain achievements while programming. It is mainly targeted to students who are learning C#; however some interest from the development community, especially VB.NET devs, also exists. Read <a href="http://timdams.wordpress.com/2011/08/15/strokes-achievements-while-programming/">this post</a> for a full overview of the project.</p>
<p>The new features that have been added since my last post, in no particular order, are:</p>
<ul>
<li>Achievement tree: It is now possible to define what achievement needs to be unlocked before the user can unlock a particular other achievement. For example, the user can&#8217;t unlock the &#8220;Create a foreach loop&#8221;, if he never ever unlocked the &#8220;create a for loop&#8221;. This allows us to prevent students from accidently unlocking things they never heard of before.</li>
<li>Localization: If anyone ever feels like using the Strokes extension in a particular language/culture, this can now simply be done as the achievement titles and descriptions can now be localized (currently supported languages are : English 100%, Danish 5%, Dutch 5%, Russian 0,01% )</li>
<li>
<div>More than 150 achievements and counting: Currently there are more than 150 achievements defined that the user can unlock. These are categorized in 13 categories. Yours truly is especially having fun in writing achievements in the Funny category (though your definition of what is in fact funny might differ a bit), especially the &#8220;What if Visual Studio had Achievements&#8221; <a href="http://blog.whiletrue.com/2011/01/what-if-visual-studio-had-achievements/">post</a> was a great inspiration.</div>
</li>
</ul>
<div>
<div id="attachment_321" class="wp-caption aligncenter" style="width: 310px"><a href="http://timdams.files.wordpress.com/2011/10/clipboard01.jpg"><img class="size-medium wp-image-321" title="Lots of new achievements and categories." src="http://timdams.files.wordpress.com/2011/10/clipboard01.jpg?w=300&#038;h=210" alt="Many achievments" width="300" height="210" /></a><p class="wp-caption-text">Lots of new achievements and categories.</p></div>
</div>
<p>If you wish to contribute in any which way, don&#8217;t hesitate to contact us on our <a href="https://github.com/jonasswiatek/strokes">github page</a>. Suppose you wish to write achievements, make fancy art, translate stuff, etc. join us and let eternal glory be yours!</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/achievements/'>achievements</a>, <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/strokes/'>strokes</a>, <a href='http://timdams.wordpress.com/tag/visual-studio/'>visual studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=316&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/10/04/strokes-new-features-have-arrived/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/10/clipboard01.jpg?w=300" medium="image">
			<media:title type="html">Lots of new achievements and categories.</media:title>
		</media:content>
	</item>
		<item>
		<title>Brucon: How a security conference appears to an “outsider” and the myths of security</title>
		<link>http://timdams.wordpress.com/2011/09/21/brucon-how-a-security-conference-appears-to-an-%e2%80%9coutsider%e2%80%9d-and-the-myths-of-security/</link>
		<comments>http://timdams.wordpress.com/2011/09/21/brucon-how-a-security-conference-appears-to-an-%e2%80%9coutsider%e2%80%9d-and-the-myths-of-security/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 13:31:08 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[brucon]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=311</guid>
		<description><![CDATA[Yesterday I attended a Belgian Security conference called &#8220;BruCON&#8221;, subtitled &#8220;Hacking for B33R&#8221;. I&#8217;ve always had a large interested in the world of it-security but never really played a part in it. However, I always wanted to see how a &#8230; <a href="http://timdams.wordpress.com/2011/09/21/brucon-how-a-security-conference-appears-to-an-%e2%80%9coutsider%e2%80%9d-and-the-myths-of-security/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=311&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday I attended a Belgian Security conference called &#8220;BruCON&#8221;, subtitled &#8220;Hacking for B33R&#8221;. I&#8217;ve always had a large interested in the world of it-security but never really played a part in it. However, I always wanted to see how a real security conference would be like. Having seen pictures from DefCon and the likes I was more than curious as to what really happens on these kind of conferences. In a previous life I attended several conferences on imaging, video, and the likes, but never one solely devoted to the &#8216;Art of Security&#8217;. In this post I&#8217;ll try to describe what a sec conference feels like to a &#8216;semi-outsider&#8217; like me. Before reading on: if I exaggerate certain things, this is just to make my point.</p>
<p>Oh and I definitely don&#8217;t want to insult anyone, if I do somehow, please excuse me and allow me to rectify this (don&#8217;t start hacking me please <span style="font-family:Wingdings;">J</span> )! I have the greatest respect for the security community…even if they tried to MitM attack me yesterday while I tried to use my Exchange on the conference (or perhaps they even succeeded and now can read all my mail …scary thought <span style="font-family:Wingdings;">J</span> ).<span id="more-311"></span></p>
<h3>&#8220;VulnDev- We say jmp, you ask what addr&#8221;</h3>
<p>My first twit when entering the conference was the following: &#8220;Arrived at #brucon. First sec-conf ever. First impression? Many funny&amp;geeky tshirts&#8221;. About one in 5 or 6 attendees had a t-shirt with a very high geek-measure. Following person for example was seated right in front of me while tweeting the previous:</p>
<p><img src="http://timdams.files.wordpress.com/2011/09/092111_1331_bruconhowas1.jpg?w=500" alt="" /></p>
<p>(<a href="http://twitpic.com/6nh0c9">source</a>)</p>
<p>Every time someone entered the main conference hall I&#8217;d immediately check out their shirts in hopes of reading something funny. The most popular ones were those showing one or several (bash?) commands of some script or contained sql injection statement.</p>
<h3>Appearance if everything</h3>
<p>The average multimedia conference attendee can be summarized as follows:</p>
<ul>
<li>A non-descript, mono color shirt or polo</li>
<li>Black or dark blue costume-like trousers</li>
<li>No additional accessories</li>
</ul>
<p>Some might summarize this simply as &#8220;boring&#8217;. At Brucon we basically see all kinds of people , but this one. I&#8217;ve seen people dressed like hardcore bikers (i.e. people I&#8217;d walk around in a big circle when seen at night in my street *grin ), funny t-shirt ones like I just described. I even saw what I can only describe as &#8221; a Viking-with-a-silly-hat&#8221; a long blond bearded person wearing a funny white, coneshaped hat. I&#8217;ve seen Christ-like figures: unkempt hair, long beards. Tattooed, broad-shouldered , &#8220;don&#8217;t mess with me&#8221;, fellas and good-old costumed security manages. There was one common color however that clearly prevailed and that was black. Perhaps the average security man needs to blend in with the shadows or something when trying to get in or out a system?</p>
<h3>Where&#8217;s Microsoft?</h3>
<p>What was obvious when looking around the conference room was the amount of Macbooks and iPad used by the attendees. I was still under the impression that the &#8220;real ones&#8221; (i.e. hardcore security dudes) all used some pimped up ThinkPad-like laptop with Linux on it. As far as I could see almost all users did indeed toyed around in Linux and I think I saw about 2 people using Windows 7…me and my colleague. This wasn&#8217;t such a surprise… but the usage of Apples was.</p>
<h3>Social paranoia?</h3>
<p>I was always under the impression that social media, twitter in the first place, was a no-go for any self-conscious security man/woman. I thought that the likes of twitter were the devil: the first crack in the layers of defense each security admin closed immediately. I imagined all kinds of neat social engineering tricks one could do by simply reading twits by or communicating with a sec defense administrator. Guess that was a big misunderstanding by yours truly, check out <a href="https://twitter.com/">#brucon</a> on twitter and behold: lots of people, not only the scriptkiddies like me, are regular tweeps.</p>
<h3>Drinking is the devil!</h3>
<p>The &#8220;Drinking for B33R&#8221; was a clear signal that hackers and the likes do like beer indeed. In fact, around 10 in the morning when the first session started and already several people were seen drinking beer. I&#8217;ve been to SPIE conferences, to Tech Days and other IT-savvy conferences and never , ever did I see anyone drink beer. A glass of red wine during lunch or around 4 in the afternoon could be seen from time to time…but beer…in the morning. No never. Did I see drunk people? Not that I could see, so probably the average beer drinker there knew when to stop.</p>
<h3>Discobar in broad daylight</h3>
<p>Upon entering the inter-speaker lounge where all the company booths and catering was housed I first though I had entered in some fancy underground disco. In the back of the room a djay was playing fancy tunes all day long, the room was pretty dark and laserlights swarmed over the walls and everywhere people where chilling on the floor, playing with their laptop or even sleeping, with a beer next to them. This was a really psychedelic vision of which I can&#8217;t say whether this is typical for a sec conference or only for BruCON… However, it really gave the place a very NON-conference feeling hehe.</p>
<h2>In conclusion</h2>
<p>So, these were some of the more poignant features of the BruCON conference. For now I can&#8217;t say if what I say was a &#8216;typical security&#8217; or not. What was clear is that BruCON is a very well-thought of conference: I&#8217;ve seen lots of twits were attendees boasted stuff like &#8216;best conference ever&#8217; etc. So in this sector BruCON is definitely a must-see conference. I had a great time trying to understand all the things the speakers presented and really like the overall vibe of it all: I saw lots of cheerful, happy people discussing all the latest sec trends while drinking beer and trying to win the Hex Factor game. I&#8217;ll definitely attend next year and perhaps buy a tshirt by then to wear there.</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/beer/'>beer</a>, <a href='http://timdams.wordpress.com/tag/brucon/'>brucon</a>, <a href='http://timdams.wordpress.com/tag/security-2/'>security</a>, <a href='http://timdams.wordpress.com/tag/twitter/'>twitter</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/311/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=311&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/09/21/brucon-how-a-security-conference-appears-to-an-%e2%80%9coutsider%e2%80%9d-and-the-myths-of-security/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/09/092111_1331_bruconhowas1.jpg" medium="image" />
	</item>
		<item>
		<title>Strokes: achievements while programming!</title>
		<link>http://timdams.wordpress.com/2011/08/15/strokes-achievements-while-programming/</link>
		<comments>http://timdams.wordpress.com/2011/08/15/strokes-achievements-while-programming/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 09:07:26 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Strokes]]></category>
		<category><![CDATA[achievements]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[strokes]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=265</guid>
		<description><![CDATA[Ok, so I&#8217;ve already hinted about this several posts before: an actual implementation of achievements-based programming in Visual Studio is being made as we speak. In this post I will humbly and proudly present the Strokes program that is rapidly evolving &#8230; <a href="http://timdams.wordpress.com/2011/08/15/strokes-achievements-while-programming/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=265&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, so I&#8217;ve already hinted about this several posts before: an actual implementation of achievements-based programming in Visual Studio is being made as we speak. In this post I will humbly and proudly present the Strokes program that is rapidly evolving into something I&#8217;m eager to use in my own classes. Humbly because the work Jonas Swiatek has done is, in my opinion nearly epic, for each component in the project that I understand, there&#8217;s about 3 others that I don&#8217;t. Proudly because, it being a googlecode project, I in fact have made several small contributions to the project, not in the least dozens of mails in which I describe my ultimate wishes on how the program should behave.<br />
<img class="aligncenter size-full wp-image-279" title="Preview" src="http://timdams.files.wordpress.com/2011/08/title.png?w=500" alt=""   /></p>
<p>Explaining how the whole shebang works internally is not what this post will be about, instead, I&#8217;d like to simply throw around some pretty screenshots and show of the program the way the end-user might see it. Since this program was written to be as extendable as possible, in the end of this post I&#8217;ll give a brief overview on how others can use the Strokes-code to write new achievements.</p>
<p>Before reading on, I&#8217;d like to point out this project is still a work-in-progress. So if you are a) disappointed or b) excited, there&#8217;s 2 things you can do: you can help us out and contribute in any which way you see fit (provide ideas for challenges and achievements, contribute code or art, give basic feedback) or you can simply nod with your head sympathetically, leave and do other things *grin*.</p>
<p>If you want to see how it all works or make some contributions, all information can be found here: <a href="https://github.com/jonasswiatek/strokes">https://github.com/jonasswiatek/strokes</a>. Make sure you read the wiki on how to setup your Visual Studio if you wish to test the current version of the project. And of course, don&#8217;t hesitate to contact us.</p>
<p><strong>Update (24/08): </strong>An early beta can be downloaded of the strokes program so people can test the application themselves. Let us know what you think of it. Download <a href="http://code.google.com/p/strokes/downloads/list" target="_blank">here</a>.<span id="more-265"></span></p>
<h3>How it works</h3>
<p>The Strokes program is basically a Visual Studio 2010 extension (.vsix) that users can simply install without too much hassle. Once this is done, users will see a new menu-item in the Tools-section of Visual Studio:</p>
<p><img class="aligncenter" src="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi1.png?w=500" alt="" /></p>
<p>Voila, the Strokes project! Clicking this item will pop up a summary page where the user can track his or hers current progress. We tried to mimic the Steam-based achievements pages so don&#8217;t sue us for it:</p>
<div id="attachment_273" class="wp-caption aligncenter" style="width: 310px"><a href="http://timdams.files.wordpress.com/2011/08/fullstrokes.png" target="_blank"><img class="size-largewp-image-273" title="fullstrokes_large" src="http://timdams.files.wordpress.com/2011/08/fullstrokes.png?w=300&#038;h=170" alt="" width="300" height="170" /></a><p class="wp-caption-text">Click to enlarge</p></div>
<p>Our achievements are grouped in several categories and users can see which achievements were…uhm …achieved, and which aren&#8217;t. For now, we basically have 2 types of achievements: simple achievements and challenges, but more on those later. At the moment, this is the only screen that shows any interesting stuff. Ultimately the project might go &#8216;in the cloud&#8217; and allow comparison of users and their achievements with leaderboards and other fun stuff.</p>
<p>To unlock achievements, the user simply starts programming and each time a unlockable achievement code construct is written, the achievement is reached. Once the user builds his program successfully, the Strokes program will kick in and check whether any new achievements are in fact achieved. (in the future, I&#8217;d love to be able to have a hierarchy of achievements: preventing users from accidentally unlocking achievements they aren&#8217;t even aware of at the time: imagine a newbie student writing his first program and immediately unlocking the &#8216;make a class&#8217; achievement because basically all programs in C# are a class…)</p>
<p>So suppose the user writes the following, not so, meaningful code:</p>
<p><code>class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
Test t= new Test();<br />
}<br />
}<br />
class Test{}<br />
</code></p>
<p>Once the user builds this program, the following window pop ups in the lower right corner:</p>
<p><img class="aligncenter" src="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi4.png?w=244&#038;h=253" alt="" width="244" height="253" /></p>
<p>Clicking the magnifying icon will highlight the code that actually triggered the achievement, allowing students/users to learn from what they did to earn the achievement:</p>
<p><img class="aligncenter" src="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi5.png?w=430&#038;h=139" alt="" width="430" height="139" /></p>
<p>If the user should now go to his achievement summary page, he&#8217;d see that two achievements were in fact unlocked. At the moment we have around 70 achievements implemented from a list of about 100 achievements. Currently the achievement are very straight-forward ones, mainly meant to show how Strokes works and to be used by beginning programmers. However, the Strokes architecture easily allows to have more complex achievements, more on that later.</p>
<h3>Challenges</h3>
<p>Besides basic achievements (and some silly achievements such as writing an infinite loop), the Strokes project also supports &#8220;Challenges&#8221;. Just like the &#8220;Pex for Fun&#8221; challenges, the Strokes challenges are programming tasks where the user has to write a certain class according to the challenge description. Basically, the user needs to implement the interface of the given challenge and the Strokes program will then test whether the class in fact works as was intended.</p>
<p>As a proof-of-concept, two challenges were defined:</p>
<p><img class="aligncenter" src="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi6.png?w=549&#038;h=133" alt="" width="549" height="133" /></p>
<p>For example with the Calculator challenge, the user basically has to implement the following interface which is defined in the Strokes.Challenges.Student.dll:</p>
<p><code>public interface ICalculator<br />
{<br />
int Add(int a, int b);<br />
int Subtract(int a, int b);<br />
int Multiply(int a, int b);<br />
float Divide(int a, int b);<br />
}<br />
</code></p>
<p>The Strokes program will detect if code is being written against the correct interface and then tests whether the class works as it should be. If it is, the challenge is unlocked.</p>
<h3>Extending the program with achievements</h3>
<p>Easily extending the Strokes program was one of the main goals, as such, developers who wish to write their own achievements or challenges can do so fairly fast. Allow me to show you the code needed to add an achievement that detects if a user has written a while loop:</p>
<div id="attachment_281" class="wp-caption aligncenter" style="width: 310px"><a href="http://timdams.files.wordpress.com/2011/08/achievementcode.png" target="_blank"><img class="size-medium wp-image-281" title="achievementcode" src="http://timdams.files.wordpress.com/2011/08/achievementcode.png?w=300&#038;h=196" alt="" width="300" height="196" /></a><p class="wp-caption-text">Click to enlarge</p></div>
<p>As a developer, you need to write a class that inherits from the NRefactoryAchievement class and you&#8217;re good to go. You then decorate the class with at least 3 attributes containing the Title, Description and Category of the achievement. A 4<sup>th</sup> attribute can be added that contains the URI of the icon the achievement should use in the UI.</p>
<p>Next up, some NRefactory magic (NRefactory is part of the SharpDevelop project which is an opensource C# IDE project, <a href="http://wiki.sharpdevelop.net/NRefactory.ashx">more info</a>) is used allow programmers to simply add code that does all the work <span style="font-family:Wingdings;">J</span></p>
<p>Using the visitor design pattern, you need to override those methods that visit the code construct you are interested in. There&#8217;s about 200 things that NRefactory detects in code being compiled, so you &#8216;simply&#8217; need to know which one(s) you need for a given achievements. For users, like me, not familiar with NRefactory, simply checking what methods can be overridden is an eye-opener and should get you started.</p>
<p>Once you detected where the achievements is unlocked, you need to call the UnlockWith() method an pass the statement that contains the code that unlocks it. This will prompt the Strokes program to award the achievement to the user.</p>
<h3>Extending the program with challenges</h3>
<p>Writing challenges is equally straightforward. Three steps need to be done:</p>
<p>1° Define a new achievement class, but now one that inherits from the challenge class:</p>
<p><a href="http://timdams.files.wordpress.com/2011/08/challengeachievement.png"><img class="aligncenter size-full wp-image-284" title="challengeachievement" src="http://timdams.files.wordpress.com/2011/08/challengeachievement.png?w=500" alt=""   /></a></p>
<p>The Strokes.Challenges.Student.CalculatorTest is the class in Strokes.Challenges.Student that can test the challenge implementation.</p>
<p>2° Write any interfaces the user needs to implement, such as the previously shown ICalculator class.</p>
<p>3° Write the CalculatorTest class, that inherits from the AbstractChallengeTester class, which tests if the challenge works as needed, if it does, true is returned:</p>
<p><a href="http://timdams.files.wordpress.com/2011/08/challengetest.png"><img class="aligncenter size-full wp-image-286" title="challengetest" src="http://timdams.files.wordpress.com/2011/08/challengetest.png?w=500" alt=""   /></a></p>
<p>Where achievements are, just as in games, a fun extra aspect of a learning process (and way of encouraging games/students to explore more of the game) , the challenges are in fact the real &#8216;learning aspect&#8217;. By introducing challenges as a teacher you can have the equivalent of boss fights. Only if the challenge is completed will the user be able to advance (and e.g. have new achievements and challenges to unlock). Compare it to a mor fun &#8216;practical test&#8217; where not the coding style itself is important, but only the actual implementation. Make note that challenges in no way should be used as a substitute for real tests (nothing prevents users from &#8216;cheating&#8217; in challenges by simply hardcoding those parts that are hard to write in a logical manner).</p>
<h3>In conclusion</h3>
<p>Okay, so that&#8217;s what the Strokes project is about. If you&#8217;re stoked and excited as I am about this project, feel free to contact us for more information. If all goes well I&#8217;m going to do a first trial test of the project with my first year student this autumn. I&#8217;m really looking forward to how the students will reacts to this.</p>
<p>We are still developing the project so new achievements and challenges will see the daylight the coming weeks/months. I&#8217;ll soon put up a list of the current achievements that are implemented in the project so others can be inspired by this and feed us new achievement ideas.</p>
<p><strong>Update remark: </strong>the original conceptual ideas of this program are discussed in earlier posts [<a title="“World of C#-craft”: an achievement-based classroom?" href="http://timdams.wordpress.com/2011/05/17/world-of-c-craft-an-achievement-based-classroom-2/">Part1</a>, <a title="World of C#-craft part 2: what does the audience think?" href="http://timdams.wordpress.com/2011/05/31/world-of-c-craft-part-2-what-does-the-audience-think/">Part 2</a>, <a title="“World of C#-craft” part 3: other sources for inspiration as an interlude to Strokes" href="http://timdams.wordpress.com/2011/07/12/%e2%80%9cworld-of-c-craft%e2%80%9d-part-3-other-sources-for-inspiration-as-an-interlude-to-strokes/">Part 3</a>].</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/achievements/'>achievements</a>, <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/strokes/'>strokes</a>, <a href='http://timdams.wordpress.com/tag/visual-studio/'>visual studio</a>, <a href='http://timdams.wordpress.com/tag/wpf/'>wpf</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/265/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=265&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/08/15/strokes-achievements-while-programming/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/08/title.png" medium="image">
			<media:title type="html">Preview</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi1.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/08/fullstrokes.png?w=300" medium="image">
			<media:title type="html">fullstrokes_large</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi4.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi5.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/08/081211_1316_strokesachi6.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/08/achievementcode.png?w=300" medium="image">
			<media:title type="html">achievementcode</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/08/challengeachievement.png" medium="image">
			<media:title type="html">challengeachievement</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/08/challengetest.png" medium="image">
			<media:title type="html">challengetest</media:title>
		</media:content>
	</item>
		<item>
		<title>“World of C#-craft” part 3: other sources for inspiration as an interlude to Strokes</title>
		<link>http://timdams.wordpress.com/2011/07/12/%e2%80%9cworld-of-c-craft%e2%80%9d-part-3-other-sources-for-inspiration-as-an-interlude-to-strokes/</link>
		<comments>http://timdams.wordpress.com/2011/07/12/%e2%80%9cworld-of-c-craft%e2%80%9d-part-3-other-sources-for-inspiration-as-an-interlude-to-strokes/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 10:29:54 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[achievements]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[strokes]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=251</guid>
		<description><![CDATA[A lot has happened since I wrote on my dream of teaching C# using a system where my students could earn achievements (previous parts: Part 1 intro, Part 2 survey). In fact, my dream is actually nearing completing thanks to &#8230; <a href="http://timdams.wordpress.com/2011/07/12/%e2%80%9cworld-of-c-craft%e2%80%9d-part-3-other-sources-for-inspiration-as-an-interlude-to-strokes/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=251&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A lot has happened since I wrote on my dream of teaching C# using a system where my students could earn achievements (previous parts: <a href="http://timdams.wordpress.com/2011/05/17/world-of-c-craft-an-achievement-based-classroom-2/">Part 1 intro</a>, <a href="http://timdams.wordpress.com/2011/05/31/world-of-c-craft-part-2-what-does-the-audience-think/">Part 2 survey</a>). In fact, my dream is actually nearing completing thanks to the hard work of Jonas Swiatek who is building exactly what I need, with a little help of myself. In a next post I&#8217;ll give a full overview of what this is (if you&#8217;re anxious to find out, go check out the <a href="http://strokes.googlecode.com">Strokes Project on googlecode</a>). Expect this review in a couple of weeks. Consider this post an interlude to the post where I present the Strokes project!
</p>
<p>So, in the meantime, allow me to quickly summarize what other projects and sources currently exists (besides the earlier mentioned Ribbon Hero) and which can be used as inspiration both for the Strokes project and for others going the same &#8216;achievement-based&#8217; learning path. Oh yeah, and if you think that Negative Achievements don&#8217;t exist, think again and check out <a href="http://www.gamasutra.com/view/news/34821/Feature_Five_More_Ways_To_Design_Effective_Achievements_.php">part 3</a> of the excellent &#8220;The cake is not a lie&#8221; articles. Speaking of lying cakes, you definitely should check out <a href="http://www.awkwardzombie.com/index.php?page=0&amp;comic=052311">this comic</a> on achievements and portal 2 (click image for the full comic)!
</p>
<p><a href="http://www.awkwardzombie.com/index.php?page=0&amp;comic=052311"><img src="http://timdams.files.wordpress.com/2011/07/071211_1029_worldofccr1.png?w=500" alt="" border="0" /></a>
	</p>
<p>One of the original projects that should be a must-see for anyone seriously thinking about teaching a programming language is the <a href="http://www.pexforfun.com/">PexForFun</a> project by Microsoft Research. This, free to use, project is a series of programming challenges (C#, F# and VB) both extremely easy and stupidly hard to solve. Users can randomly start a challenge or, more wisely, solve them in order. Basically the user is presented an in-browser code editor with per challenge a few lines of code and usually a title that hints to what needs to be done. The nice thing is that no additional help is given. Instead, the user simply needs to guess what needs to be done by adding some code and then hit the &#8216;Ask Pex!&#8217; button which will results in the current code being compiled and tested for correctness of the challenge, followed by feedback of why the current test failed. So bit by bit you, usually, get closer to the solution and in the meantime hone your algorithmic thinking skills. If you are on the road, PexForFun also has an excellent Windows Phone 7 application that does exactly the same, but on a way smaller screen (<a href="http://www.thinq.co.uk/2011/3/13/pex4fun-teaches-coding-through-your-smartphone/">more info</a>). Though PexForFun won&#8217;t win any prizes in the looks department, it is definitely worthwhile to check out.
</p>
<p>
&nbsp;</p>
<p><img src="http://timdams.files.wordpress.com/2011/07/071211_1029_worldofccr2.png?w=500" alt="" />
	</p>
<p>What will win prizes in the looks department is <a href="https://plugins.atlassian.com/plugin/details/42092">Jira Hero</a>. This plugin for Jira , a bug tracker, does exactly what we are aiming for in the Strokes project: achievement-based learning with an online part that allows users to compare each other&#8217;s progress. The user, in a playable manner, learns how to use the Jira systems and earns badges by performing specific tasks. Leaderboards allows a user to see his progress compared to other user. The project ended on third place in a plugin programming contest, <a href="http://codegeist.atlassian.com/">Codegeist V</a>, by Attlasian, the makers of Jira. Even if you&#8217;re not into Jira, check out the postmortem of the Jira Hero project <a href="http://www.madgnome.fr/2011/06/postmortem/">here</a>.
</p>
<p><a href="http://www.madgnome.fr/wp-content/uploads/2011/06/presentation_screenshoot_wide1.jpg" title="&quot;presentation_screenshoot_wide&quot;"><img src="http://timdams.files.wordpress.com/2011/07/071211_1029_worldofccr3.jpg?w=500" alt="" border="0" /></a>
	</p>
<p>A <a href="http://www.csharpcity.com/research/game-design-patterns-and-achievements/">small blogpost</a> with not much additional information but a brief paper (that&#8217;s not very exhaustive in my opinion) describes commonly used game mechanics. This particular posts is on achievements, more posts are promised but to be honest, don&#8217;t way for them because it appears that the author(s) have moved on to other interests, still, check out the paper for some inspiration <a href="http://www.csharpcity.com/wp-content/plugins/download-monitor/download.php?id=8">here</a>.
</p>
<p>For real, scientifically backed, inspiration and papers,  several high-ranked journals exists:
</p>
<ul>
<li>Wiley&#8217;s &#8220;Journal of Computer Assisted Learning&#8221; (<a href="http://www.wiley.com/bw/journal.asp?ref=0266-4909&amp;site=1">link</a>)
</li>
<li>Elseviers &#8220;Computers &amp; Education – An International Journal&#8221; (<a href="http://www.elsevier.com/wps/find/journaldescription.cws_home/347/description">link</a>)
</li>
<li>&#8220;Journal of Educational Technology &amp; Society&#8221; (<a href="http://www.ifets.info/">link</a>)
</li>
<li>&#8220;Journal of Research on Technology in Education&#8221; (<a href="http://www.iste.org/learn/publications/journals/jrte-old.aspx">link</a>)
</li>
</ul>
<p>Many other journals in fact exists which sometimes focus on parts of game-based learning but the aforementioned can be considered, in my opinion, to be prime resources. For a complete listing of what is out there, and more, check out the following <a href="http://www.educational-software-directory.net/publications/journals">site</a> (WARNING: contains a lot of adds!).
</p>
<p><span style="color:#1f497d;"><br />
		</span>&nbsp;</p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/achievements/'>achievements</a>, <a href='http://timdams.wordpress.com/tag/gaming/'>gaming</a>, <a href='http://timdams.wordpress.com/tag/strokes/'>strokes</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=251&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/07/12/%e2%80%9cworld-of-c-craft%e2%80%9d-part-3-other-sources-for-inspiration-as-an-interlude-to-strokes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/07/071211_1029_worldofccr1.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/07/071211_1029_worldofccr2.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/07/071211_1029_worldofccr3.jpg" medium="image" />
	</item>
		<item>
		<title>Creating a WP7 app: Supporting dark and light themes</title>
		<link>http://timdams.wordpress.com/2011/06/21/creating-a-wp7-app-supporting-dark-and-light-themes/</link>
		<comments>http://timdams.wordpress.com/2011/06/21/creating-a-wp7-app-supporting-dark-and-light-themes/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 13:34:02 +0000</pubDate>
		<dc:creator>timdams</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight/WPF]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[wp7]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://timdams.wordpress.com/?p=213</guid>
		<description><![CDATA[In this post I will show how to create an application that supports both the dark and the light themes, without the hassle of creating two sets of images, icons or styles. This post is part of a series of &#8230; <a href="http://timdams.wordpress.com/2011/06/21/creating-a-wp7-app-supporting-dark-and-light-themes/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=213&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I will show how to create an application that supports both the dark and the light themes, without the hassle of creating two sets of images, icons or styles.</p>
<p>This post is part of a series of posts I&#8217;ve planned on my findings while writing a windows phone 7 application (see the previous post, on the problem of caching urls, <a href="http://timdams.wordpress.com/2011/06/17/creating-a-wp-7-app-caching-urls/">here</a>).<br />
<span id="more-213"></span></p>
<h3>Colors and themes</h3>
<p>Owners of a WP7 device can choose whether they have a dark theme of a light theme while using the phone. Users can change this anytime they feel like it. As a WP7 developer your application will need to take into account that both themes can be active. In this post I will only concentrate on the background color which can be dark or light, and ignore the accent color.</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp13.png?w=500" alt="" /><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp21.png?w=500" alt="" /><br />
When your application starts up, the current active theme will influence the way your application looks. That is, as long as you haven&#8217;t explicitly defined certain styles and colors, all the standard WP7 controls will show up in a correct manner. Let&#8217;s see how this works. Suppose your extremely cool and intuitive application has a nice shiny button such as this:<br />
<code>&lt;Button Content="Shiny"/&gt; </code><br />
The button will have a look dependent of what theme is being used (note that the accent color of the theme doesn&#8217;t matter here). So if we run our application we will see the following buttons:</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp31.png?w=500" alt="" /><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp41.png?w=500" alt="" /></p>
<p>When the dark theme(left image) is active our button, and all other standards controls, will automatically have a black background and white foreground brush. However, when the light theme is active, what WP7 basically does is switch the Foreground and the Background property of all controls, as long as they&#8217;re not defined explicitly.</p>
<p>The moment however, you define a specific color for a control, WP7 won&#8217;t help you with switching colors anymore and making sure your controls will look ok in the active image.<br />
Imagine a fancy yellow button:<br />
<code>&lt;Button Content="Shiny" Background="Yellow"/&gt;</code></p>
<p>Testing this button in the white theme gives pleasant results (make note: I&#8217;m not designer, I&#8217;m already happy if my color schemes don&#8217;t induce a headache within 5 minutes):</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp51.png?w=500" alt="" /></p>
<p>Now let&#8217;s see how this looks like in the dark theme:</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp61.png?w=500" alt="" /></p>
<p>Ugh..My eyes! What happens is, since we didn&#8217;t define the Foreground explicitly (which the text and border in the button uses) the black borders and black content were switched, but the yellow background was not. Still, ugly or not, the button is still sort of useable.</p>
<p>However, suppose you really need your button to have a specific color…for example white.<br />
<code>&lt;Button Content="Shiny" Background="White" Button&gt;</code><br />
Let&#8217;s see what this looks like in the both themes:</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp71.png?w=500" alt="" /><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp81.png?w=500" alt="" /></p>
<p>Yippie, we made a white rectangle!</p>
<p>Anyhow, you get the point. In summary: If you are planning on playing with colors, you better be prepared to write two different styles that will vary according to the theme being is. Let&#8217;s see how we can cope with the fact that your phone can have a dark and light theme.</p>
<h3>Detecting the theme</h3>
<p>To know which theme is active I&#8217;ve seen several tricks (old-school style is apparently by looking at the current RGB values of the fore-or background brush) but in my opinion, the following is the most straightforward (see <a href="http://msdn.microsoft.com/en-us/library/ff769552(v=vs.92).aspx">here</a> for a list of all predefined theme resources):</p>
<p><code>bool dark= ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)</code></p>
<p>We can simply check whether the PhoneDarkThemeVisibility is Visible or not (the &#8220;PhoneLightTheme&#8221; that also exist will have the opposite value). If it is, we now what the current theme is. We can do 2 things, depending on the type of buttons being used,:</p>
<ul>
<li>Load in a new style for your controls.</li>
<li>Work with images that replace the back-and foreground of the buttons.</li>
</ul>
<h3>Load new style</h3>
<p>A lot has been written on how to change the theme of your controls at runtime, so in summary what needs to be done is something along the lines of:</p>
<ol>
<li>Create 2 brushes or styles, one for each theme, and place them in your application resources (App.xaml file)</li>
<li>
<div>When you need to change to the other theme, remove the current brush or style from your application, e.g.:</div>
<p><code>App.Current.Resources.Remove("MyCurrentTheme");<br />
</code></li>
<li>
<div>Insert the other brush or theme in your application, e.g.:</div>
<p><code>App.Current.Resource.Add("MyCurrentTheme", mydarkTheme)<br />
</code></li>
</ol>
<h3>Images and themes</h3>
<p>The problem described earlier with buttons looking like ugly betty also applies to images. Suppose you created a nice transparent image to be used in your button:</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp91.png?w=500" alt="" /></p>
<p>The black part of the image is transparent. Using this button in the dark theme gives pleasant results:</p>
<p><code>&lt;Button&gt;<br />
<img alt="" />component/home_white.png"&gt;<br />
&lt;/Button&gt;<br />
</code></p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp101.png?w=500" alt="" /></p>
<p>In fact, thanks to the transparency, we can do fun stuff like:</p>
<p><code> &lt;Button Background="Green"&gt;<br />
<img alt="" />component/home_white.png"&gt;<br />
&lt;/Button&gt;<br />
</code></p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp111.png?w=500" alt="" /></p>
<p>However, if we don&#8217;t explicitly defined a background (why should you? Remember, Metro design is all about no chrome and other silly non-usable UI changes…check out your iPhone or Android to see what I mean :p ) and then switch themes, we again have created a very white rectangle:</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp121.png?w=500" alt="" /></p>
<p>We can solve this problem in 2 ways:</p>
<ol>
<li>Have a different set of images for both themes</li>
<li>Have one set, but toy around with transparency</li>
</ol>
<h3>Image sets</h3>
<p>Having two sets of image has the benefit of knowing exactly what each button (or control) will look like in each theme. The drawback is that every time you change one image, you also have to change the other one.Still, from time to time this is how things go. To work with image sets, the most straightforward solution , a variation from <a href="http://blog.jayway.com/2010/12/16/theme-aware-panorama-background-in-windows-phone-7/">here</a>, goes as follows:</p>
<ol>
<li>Create 2 sets of images and include both as assets, content or resources to your solutions. Keep all names the same, but only change the folder in which they reside (e.g. &#8220;buttons/dark/&#8221; and &#8220;buttons/light&#8221;).</li>
<li>When initializing the page or application, query the phone which theme is used. (see earlier).</li>
<li>Load in the correct set of images</li>
</ol>
<p>How to do this in practice? Suppose we defined a button somewhere in our UI as follows:</p>
<p><code>&lt;Button &gt;<br />
&lt;Image x:Name="btnImage" &gt;&lt;/Image&gt;<br />
&lt;/Button&gt;<br />
</code></p>
<p>Following code, which can be placed in the constructor of the page can then be:</p>
<p><code>Uri uri;<br />
if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)<br />
uri = new Uri("/buttons/dark/home.png", UriKind.Relative);<br />
else<br />
uri = new Uri("/buttons/light/home.png", UriKind.Relative);<br />
btnImage.Source= new BitmapImage(uri) ;<br />
</code></p>
<p>Note that we could also easily refactor this code in order to define both folderlocations-strings (&#8220;button/dark/&#8221; and &#8220;button/light/&#8221;) elsewhere and only have to write the filename once (&#8220;home.png&#8221;);</p>
<h3>One image set, changing transparency</h3>
<p>For those among us, like me, who don&#8217;t really like to toy around in image, a third option exists to solve the changing themes problem, explained <a href="http://unknowndev.com/post/1344864854/changing-an-image-color-at-runtime">here</a> and <a href="http://stackoverflow.com/questions/3919882/how-do-i-use-the-icons-provided-with-the-wp7-sdk-properly">here</a> (first answer). This solution, which I prefer above the ones explained earlier, goes as follows:</p>
<ol>
<li>Create a single set of black/white images</li>
<li>Implement a style which changes the black/white colors of the images according to the active theme (in practice: change the active transparency from black to white or vice versa)</li>
<li>Apply the style to all controls</li>
</ol>
<p>The drawback of this method is that it only gives nice results for binary colored colored images. I suppose with a bit of extra coding this recipe can also be applied to other types of images, but it won&#8217;t be as straightforward.</p>
<p>In practice, 2 things are needed:</p>
<p>First , a new style is created which can then be applied to any button in the application. In short (full version <a href="http://stackoverflow.com/questions/3919882/how-do-i-use-the-icons-provided-with-the-wp7-sdk-properly">here</a>):</p>
<p><code>&lt;phone:PhoneApplicationPage.Resources&gt;<br />
&lt;Style x:Key="IconButton" TargetType="Button"&gt;<br />
&lt;Setter Property="Background" Value="Transparent"/&gt;<br />
&lt;Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/&gt;<br />
&lt;Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/&gt;<br />
&lt;Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/&gt;<br />
&lt;Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/&gt;<br />
&lt;Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/&gt;<br />
&lt;Setter Property="Padding" Value="10,3,10,5"/&gt;<br />
&lt;Setter Property="Template"&gt;<br />
&lt;Setter.Value&gt;<br />
&lt;ControlTemplate TargetType="Button"&gt;<br />
&lt;Grid Background="Transparent"&gt;<br />
&lt;VisualStateManager.VisualStateGroups&gt;<br />
………….<br />
&lt;/VisualStateManager.VisualStateGroups&gt;<br />
&lt;Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}"&gt;<br />
&lt;Grid x:Name="ContentContainer" OpacityMask="{TemplateBinding Content}" Background="{TemplateBinding Foreground}"/&gt;<br />
&lt;/Border&gt;<br />
&lt;/Grid&gt;<br />
&lt;/ControlTemplate&gt;<br />
&lt;/Setter.Value&gt;<br />
&lt;/Setter&gt;<br />
&lt;/Style&gt;<br />
</code></p>
<p>For now, let us zoom in on the main &#8216;trick&#8217; in the style:</p>
<p><code>&lt;Grid x:Name="ContentContainer" OpacityMask="{TemplateBinding Content}" Background="{TemplateBinding Foreground}"/&gt;<br />
</code></p>
<p>What we created here is basically a new type of Button which uses an ImageBrush as its content, containing the image we want to be shown on the button. However, the style will make sure that we use an alphamask that uses the image as the mask (so make sure your image actually has an alpha channel; Tip: use PNG!). By setting the background color to the current Foreground color (dependent of the theme chosen) we make sure that the non-transparent portion of the image will have the correct color (what simply happens is that we &#8216;cut out&#8217; the image from the foreground, using the alphamask).</p>
<p>All that remains now is applying this style to our controls (buttons in this example):</p>
<p><code>&lt;Button Style="{StaticResource IconButton}" &gt;<br />
&lt;ImageBrush ImageSource="/icons/home.png"&gt;<br />
&lt;/Button&gt;<br />
</code></p>
<p>If we now test our application we see that the button shows correctly, independent of the active theme. The picture on the left shows the dark theme:</p>
<p><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp131.png?w=500" alt="" /><img src="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp14.png?w=500" alt="" /></p>
<br /> Tagged: <a href='http://timdams.wordpress.com/tag/c-2/'>c#</a>, <a href='http://timdams.wordpress.com/tag/code/'>code</a>, <a href='http://timdams.wordpress.com/tag/silverlight-2/'>silverlight</a>, <a href='http://timdams.wordpress.com/tag/ui/'>UI</a>, <a href='http://timdams.wordpress.com/tag/wp7-2/'>wp7</a>, <a href='http://timdams.wordpress.com/tag/xaml/'>xaml</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timdams.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timdams.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timdams.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timdams.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timdams.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timdams.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timdams.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timdams.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timdams.wordpress.com&amp;blog=13387592&amp;post=213&amp;subd=timdams&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timdams.wordpress.com/2011/06/21/creating-a-wp7-app-supporting-dark-and-light-themes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/322ee67e47b4c8961d361960834f83e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timdams</media:title>
		</media:content>

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp13.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp21.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp31.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp41.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp51.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp61.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp71.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp81.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp91.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp101.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp111.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp121.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp131.png" medium="image" />

		<media:content url="http://timdams.files.wordpress.com/2011/06/062111_1333_creatingawp14.png" medium="image" />
	</item>
	</channel>
</rss>
