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

<channel>
	<title>Timmy Kokke</title>
	<atom:link href="http://www.timmykokke.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.timmykokke.com</link>
	<description>Silverlight and Expression Blend</description>
	<lastBuildDate>Tue, 24 Jan 2012 15:15:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setting visibility based on wp7 themes</title>
		<link>http://www.timmykokke.com/2012/01/setting-visibility-based-on-wp7-themes/</link>
		<comments>http://www.timmykokke.com/2012/01/setting-visibility-based-on-wp7-themes/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 20:18:52 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/?p=591</guid>
		<description><![CDATA[Intro The Technical Certification Requirements for Windows Phone 7 applications state the following: 5.5.2 – Content and Themes Application content, such as text and visual elements, must be visible and legible regardless of the phone theme. For example, if the phone theme changes from black background to white background, the text and visual elements of [...]]]></description>
			<content:encoded><![CDATA[<h2>Intro</h2>
<p>The <a href="http://msdn.microsoft.com/en-us/library/hh184840(v=vs.92).aspx" target="_blank">Technical Certification Requirements</a> for Windows Phone 7 applications state the following: </p>
<blockquote><p><strong>5.5.2 – Content and Themes</strong></p>
<p>Application content, such as text and visual elements, must be visible and legible regardless of the phone theme. For example, if the phone theme changes from black background to white background, the text and visual elements of your application must be visible or legible.</p>
</blockquote>
<p>This means that everything in you application, including images, should be well visible in the dark and light theming of the phone. Handling dark/light support is very easy.</p>
<h2>Dark and Light</h2>
<p>Often companies have a special version of their logos for different situations (Bing for example). For this demo I’ve created two logos, a black and a white one. The white logo should be used when the theme is set to dark, the other when a light theme has been selected. </p>
<p><a href="http://www.timmykokke.com/Make_F546/Logo-White.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Logo-White" border="0" alt="Logo-White" src="http://www.timmykokke.com/Make_F546/Logo-White_thumb.png" width="450" height="141" /></a><a href="http://www.timmykokke.com/Make_F546/Logo-Black.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Logo-Black" border="0" alt="Logo-Black" src="http://www.timmykokke.com/Make_F546/Logo-Black_thumb.png" width="450" height="141" /></a></p>
<p>I’ve dropped these images into Expression Blend and grouped them together in a Grid control (<em>Ctrl+G </em>). This grid is placed in the title panel, which resulted in the following XAML:</p>
<pre class="brush:[xml]">&lt;StackPanel x:Name=&quot;TitlePanel&quot; Grid.Row=&quot;0&quot;&gt;
    &lt;Grid&gt;
        &lt;Image Source=&quot;Logo-Black.png&quot; /&gt;
        &lt;Image Source=&quot;Logo-White.png&quot; /&gt;
    &lt;/Grid&gt;
&lt;/StackPanel&gt; </pre>
<p>To get the white logo to be only visible when the dark theme is set, select the image of the white logo. With the image selected click on the “Advanced options”-peg:</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.timmykokke.com/Make_F546/image.png" width="472" height="226" /></p>
<p>Now, go to “System Resource” and select the “PhoneDarkThemeVisibility” resource.</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.timmykokke.com/Make_F546/image_3.png" width="471" height="369" /></p>
<p>At this point a green rectangle is placed around the visibility property of the images letting you know a resource is set on that property. </p>
<p>To get the same results for the dark logo, repeat the process on that images. But select the “PhoneLightThemeVisibility” instead. </p>
<h2>Testing</h2>
<p>To test the results right in Expression Blend, got to the “Device” tab. On this tab you can set different device settings, including the Accent Color and the Light or Dark themes.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.timmykokke.com/Make_F546/image_4.png" width="449" height="147" /></p>
<p>Switching from dark to light and back should result in the images below. </p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.timmykokke.com/Make_F546/image_5.png" width="552" height="490" /></p>
<h2>Wrap-up</h2>
<p>Setting the visibility like this can be done on every element in your XAML. And whenever you need to use the visibility for other purposes, there’s a similar resource for the Opacity. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2012/01/setting-visibility-based-on-wp7-themes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>metro colors for photoshop</title>
		<link>http://www.timmykokke.com/2012/01/metro-colors-for-photoshop/</link>
		<comments>http://www.timmykokke.com/2012/01/metro-colors-for-photoshop/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 20:23:35 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/?p=588</guid>
		<description><![CDATA[I did some designing for a Windows Phone 7 App this week. I wanted to test some graphics using the accent colors. I’ve saved the color swatches I use. If you’re using Photoshop or Illustrator and would like to use them too, you can download them here: Metro Color Swatches]]></description>
			<content:encoded><![CDATA[<p>I did some designing for a Windows Phone 7 App this week. I wanted to test some graphics using the accent colors. I’ve saved the color swatches I use.</p>
<p>If you’re using Photoshop or Illustrator and would like to use them too, you can download them here: </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:2cb3a89e-306b-4ce6-b66c-1d186f3c3e63" class="wlWriterEditableSmartContent">
<p> <a href="http://www.timmykokke.com/metro-colors-for-photoshop_128B0/MetroColors.ase" target="_blank">Metro Color Swatches</a></p>
</div>
<p><a href="http://www.timmykokke.com/metro-colors-for-photoshop_128B0/image.png"><img style="background-image: none; border-right-width: 0px; margin: 7px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="http://www.timmykokke.com/metro-colors-for-photoshop_128B0/image_thumb.png" width="240" height="92" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2012/01/metro-colors-for-photoshop/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 app &#8211; New Kids Button</title>
		<link>http://www.timmykokke.com/2011/10/windows-phone-7-app-new-kids-button/</link>
		<comments>http://www.timmykokke.com/2011/10/windows-phone-7-app-new-kids-button/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 19:17:25 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[WP7]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/2011/10/windows-phone-7-app-new-kids-button/</guid>
		<description><![CDATA[Today my new app was published to the Windows Phone Marketplace. The application shows a big red button. When this button is pressed a quote from the movie and TV series of New Kids is played. In this I application I wanted to try a few things. First, I wanted to see how to create [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/10/Screenshot1.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 12px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screenshot1" border="0" alt="Screenshot1" align="left" src="http://www.timmykokke.com/wp-content/uploads/2011/10/Screenshot1_thumb.png" width="227" height="379" /></a>Today my new app was published to the Windows Phone Marketplace. The application shows a big red button. When this button is pressed a quote from the movie and TV series of <a href="http://www.imdb.com/title/tt2043932/" target="_blank">New Kids</a> is played.</p>
<p>In this I application I wanted to try a few things. First, I wanted to see how to create a trial version of an application with possibilities to buy the app. Next I added a couple of behaviors to make it very easy to share a link to the application in various ways. The main goal of all these is ease of use for the developer and reusable. For example, a lot of times you’ll need a link to the marketplace, navigate to a URL or let the enduser write a review. </p>
<p>Another thing I would like to build is a localized app. The first version of this app is in Dutch only. I’m working on the German version. There will be an English version too, although this will contain the Dutch quotes. </p>
<h1>Trial version</h1>
<p>For the trial version of the application I wanted to show a MassageBox after a few taps on the button. The MessageBox should have a link to the marketplace to directly buy the app.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/10/image.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.timmykokke.com/wp-content/uploads/2011/10/image_thumb.png" width="289" height="163" /></a></p>
<blockquote><p>“You are using the trial version of the New Kids Button application. The full version contains more quotes! </p>
<p>[Buy now] [Continue trial]”</p>
</blockquote>
<p>Another thing that I’ve added is a behavior that sets the visibility of the element it is applied to based on whether the application is running in trial mode or not. </p>
<h1></h1>
<h1>Other behaviors</h1>
<p>The first behavior continues a bit on the trial version. The behavior is used to navigate to the details of the application in the marketplace. All you need to do is place this on a button and it’s ready to go. </p>
<p>Because getting people to review your application is crucial to a successful app you’ll need to fire up the review task somehow. One behavior in this application does just that. Attach it to a button and it opens the review screen when it is pressed.</p>
<p>Sending an email from the application needs to done quite often too. A behavior that fires up the email task&#160; is used in the app. You can set the body, subject and addressee of the email.</p>
<p>Another behavior takes a URL as a parameter. When it is placed on a button it can be used to open a browser windows and show that URL.</p>
<p>The last one is my personal favorite. Sharing a link to your app on a social network is a great way to promote your application. This behavior uses the <a href="http://sharethis.com/" target="_blank">ShareThis</a> API to share a link on a lot of different networks.&#160; </p>
<p>You can download this behavior here: <a href="https://skydrive.live.com/?cid=3bfc746510bc922d&amp;sc=documents&amp;uc=1&amp;id=3BFC746510BC922D%21571#" target="_blank">TimmyTools.Wp7.Behaviors.zip</a></p>
<h1>A few other links</h1>
<p>Link to the app in the marketplace : <a href="http://timmykokke.com/NewKidsApp">http://timmykokke.com/NewKidsApp</a></p>
<p>Twitter: <a href="http://twitter.com/NewKidsApp" target="_blank">@NewKidsApp</a></p>
<p>Email: <a href="mailto:NewKidsApp@hotmail.com">NewKidsApp@hotmail.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/10/windows-phone-7-app-new-kids-button/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Discovering Expression Blend 5 &#8211; ListView</title>
		<link>http://www.timmykokke.com/2011/09/discovering-expression-blend-5-listview/</link>
		<comments>http://www.timmykokke.com/2011/09/discovering-expression-blend-5-listview/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 22:19:01 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[dotnetmag]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/?p=504</guid>
		<description><![CDATA[Often you need to display a list of items in a application. The Windows Library for JavaScript contains a ListView control for you to use in your applications. The control can be bound to a data source and templated from HTML. Getting started We’ll start off by creating a new project and choosing the Fixed [...]]]></description>
			<content:encoded><![CDATA[<p>Often you need to display a list of items in a application. The Windows Library for JavaScript contains a ListView control for you to use in your applications. The control can be bound to a data source and templated from HTML.</p>
<h1>Getting started</h1>
<p>We’ll start off by creating a new project and choosing the <em>Fixed Layout Application</em> project template.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image29.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb15.png" alt="image" width="400" height="341" border="0" /></a></p>
<p>As you can see, the template has added a paragraph (<em>p</em>) to the tree which contains some text. You can use that to place the title of your application. The ListView is going to be in the same <em>div</em> as that paragraph.</p>
<p>You can add the ListView by hand, typing the HTML, but I personally prefer dragging and dropping controls onto the designer. Select the parent <em>div</em> of the paragraph.  <img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image30.png" alt="image" width="279" height="212" border="0" /></p>
<p>Type <strong>ListView</strong> in the search box of the <em>Assets</em> panel and drag the result from the list to the design surface.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image31.png" alt="image" width="296" height="159" border="0" /></p>
<p>If you switch to <em>Split</em> view in the designer you can see the HTML …</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image32.png" alt="image" width="169" height="124" border="0" />which should contain the following element.</p>
<pre class="brush:[xml]">&lt;div data-win-control="WinJS.UI.ListView"&gt;&lt;/div&gt;</pre>
<p>To be able to write code against the ListView it has to have an Id. You can enter this on the Attributes panel. In this case I named the ListView “<strong>posts</strong>”.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image33.png" alt="image" width="297" height="100" border="0" /></p>
<h1>Getting Data</h1>
<p>The ListView in this demo application is going to display the Atom feed from this blog. The Windows Library makes this very easy.</p>
<p>Have a look at <em>default.js</em> in your solution. This file contains some code to get you started. When the window is activated the <em>onmainwindowsactivated</em> function is called. This is where the retrieval of the atom feed has to be initiated. First create a new <a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.web.atompub.atompubclient(v=VS.85).aspx" target="_blank">AtomPubClient</a> and a <a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.foundation.uri(v=VS.85).aspx" target="_blank">Uri</a> to the feed. Than, pass the url to the retreiveFeedAsync function and have it process the posts or handle the error. At the end of the function you have to call <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh440975(v=VS.85).aspx" target="_blank">processAll</a> to have all declarative bindings applied on the controls. This is needed to get the templating to work which we’ll create in a second.</p>
<p>I haven’t implemented error handling in the demo, only an empty function. The processPosts function will be implemented after the templated.</p>
<pre class="brush:[csharp]">WinJS.Application.onmainwindowactivated = function (e) {
    if (e.detail.kind ===
     Windows.ApplicationModel.Activation.ActivationKind.launch) {

        var syn = new Windows.Web.AtomPub.AtomPubClientClient();
        var url =
           new Windows.Foundation.Uri("http://timmykokke.com/atom");
        syn.retrieveFeedAsync(url)
           .then(processPosts, downloadError);

        WinJS.UI.processAll();
    }
}

function downloadError() {
    // handle error
}</pre>
<h1>Creating a template</h1>
<p>The template is created in HTML. It’s basically a <em>div </em>with the <em>data-win-control</em> set like the ListView. The children of that <em>div</em> are used as a template for the ListView.  The template has to be defined before the ListView. To get the bindings to work you’ll have to add the <em>binding.js</em> script to the <em>head </em>section of the HTML file.</p>
<p>The actual binding is done by adding the <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh440968(v=VS.85).aspx" target="_blank">data-win-control</a> attribute to the <em>div</em>s inside the template. In this case the <em>innerText</em> property of the <em>div</em> is bound to the <em>title</em> property of the data bound object. Note that the children of the template are not shown in the <em>Live DOM</em> panel.</p>
<p>I’ll demonstrate how to set the classes later.</p>
<pre class="brush:[xml]">&lt;script src="/winjs/js/binding.js"&gt;&lt;/script&gt;
...
&lt;div id="itemTemplate" data-win-control="WinJS.Binding.Template" &gt;
    &lt;div class="post"&gt;
        &lt;div class="title" data-win-bind="innerText: title"&gt;&lt;/div&gt;
        &lt;div class="summary" data-win-bind="innerText: summary"&gt;&lt;/div&gt;
        &lt;div class="date" data-win-bind="innerText: date"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id="posts" data-win-control="WinJS.UI.ListView" &gt;&lt;/div&gt;</pre>
<p>To make the template known to the ListView, select it and go to the <em>Attributes</em> panel. Enter the name of the template in the textbox next to the <em><a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211828(v=VS.85).aspx" target="_blank">itemRenderer</a></em> property. In this case the templated is named <strong>itemTemplate</strong>.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image34.png" alt="image" width="283" height="371" border="0" /></p>
<h1>Process feed</h1>
<p>The feed returned by the earlier code has to be processed to match the template. It’s nothing more than creating an array (<em>myDataSource</em>), run over the items, adding anonymous objects to the array and setting the data source of the posts to it. If you would like to do some custom formatting on the items, like changing the date to something more readable for example, you can do that here.</p>
<pre class="brush:[csharp]">function processPosts(feed) {
    var myDataSource = [];

    for (var i = 0, len = feed.items.length; i &lt; len; i++) {
        var item = feed.items[i];
        myDataSource.push({
            title:   item.title.text,
            summary: item.summary.text,
            date:    item.publishedDate
         });
     }

     posts.winControl.dataSource = myDataSource;
}</pre>
<p>One of the great things of working with Blend is that you do not have to run your application to see the result and work with it. Try hitting CTRL+R or click on the refresh button in the top right corner of the designer.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image35.png" alt="image" width="183" height="150" border="0" />If all code is correct you should see the ListView filled with titles and summaries. The Live DOM panel should be filled with elements now. The elements that are generated by code are added to the list to. These elements are marked with a small lightning  bold icon.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image36.png" alt="image" width="284" height="340" border="0" /></p>
<p>Now we have to make sure the ListView is showing a <em>ListLayout</em>. With the <em>posts</em> element selected in the <em>Live DOM</em> panel head over to the <em>Attributes</em> panel. Look for the <em>layout </em>property and hit the button next to it.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image37.png" alt="image" width="261" height="94" border="0" /></p>
<p>Select <em>ListLayout</em> from the list and hit <em>Ok</em>. Refresh the design if needed.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image38.png" alt="image" width="405" height="229" border="0" /></p>
<h1>CSS for template</h1>
<p>Now we have the ListView filled with data we can set the templates.</p>
<p>Try selecting a title of one of the posts. You might have to click a couple of times, and notice that with every click you drill a little deeper in the element tree.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image39.png" alt="image" width="395" height="391" border="0" /></p>
<p>With the element selected head over to the <em>CSS Properties</em> panel. Click on the little triangle and select <em>Create style rule from selected element class… </em>and <em>title</em>.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image40.png" alt="image" width="425" height="112" border="0" /></p>
<p>This will create a CSS style rule in default.css for the title class. It is automatically selected. Try changing some of its properties, for example the text color and font-size and see what happens. The height and margins of the programmatically added items is not recalculated on every change, so you may want to hit the refresh button every now and then to update it.</p>
<p>You can repeat the process for the summary and date template items too.</p>
<p>To see what items in the designer are affected by a CSS style rule, select one on the <em>Styles</em> panel. For example the <em>.title</em> rule. Notice how all titles got a green border in the designer and the elements in the Live DOM panel got a dark green background.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image41.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb16.png" alt="image" width="425" height="208" border="0" /></a></p>
<p>&nbsp;</p>
<h1>Wrap up</h1>
<p>I hope that this tutorial has given you a start on how to use the ListView and how to use templating in Expression Blend. Other controls work in pretty much the same way. Feel free to drop my a line if you have any questions regarding this tutorial or anything else you run into.</p>
<p>For future tutorials on Expression Blend please subscribe to the <a href="http://timmykokke.com/rss">rss</a> feed or follow me on <a href="http://twitter.com/sorskoot">Twitter (@Sorskoot).</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/09/discovering-expression-blend-5-listview/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sounds on Windows Phone 7 &#8211; KnockOnWood</title>
		<link>http://www.timmykokke.com/2011/09/sounds-on-windows-phone-7-knockonwood/</link>
		<comments>http://www.timmykokke.com/2011/09/sounds-on-windows-phone-7-knockonwood/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 21:57:32 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[WP7]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[KnockOnWood]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/?p=483</guid>
		<description><![CDATA[Last week my KnockOnWood Windows Phone 7 app was released in the marketplace. The basic idea of the application is that it gives you something to knock on if no real wood is available. In other words, it should play a sound effect when the screen is touched. &#160; From Wikipedia: Knocking on wood, and [...]]]></description>
			<content:encoded><![CDATA[<p><img style="background-image: none; margin: 0px 12px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; padding-top: 0px; border-width: 0px;" title="Icon99x99" src="http://www.timmykokke.com/wp-content/uploads/2011/09/Icon99x99.png" alt="Icon99x99" width="99" height="99" align="left" border="0" /></p>
<p>Last week my KnockOnWood Windows Phone 7 app was released in the <a href="http://windowsphone.com/s?appid=832b5065-15d0-42e5-8298-462db18147d0" target="_blank">marketplace</a>. The basic idea of the application is that it gives you something to knock on if no real wood is available. In other words, it should play a sound effect when the screen is touched.</p>
<p>&nbsp;</p>
<blockquote><p>From Wikipedia:<br />
Knocking on wood, and the spoken expression &#8220;knock on wood,&#8221; are used to express a desire to avoid &#8220;tempting fate&#8221; after making some boast or speaking of one&#8217;s own death.</p></blockquote>
<p>In this application I wanted to try out to work with sounds for another application I’m working on. I had only a few requirements for this application:</p>
<ol>
<ol>
<li><em>Multitouch</em>. The sound should be triggered even if the screen is touched already.</li>
<li><em>Fast</em>. You  should not have to wait for a sound to finish playing when you tap the screen. Just play it immediately.</li>
</ol>
</ol>
<h1>Multitouch</h1>
<p>Because of requirement 1, Multitouch, I decided to go for the static <a href="http://msdn.microsoft.com/en-us/library/system.windows.input.touch(v=vs.95).aspx" target="_blank">Touch</a> class instead of using normal mouse events. To handle touches to the screen you’ll have to subscribe to the FrameReported event. I’ve added the following line to the constructor.</p>
<pre class="brush:[csharp]">Touch.FrameReported += this.TouchFrameReported;</pre>
<p>I figured a sound should only be played if a touch point is added to the screen. So I’ve created a private field <strong>_current </strong>to keep track of the number of touch points. If the first, or primary, touch point is taken off the screen (<a href="http://msdn.microsoft.com/en-us/library/system.windows.input.touchaction(v=VS.95).aspx" target="_blank">TouchAction.Up</a>) this number should be reset to 0. If the number of touchpoints at a certain moment exceeds the stored number the sound is played.</p>
<pre class="brush:[csharp]">private void TouchFrameReported(object sender, TouchFrameEventArgs e)
{
    int newcurrent = e.GetTouchPoints(this.LayoutRoot).Count();
    if (e.GetPrimaryTouchPoint(this.LayoutRoot)
	 	.Action == TouchAction.Up)
    {
        newcurrent = 0;
    }
    if (newcurrent &gt; this._current)
    {
	// play sound
    }
    this._current = newcurrent;
}</pre>
<h1>Sound</h1>
<p>At first I thought about using a single media element to play the knocking sound. But, with the first few tests it became clear a media element isn’t fast enough. Starting, stopping, rewinding and playing again didn’t work as easy as I hoped. I had to turn over to XNA for playing sounds.</p>
<p>Playing a <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.soundeffect.aspx" target="_blank">SoundEffect</a> when the screen is touched was still not fast enough…  So, I tried <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.soundeffectinstance.aspx" target="_blank">SoundEffectInstance</a>, which holds an instance of <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.soundeffect.aspx" target="_blank">SoundEffect</a> ready to be played. This worked a lot better, but stopping, rewinding and starting an instance was not completely right. Tapping on the screen wasn’t quite right.</p>
<p>Because I wanted to play the sounds as fast as possible I’ve came up with the following solution. I’ve created an array of <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.soundeffectinstance.aspx" target="_blank">SoundEffectInstance</a> and cycled through that on every tap. Because the knocking sound is pretty short, I’ve set the buffer size to 10 instances. This didn’t cause anything notable what tapping the screen.</p>
<p>Throughout the code I use a constant and two fields:</p>
<pre class="brush:[csharp]">private const int BufferSize = 10;
private readonly SoundEffectInstance[] _soundEffectInstances;
private int _currentInstance;</pre>
<p>In the constructor the _soundEffectInstances array is constructed and filled with instances of a <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.soundeffect.aspx" target="_blank">SoundEffect</a>.</p>
<pre class="brush:[csharp]">this._soundEffectInstances = new SoundEffectInstance[BufferSize];

var effect = this.LoadSound("woodknock.wav");

for (int i = 0; i &lt; BufferSize; i++)
{
    this._soundEffectInstances[i] = effect.CreateInstance();
    this._soundEffectInstances[i].IsLooped = false;
}</pre>
<p>The LoadSound method takes a path and filename of a content file in the solution, reads it and returns a <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.soundeffect.aspx" target="_blank">SoundEffect</a>.</p>
<pre class="brush:[csharp]">private SoundEffect LoadSound(string path)
{
    using (Stream stream = TitleContainer.OpenStream(path))
    {
        return stream != null ? SoundEffect.FromStream(stream) : null;
    }
}</pre>
<p>When the screen is tapped, the TouchFrameReported event handler is called. In this method I did all the playing from the array of sound instances and keeping track of which instance to play.</p>
<pre class="brush:[csharp]">private void TouchFrameReported(object sender, TouchFrameEventArgs e)
{
    int newcurrent = e.GetTouchPoints(this.LayoutRoot).Count();
    if (e.GetPrimaryTouchPoint(this.LayoutRoot)
             .Action == TouchAction.Up)
    {
        newcurrent = 0;
    }
    if (newcurrent &gt; this._current &amp;&amp;
            this._soundEffectInstances != null &amp;&amp;
            this._currentInstance &lt; BufferSize &amp;&amp;
            this._soundEffectInstances[this._currentInstance] != null)
    {
        this._soundEffectInstances[this._currentInstance].Play();
        this._currentInstance++;
        if (this._currentInstance &gt;= BufferSize)
        {
            this._currentInstance = 0;
        }
    }
    this._current = newcurrent;
}</pre>
<p>And that’s about it. <a href="http://www.timmykokke.com/wp-content/uploads/2011/09/screenshot1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border-width: 0px;" title="screenshot1" src="http://www.timmykokke.com/wp-content/uploads/2011/09/screenshot1_thumb.png" alt="screenshot1" width="227" height="379" align="right" border="0" /></a></p>
<h1></h1>
<h1>Wrap-up</h1>
<p>Playing one sound at a time without having to deal with speed and responsiveness is not that hard. Playing multiple instances is a bit harder. But, as you’ve just seen, can be done with only a few lines of code.</p>
<p>If you have a Windows  Phone, please give the application a try and show your support by rating it. The KnockOnWood application can be found in the <a href="http://windowsphone.com/s?appid=832b5065-15d0-42e5-8298-462db18147d0" target="_blank">marketplace</a>.</p>
<p>For future tutorials on Windows Phone, Silverlight and Expression Blend please subscribe to the <a href="http://timmykokke.com/rss">rss</a> feed or follow me on <a href="http://twitter.com/sorskoot">Twitter (@Sorskoot).</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/09/sounds-on-windows-phone-7-knockonwood/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Discovering Expression Blend 5 &#8211; Styles</title>
		<link>http://www.timmykokke.com/2011/09/discovering-expression-blendstyles/</link>
		<comments>http://www.timmykokke.com/2011/09/discovering-expression-blendstyles/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 23:58:17 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[dotnetmag]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/2011/09/discovering-expression-blendstyles/</guid>
		<description><![CDATA[In my previous article I explained the different templates of the Expression Blend 5 preview. Today I would like to walk you through some of the basic of using CSS, or Cascading Style Sheets, in Expression Blend 5. You’ll need CSS to define the look and formatting of your Windows 8 Metro Style application.  Expression [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.timmykokke.com/2011/09/discovering-expression-blend-5-templates/" target="_blank">my previous article</a> I explained the different templates of the Expression Blend 5 preview. Today I would like to walk you through some of the basic of using CSS, or <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank">Cascading Style Sheets</a>, in Expression Blend 5. You’ll need CSS to define the look and formatting of your <a href="http://dev.windows.com/" target="_blank">Windows 8</a> Metro Style application.  Expression Blend 5 helps you create your styles in pretty much the same way you are used to when working on Silverlight or WPF applications in Expression Blend 4 and earlier. But not entirely.</p>
<p>&nbsp;</p>
<h1>Defining a style</h1>
<p>For sake of simplicity I’ve created a new solution in Blend using the<em> Blank Application</em> project template. This template comes with three CSS files. Two files are for the default Metro style. One defines a light UI, <em>ui-light.css </em>and one that defines a dark UI, <em>ui-dark.css</em>. Only one of these files is linked in the default.html file, the dark version. I won’t recommend changing these files, but adding you own styles to a new CSS file or adding them to the third CSS file in the project, <em>default.css. </em></p>
<p>Style sheets linked to the currently opened and active file can be found on the <em>Styles</em> panel.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image13.png" alt="image" width="429" height="178" border="0" /></p>
<p>On this panel you can quickly create new style sheets, link existing CSS files or add a style block to you html file.  You can also add new style <em>rules</em> to a style sheet. Because there can be a large amount of style rules available a search box is available to help you find your rules very fast.</p>
<p>We’ll start by adding a rule to the default.css file by clicking on the “ + “ symbol next at the end of the line.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image14.png" alt="image" width="311" height="120" border="0" /></p>
<p>The style sheet unfolds and a new rule is added to the list. Type <strong>#YellowHeader</strong> and hit enter. The “ # “ indicates this rule will be applied to an html element with <em>YellowHeader</em> as its ID.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image15.png" alt="image" width="296" height="268" border="0" /></p>
<h1>Setting Properties</h1>
<p>With the newly added style rule selected have a look at the <em>CSS Properties</em> panel. At the top of panel you’ll find the name of the rule, in this case <em>#YellowHeader</em>. Below that is a search box to find properties. A checkbox for filtering the list is next. Check this to hide all empty properties and show only the ones that are set to certain value. The last part of the CSS Properties panel show a list of all available CSS properties. You can group these per category or show them as a long list ordered by name.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image16.png" alt="image" width="310" height="533" border="0" /></p>
<p>As the name of the style rule implies, we’re going to make a header that is yellow. Navigate to the <em>Text</em> category and click on big box next to color. The <em>Color Editor</em> pops out where you can select a color. Pick yellow. Note that the little square at the end of the line becomes white indicating a value has been set, different from the default.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image17.png" alt="image" width="297" height="311" border="0" /></p>
<h1>Apply Rule</h1>
<p>Now we’ve got a style rule defined we’ll need to add it an html element. We’re going to apply this to an H1 tag in the html file. Set the designer to split view to be able to edit the raw html by clicking on the little split button on the upper right corner of the design panel.<img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image18.png" alt="image" width="151" height="169" border="0" /> Add the following between the start and end of the Body tag:</p>
<pre class="brush:[xml]">&lt;H1&gt;A Yellow Header&lt;/H1&gt;</pre>
<p>The element immediately shows up in the designer and the<em> Live DOM</em> panel too.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image19.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb13.png" alt="image" width="425" height="431" border="0" /></a></p>
<p>Select the element in the Live Dom panel or in the designer. And look at the <em>Attributes</em> panel now. This panel contains all attributes for the selected html element. All elements can have an id which uniquely identifies the element. To match this with CSS rule we’ve created earlier name it <em>YellowHeader</em>. Notice that in the list of attributes the id changes too, the little square becomes white and the id also shows up in the <em>Live DOM</em> panel.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image20.png" alt="image" width="298" height="115" border="0" /></p>
<p>Because we’ve created the rule before setting the id, the H1 element immediately turns to yellow.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image21.png" alt="image" width="260" height="80" border="0" /></p>
<p>One last great feature that was added is to quickly find out which elements are affected by a certain style rule. Select the <em>#YellowHeader</em> rule on the <em>Styles</em> panel and watch the border around the selected element in the designer turn green. Notice the element in the <em>Live DOM</em> getting a dark green background also.<img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image22.png" alt="image" width="425" height="239" border="0" /></p>
<h1>Inline Styles</h1>
<p>There’s more… In this case we’re going to work the other way around. We’ll start with some html elements and add styles for that.</p>
<p>Start by adding the following lines to the body of the html file, right below the H1 tag we added earlier.</p>
<pre class="brush:[xml]">&lt;ul&gt;
    &lt;li&gt;Item 1&lt;/li&gt;
    &lt;li&gt;Item 2&lt;/li&gt;
    &lt;li&gt;Item 3&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>This creates a list with 3 items.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image23.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb14.png" alt="image" width="425" height="371" border="0" /></a></p>
<p>Select the first LI element. On the<em> CSS Properties</em> panel, have a look at the <em>Applied Rules</em> box. Because the styles are cascading and this stack of applied rules can grow bug, it’s sometimes hard to find out what’s the winning rule. This box helps you with that. When <em>winning</em> is selected the properties show what properties are set. Try selecting the bottom one in this case and note all three items are surrounded with a green border again. This is because the selected rule is applied on all LI tags.</p>
<p>Select <em>inline</em> in the<em> Applied Rules</em> box to create an inline style. When this is selected, the changes you make to the properties are placed inside the html tags.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image24.png" alt="image" width="304" height="174" border="0" /></p>
<p>Lets change a couple of properties:</p>
<ul>
<li>Set <em>background-color</em> to dark blue</li>
<li>Set <em>font-size</em> to 15pt</li>
<li>Set <em>font-weight </em>to bold</li>
<li>Set <em>line-height </em>to 25pt</li>
</ul>
<p>The item should look something like this now:</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image25.png" alt="image" width="168" height="122" border="0" /></p>
<h1>CSS Class</h1>
<p>Very often CSS uses classes (not .NET classes with code, but CSS classes) to define the looks and formatting for multiple elements at once. Lets convert the previously created inline style to a class and apply it to the other list items.</p>
<p>With the second LI element selected go to the <em>Attributes </em>panel and write <strong>redItem</strong> in the textbox behind <em>class</em>.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image26.png" alt="image" width="297" height="212" border="0" /></p>
<p>Next, switch to the CSS Properties panel. Click on the little tiny triangle in the upper right corner of the Applied Rules and select <em>Create style rule from selected element class… –&gt; redItem</em>.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image27.png" alt="image" width="384" height="154" border="0" /></p>
<p>Change the text-color to red, the line-height to 25pt and the background-color to dark red.</p>
<p><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image28.png" alt="image" width="217" height="146" border="0" /></p>
<p>Select the third LI element now and go to the Attributes panel again. Enter <strong>redItem</strong> in the box behind class and watch the third item turn red too. Try selecting the <em>.redItem</em> rule on the Styles panel too and notice both elements get a green border.</p>
<h1>Wrap up</h1>
<p>I hope you get the basic idea of how to work with CSS styles in Expression Blend 5. If you haven’t used CSS before, have a look over at <a href="http://www.w3schools.com">www.w3schools.com</a>. You’ll find lots of information there about CSS and CSS3, along with much more information about other web development/design topic.</p>
<p>For future tutorials on Expression Blend (and I’m sure many will follow) please subscribe to the <a href="http://timmykokke.com/rss">rss</a> feed or follow me on <a href="http://twitter.com/sorskoot">Twitter (@Sorskoot).</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/09/discovering-expression-blendstyles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Discovering Expression Blend 5 &#8211; Templates</title>
		<link>http://www.timmykokke.com/2011/09/discovering-expression-blend-5-templates/</link>
		<comments>http://www.timmykokke.com/2011/09/discovering-expression-blend-5-templates/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 22:29:00 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[BUILD]]></category>
		<category><![CDATA[dotnetmag]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/2011/09/discovering-expression-blend-5-templates/</guid>
		<description><![CDATA[At the BUILD event a lot of great applications were released. The big one of course was the Windows 8 preview. One of the released ISOs contains a couple of preview version of development tools. Expression Blend 5 preview is one of them. &#160; This preview of Expression Blend 5 doesn’t let you create Silverlight, [...]]]></description>
			<content:encoded><![CDATA[<p>At the <a href="http://www.buildwindows.com/">BUILD</a> event a lot of great applications were released. The big one of course was the <a href="http://dev.windows.com" target="_blank">Windows 8 preview</a>. One of the released ISOs contains a couple of preview version of development tools. Expression Blend 5 preview is one of them.</p>
<p>&nbsp;</p>
<p>This preview of Expression Blend 5 doesn’t let you create Silverlight, WPF or Windows Phone 7 apps. Instead it does what a lot of people where hoping for: Editing/Designing Html5, Css and JavaScript.</p>
<h1>Project Templates</h1>
<p>The first thing to notice are the new project templates. There’s only one category in the preview: <em>Windows Metro Style</em>. The category contains 5 templates. All templates help you getting started creating Html applications for Windows 8 in Metro style. The Language and Version dropdown lists only contain one element in the preview version. I assume these will grow over time, when Silverlight, WPF and WP7 return.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb.png" alt="image" width="400" height="341" border="0" /></a></p>
<p>The <em>Blank Application</em> template creates a solutions with only the minimal elements needed. The designer shows a tablet-shape around the surface, like you might be used to when working on Windows Phone 7 applications. The solution contains a couple of Css and .Js files needed for the Metro Style. A manifest file is also added which defines what is needed to run the app on Windows 8.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image1.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb1.png" alt="image" width="400" height="247" border="0" /></a></p>
<p>The second project template, <em>Fixed Layout Application</em>, adds some basic layout to the blank application.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image2.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb2.png" alt="image" width="400" height="245" border="0" /></a></p>
<p>The<em> Grid Application</em> template is where things get a lot more interesting if you’re just starting writing these kinds of apps. This template contains a couple of .Html files glued together (I might dive into this in a later tutorial) with html attributes. It&#8217;s a basic starting point  a grid application and contains some navigating from master to detail views.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image3.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb3.png" alt="image" width="400" height="249" border="0" /></a></p>
<p>The <em>Navigation Applications</em> template creates a solutions which looks a lot like the last, but blank. The basic Html elements are in place. This would be a great template to start you applications.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image4.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb4.png" alt="image" width="400" height="245" border="0" /></a></p>
<p>The last template, <em>Split Application</em>, create a more complex solution again. It demonstrates how to create a master/detail application showing the master and the details side by side.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image5.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb5.png" alt="image" width="400" height="245" border="0" /></a></p>
<h1>Item Templates</h1>
<p>Besides new project templates, there are new Item Templates too. Adding new files to the solution is something you would to in an Html/JavaScript application too, right? Besides a basic JavaScript File, Style Sheet or Html page, there some templates that will help you develop your Windows 8 applications faster.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image6.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb6.png" alt="image" width="315" height="341" border="0" /></a></p>
<p>The <em>Landing Page</em> adds a Html page, a Css file and a JavaScript file to the solution. The page contains a header with a button and a title and a section containing a list. Again, the data is defined in the JavaScript file. The JavaScript code wires thing up to create an interactive page.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image7.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb7.png" alt="image" width="400" height="249" border="0" /></a></p>
<p>The <em>Split Page</em> template shows a lot of resemblance with the Split Application project template. The item template adds a Html file to the solution defining the layout of the page. A Css file is added for the styling and a JavaScript file is added which contains the code to make things interactive. The JavaScript code is responsible for creating the sample data too.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image8.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb8.png" alt="image" width="400" height="247" border="0" /></a></p>
<p>The <em>Collection Page</em> item template defines a large item and a list of smaller items. Again a Html, Css and JavaScript file are added to the solution. It should be pretty easy to extend the JavaScript code and make the small items navigate to different pages in the solution.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image9.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb9.png" alt="image" width="400" height="244" border="0" /></a></p>
<p>The <em>Category Page</em> template adds a page with a horizontal list of images with some details below them. The JavaScript file that is added is pretty much the same as the ones in the previous templates and again, it should not be hard to modify and extend this code to add navigation to the page.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image10.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb10.png" alt="image" width="400" height="246" border="0" /></a></p>
<p>The <em>Html Fragment </em>adds an almost empty page. It contains the most basic styles and elements for a Metro style application. The JavaScript file that is added contains only a few lines of code handling the <em>fragmentLoad</em> event.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image11.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb11.png" alt="image" width="400" height="244" border="0" /></a></p>
<p>The <em>Details Page</em> contains a large text over multiple columns. The JavaScript file that goes along with this template initializes the page and fills it with sample data.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/09/image12.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/09/image_thumb12.png" alt="image" width="400" height="248" border="0" /></a></p>
<p>&nbsp;</p>
<p>That’s it for the templates.</p>
<h1>Wrap-up</h1>
<p>Although this first preview of Expression Blend 5 only does Html, I think it’s moving in the right direction. Looking at the .Dll files in the root directory of Blend reassures me that the future will bring everything we’re used to back to one of my favorite tools.</p>
<p>Great job Expression Blend team! Keep up the good work.</p>
<p>For future tutorials on Expression Blend (and I’m sure many will follow) please subscribe to the <a href="http://timmykokke.com/rss" target="_blank">rss</a> feed or follow me on <a href="http://twitter.com/sorskoot" target="_blank">Twitter (@Sorskoot).</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/09/discovering-expression-blend-5-templates/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Second Windows Phone 7 app&#8211;Zwaailicht</title>
		<link>http://www.timmykokke.com/2011/06/second-windows-phone-7-appzwaailicht/</link>
		<comments>http://www.timmykokke.com/2011/06/second-windows-phone-7-appzwaailicht/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 07:01:00 +0000</pubDate>
		<dc:creator>Timmy</dc:creator>
				<category><![CDATA[WP7]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/2011/06/second-windows-phone-7-appzwaailicht/</guid>
		<description><![CDATA[Today, my second Windows Phone 7 app, Zwaailicht, has passed certification and is available in the Marketplace. The application shows information about emergencies in the Netherlands, based on the P2000 system. There are a couple of sites that show this information about Police, Fire and Ambulances. When you hear a siren somewhere, you can check [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/06/logo99x99.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 15px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="logo99x99" border="0" alt="logo99x99" align="left" src="http://www.timmykokke.com/wp-content/uploads/2011/06/logo99x99_thumb.png" width="99" height="99" /></a>Today, <a href="http://social.zune.net/redirect?type=phoneApp&amp;id=c7a3b7ff-368a-e011-986b-78e7d1fa76f8" target="_blank">my second Windows Phone 7 app, Zwaailicht</a><em></em>, has passed certification and is available in the Marketplace. The application shows information about emergencies in the Netherlands, based on the P2000 system. There are a couple of sites that show this information about Police, Fire and Ambulances. When you hear a siren somewhere, you can check what’s going on in the neighborhood. Or you can see what has happen in your region when you weren’t t<a href="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot01.png" target="_blank"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="screenshot01" border="0" alt="screenshot01" align="right" src="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot01_thumb.png" width="250" height="417" /></a>here. </p>
<p><em>Zwaailicht </em>helps you choose one of the many feeds of <a href="http://www.alarmeringen.nl">http://www.alarmeringen.nl</a>.&#160; Which was kindly enough to made their feeds available on a <a href="http://creativecommons.org/">Creative Commons</a>-license. The application gives you 4 options to base your feed on.</p>
<ol>
<li>City </li>
<li>Region </li>
<li>GPS </li>
<li>Nationwide </li>
</ol>
<p>The application contains a list with almost all Dutch cites you can scroll through. To find the city you are looking for a bit faster you can use the searchbox on top to filter the list. </p>
<p>The region selection is a much smaller list of the regions the Dutch emergency services work in. </p>
<p><em><a href="http://social.zune.net/redirect?type=phoneApp&amp;id=c7a3b7ff-368a-e011-986b-78e7d1fa76f8" target="_blank">Zwaailicht</a></em> can also find a city based on your current GPS location. It uses the Bing Geolocation service to do this. <em><a href="http://social.zune.net/redirect?type=phoneApp&amp;id=c7a3b7ff-368a-e011-986b-78e7d1fa76f8" target="_blank">Zwaailicht</a></em> sends your current GPS location to this services which returns your current address. <a href="http://social.zune.net/redirect?type=phoneApp&amp;id=c7a3b7ff-368a-e011-986b-78e7d1fa76f8" target="_blank"><em>Zwaailicht</em></a><em> </em>uses the city from this address to get a new feed.</p>
<p>The application uses Teleriks <a href="http://www.telerik.com/products/windows-phone.aspx" target="_blank">Rad Controls for Windows Phone</a> for navigation, showing lists and filtering them. This took away lots of work in the design of the application and added a lot of smoothness and animations.</p>
<p>For the design itself I choose to stick to the Metro theme as much as possible. I added a couple of backgrounds to make the application stick out a little more. I used the default animations as much as possible. </p>
<p>The application failed certification the first time. Besides correctly configuring the manifest file in the project to contain its capabilities, like GPS in this case, it also needed to include a privacy policy. I’ve added a this to the about screen. In this I explain the data captured from the GPS is not used for anything else that getting the current city. Added the privacy policy was enough to get it certified the second time.</p>
<p>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tbody>
<tr>
<td valign="top" width="166"><a href="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot02.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="screenshot02" border="0" alt="screenshot02" src="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot02_thumb.png" width="144" height="240" /></a></td>
<td valign="top" width="166"><a href="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot03.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="screenshot03" border="0" alt="screenshot03" src="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot03_thumb.png" width="144" height="240" /></a></td>
<td valign="top" width="166"><a href="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot04.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="screenshot04" border="0" alt="screenshot04" src="http://www.timmykokke.com/wp-content/uploads/2011/06/screenshot04_thumb.png" width="144" height="240" /></a></td>
</tr>
</tbody>
</table>
<p><a href="http://social.zune.net/redirect?type=phoneApp&amp;id=c7a3b7ff-368a-e011-986b-78e7d1fa76f8" target="_blank">The application can be downloaded here</a>. Don’t forget to leave a review if you like it. If you don’t, please send me an email or tweet and I might add your suggestion to the next version. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/06/second-windows-phone-7-appzwaailicht/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Expression Blend for Developers</title>
		<link>http://www.timmykokke.com/2011/05/expression-blend-for-developers/</link>
		<comments>http://www.timmykokke.com/2011/05/expression-blend-for-developers/#comments</comments>
		<pubDate>Mon, 09 May 2011 19:37:50 +0000</pubDate>
		<dc:creator>Timmy Kokke</dc:creator>
				<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Slides]]></category>
		<category><![CDATA[DevDays]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/2011/05/expression-blend-for-developers/</guid>
		<description><![CDATA[On April 28th I was given the opportunity to speak at the Microsoft DevDays in The Hague in the Netherlands. My session about Expression Blend for Developers was chosen by the community to fill one of the Wildcard slots. The idea for this session came when I saw a coworker tinker with XAML in visual [...]]]></description>
			<content:encoded><![CDATA[<p>On April 28th I was given the opportunity to speak at the Microsoft DevDays in The Hague in the Netherlands. My session about Expression Blend for Developers was chosen by the community to fill one of the Wildcard slots.</p>
<p>The idea for this session came when I saw a coworker tinker with XAML in visual studio to create an animation when he had Expression Blend available through his MSDN subscription. It turned out that a lot of Silverlight, WPF and Windows Phone 7 developers didn’t know they could use Expression Blend. &#8220;Expression Blend is for designers&#8221;, they thought.</p>
<p><img style="background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border: 0px;" title="image" src="http://www.timmykokke.com/wp-content/uploads/2011/05/image.png" border="0" alt="image" width="487" height="274" />The first part of the session I explained Sample Data. I demonstrated how to create it and how to use it to create bindings. I demonstrated how to use the Visual State manager and set them by using behaviors. In the last demo I showed a couple of my favorite features of Expression Blend (including the gradient picker).</p>
<p>The recording of my session is <a title="Online and Download" href="http://channel9.msdn.com/Events/DevDays/DevDays-2011-Netherlands/Devdays011" target="_blank">available online and for download</a> at Channel9. Although the slides are in English, the session itself is spoken in Dutch.</p>
<p>The slides contain all content shown in the demos. You can download them <a title="Blend For Developers slides" href="http://www.timmkokke.com/BlendForDevelopers.zip" target="_blank">here</a>.</p>
<p>Last but not least I would like to thank everyone for coming to my session. I hope I was able to send you home with little more knowledge that you had when you came in and inspired you to start using Expression Blend in your job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/05/expression-blend-for-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Windows Phone 7 Application</title>
		<link>http://www.timmykokke.com/2011/04/first-windows-phone-7-application/</link>
		<comments>http://www.timmykokke.com/2011/04/first-windows-phone-7-application/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 18:11:24 +0000</pubDate>
		<dc:creator>Timmy Kokke</dc:creator>
				<category><![CDATA[WP7]]></category>
		<category><![CDATA[DuckAndCow]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.timmykokke.com/2011/04/first-windows-phone-7-application/</guid>
		<description><![CDATA[Duck’n’Cow My first Windows Phone 7 application is available in the marketplace, Duck’n’Cow. Feel free to download and play with it (and rate it of course ). I build the application to try some of the features of the Windows Phone. In this application I focused mainly on the accelerometers. The application shows a Duck [...]]]></description>
			<content:encoded><![CDATA[<h3>Duck’n’Cow</h3>
<p>My first Windows Phone 7 application is available in the marketplace, <strong><a title="Duck&#39;n&#39;Cow" href="http://bit.ly/DuckAndCow" target="_blank">Duck’n’Cow</a></strong>. Feel free to download and play with it (and rate it of course <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://www.timmykokke.com/wp-content/uploads/2011/04/wlEmoticon-winkingsmile.png" />).</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="background1" border="0" alt="background1" src="http://www.timmykokke.com/wp-content/uploads/2011/04/background1.png" width="170" height="129" /></p>
<p>I build the application to try some of the features of the Windows Phone. In this application I focused mainly on the accelerometers.</p>
<p>The application shows a Duck and a Cow, hidden in a circle. When you shake the phone the duck pops up and you hear it quack. When you turn the phone upside down, you’ll see the cow pop up.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/04/Screenshot4.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screenshot4" border="0" alt="Screenshot4" align="left" src="http://www.timmykokke.com/wp-content/uploads/2011/04/Screenshot4_thumb.png" width="200" height="333" /></a><a href="http://www.timmykokke.com/wp-content/uploads/2011/04/Screenshot5.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 0px 6px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screenshot5" border="0" alt="Screenshot5" src="http://www.timmykokke.com/wp-content/uploads/2011/04/Screenshot5_thumb.png" width="200" height="333" /></a></p>
<h3>Idea</h3>
<p>I wanted to create a funny looking application that could be used to express your feelings about something when attending a presentation. A positive, cheering and green, action when you like something and a negative, red, action when disliking what is being told. But with a wink. Just a simple thumbs up or down wasn’t fun enough. So I decided to go for a <em>moo</em> and a <em>quack,</em> which automatically led to duck and a cow.</p>
<h3>Gestures</h3>
<p>The application uses to gestures, shaking and turning upside down. The turning upside down reminds of the nostalgic cow-in-a-box toys. But the gesture also resembles turning your thumb down to express dislikeness. The shaking motion is inspired by cheering and applauding.</p>
<p>I started off by reading the accelerometer data myself. By calculating the change of the accelerometers in X,Y and Z directions I was able to detect a shaking motion. By reading the Y accelerometer I was able to tell if the phone was turned upside down. Very soon I ran into issues whit this method, because the raw data returned by the accelerometers was too course (?!). I needed some kind of filtering to smooth things out a little. When looking around to find the best approach I came across the <a title="Shake Gesture Library" href="http://create.msdn.com/en-us/education/catalog/article/Recipe_Shake_Gesture_Library" target="_blank">ShakeGesture</a> library, which is build on the <a title="Accelerometer Helper" href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/09/08/using-the-accelerometer-on-windows-phone-7.aspx" target="_blank">AccelerometerHelper</a> library. Both these libraries helped my abstracting out the raw accelerometer data and use filtered events to get the data right. </p>
<h3>Graphics and Xaml</h3>
<p>As soon as I knew I was going to use the concept of a duck and a cow I started sketching. Below is the original sketch.</p>
<p><a href="http://www.timmykokke.com/wp-content/uploads/2011/04/Sketch.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Sketch" border="0" alt="Sketch" src="http://www.timmykokke.com/wp-content/uploads/2011/04/Sketch_thumb.png" width="240" height="180" /></a></p>
<p>I’ve digitized the sketch in Adobe Illustrator to be able to scale it to any size so I could use the same image for all the places where tiles were needed, like the live-tile or the tile in the marketplace.</p>
<p>The first version of the application only contained this image. I’ve added it as .png in expression blend. A couple of people I’ve showed the app to told me they’d rather see some animation. So I took the image apart and separated into a circle, the duck and the cow. And added the animations in Expression Blend. </p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screenshot3" border="0" alt="Screenshot3" src="http://www.timmykokke.com/wp-content/uploads/2011/04/Screenshot3.png" width="200" height="293" /></p>
<p>I’ve created a UserControl to make the switching between states a little more convenient. The control contains 4 states, duck, cow, both and none. </p>
<h3>Wrap-up</h3>
<p>That’s it about the app for now. If you’ve got a windows phone yourself, feel free to try the app. You can <a title="Duck&#39;n&#39;Cow" href="http://bit.ly/DuckAndCow" target="_blank">download it through here</a>.</p>
<p>To stay up-to-date about the application you can follow the app on twitter: <a title="Duck&#39;n&#39;Cow on twitter" href="http://www.twitter.com/DuckAndCow" target="_blank">@DuckAndCow</a> . For comments, bug or feature requests, send me an email at DuckAndCow[at]hotmail[dot]nl.</p>
<p>To be informed about anything else that’s going on my blog, follow me on twitter (<a title="Sorskoot on twitter" href="http://www.twitter.com/sorskoot" target="_blank">@sorskoot</a>) or subscribe to the <a title="the RSS feed" href="http://timmykokke.com/rss" target="_blank">RSS feed</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timmykokke.com/2011/04/first-windows-phone-7-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

