<?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>LOEKVANDENOUWELAND</title>
	<atom:link href="http://loekvandenouweland.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://loekvandenouweland.com</link>
	<description>freelance trainer and digital product designer</description>
	<lastBuildDate>Tue, 24 Jan 2012 11:12:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Split Generic.xaml in Silverlight Applications</title>
		<link>http://loekvandenouweland.com/index.php/2012/01/split-generic-xaml-in-silverlight-applications/</link>
		<comments>http://loekvandenouweland.com/index.php/2012/01/split-generic-xaml-in-silverlight-applications/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 11:10:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=621</guid>
		<description><![CDATA[If you work with Templated controls in a big Silverlight project, your Generic.xaml might grow fast. Here&#8217;s a quick tutorial on how to split the Generic.xaml into multiple resource files. Step1: Find the resource You will typically have the control code: and the XAML in the Generic.xaml: Step2: Create a new resource file Create a [...]]]></description>
			<content:encoded><![CDATA[<p>If you work with Templated controls in a big Silverlight project, your Generic.xaml might grow fast. Here&#8217;s a quick tutorial on how to split the Generic.xaml into multiple resource files.</p>
<h2>Step1: Find the resource</h2>
<p>You will typically have the control code:</p>
<pre class="brush: csharp; title: ; notranslate">
public class TemplatedControl1 : Control {
    public TemplatedControl1() {
        this.DefaultStyleKey = typeof(TemplatedControl1);
    }
}
</pre>
<p>and the XAML in the Generic.xaml:</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;Style TargetType=&quot;local:TemplatedControl1&quot;&gt;
    &lt;Setter Property=&quot;Template&quot;&gt;
        &lt;Setter.Value&gt;
            &lt;ControlTemplate TargetType=&quot;local:TemplatedControl1&quot;&gt;
                &lt;Border Background=&quot;{TemplateBinding Background}&quot;
                        BorderBrush=&quot;{TemplateBinding BorderBrush}&quot;
                        BorderThickness=&quot;{TemplateBinding BorderThickness}&quot;&gt;
                &lt;/Border&gt;
            &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
&lt;/Style&gt;
</pre>
<h2>Step2: Create a new resource file</h2>
<p>Create a copy of Generic.xaml and rename to TemplatedControl1.xaml.<br />
Delete the TemplatedControl1 style from Generic.xaml.<br />
So Generic.xaml looks like:</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;ResourceDictionary
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    xmlns:local=&quot;clr-namespace:SilverlightApplication1&quot;&gt;
&lt;/ResourceDictionary&gt;
</pre>
<p>and TemplatedControl1.xaml looks like:</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;ResourceDictionary
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    xmlns:local=&quot;clr-namespace:SilverlightApplication1&quot;&gt;

    &lt;Style TargetType=&quot;local:TemplatedControl1&quot;&gt;
        &lt;Setter Property=&quot;Template&quot;&gt;
            &lt;Setter.Value&gt;
                &lt;ControlTemplate TargetType=&quot;local:TemplatedControl1&quot;&gt;
                    &lt;Border Background=&quot;{TemplateBinding Background}&quot;
                            BorderBrush=&quot;{TemplateBinding BorderBrush}&quot;
                            BorderThickness=&quot;{TemplateBinding BorderThickness}&quot;&gt;
                    &lt;/Border&gt;
                &lt;/ControlTemplate&gt;
            &lt;/Setter.Value&gt;
        &lt;/Setter&gt;
    &lt;/Style&gt;
&lt;/ResourceDictionary&gt;
</pre>
<h2>Step3: Create reference in App.xaml</h2>
<p>Open App.xaml and add the resource:</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;Application xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
             xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
             x:Class=&quot;SilverlightApplication1.App&quot;
             &gt;
    &lt;Application.Resources&gt;
        &lt;ResourceDictionary&gt;
            &lt;ResourceDictionary.MergedDictionaries&gt;
                &lt;ResourceDictionary Source='/SilverlightApplication1;Component/Themes/TemplatedControl1.xaml'/&gt;
            &lt;/ResourceDictionary.MergedDictionaries&gt;
        &lt;/ResourceDictionary&gt;
    &lt;/Application.Resources&gt;
&lt;/Application&gt;
</pre>
<p>If you open the project in Expression Blend you will see that you can edit the template as usual:</p>
<p><img class="alignnone size-full wp-image-624" title="templatedcontrol" src="http://loekvandenouweland.com/wp-content/uploads/2012/01/templatedcontrol.png" alt="" width="399" height="155" /></p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2012/01/split-generic-xaml-in-silverlight-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seven Silverlight snippets you can not live without</title>
		<link>http://loekvandenouweland.com/index.php/2012/01/seven-silverlight-snippets-you-can-not-live-without/</link>
		<comments>http://loekvandenouweland.com/index.php/2012/01/seven-silverlight-snippets-you-can-not-live-without/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 16:35:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=597</guid>
		<description><![CDATA[One of the best Visual Studio features is the ability to create code snippets. During our Silverlight Training we use many of them. Here is a selection of the ones we use the most. You can download a zipfile with snippets and copy them to: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C# or c:\Users\You\Documents\Visual Studio [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best Visual Studio features is the ability to create code snippets. During our <a href="http://silverlighttraining.nl/" target="_blank">Silverlight Training</a> we use many of them. Here is a selection of the ones we use the most. You can download a <a href="http://loekvandenouweland.com/download/VisualStudioSnippets.zip" target="_blank">zipfile</a> with snippets and copy them to:</p>
<p>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#</p>
<p>or</p>
<p>c:\Users\You\Documents\Visual Studio 2010\Code Snippets\Visual C#\</p>
<h2>1 clsObservableObject</h2>
<p>Creates an ObservableObject class you can use to subclass your Models from. Each model that subclasses ObservableObject can call a typed or untyped OnPropertyChanged method.</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
public class ObservableObject : INotifyPropertyChanged {
    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void OnPropertyChanged(string propertyName) {
        var handler = PropertyChanged;
        if (handler != null) {
            handler(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    protected virtual void OnPropertyChanged&lt;TViewModel&gt;(Expression&lt;Func&lt;TViewModel&gt;&gt; property) {
        var expression = property.Body as MemberExpression;
        var member = expression.Member;

        if (PropertyChanged != null) {
            PropertyChanged(this, new PropertyChangedEventArgs(member.Name));
        }
    }
}
</pre>
<h2>2 event</h2>
<p>Event declaration and a helper method to raise it.</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
public event EventHandler DoubleClick;

protected virtual void OnDoubleClick() {
    EventHandler handler = DoubleClick;
    if (handler != null) {
        handler(this, EventArgs.Empty);
    }
}
</pre>
<h2>3  loremIpsum</h2>
<p>Creates a string with lorem ipsum text.</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
var loremIpsum=&quot;Lorem ipsum dolor sit amet, Toverstudio consectetuer...
</pre>
<h2>4  propds</h2>
<p>Creates a Silverlight dependency property</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
public string Text {
    get { return (string)GetValue(TextProperty); }
    set { SetValue(TextProperty, value); }
}

/// &lt;summary&gt;
/// Identifies the Text dependency property. This enables animation, styling, binding, etc...
/// &lt;/summary&gt;
public static readonly DependencyProperty TextProperty =
    DependencyProperty.Register(&quot;Text&quot;,
                                typeof(string),
                                typeof(MyControl),
                                new PropertyMetadata(null, OnTextPropertyChanged));

/// &lt;summary&gt;
/// Text changed handler.
/// &lt;/summary&gt;
/// &lt;param name=&quot;d&quot;&gt;MyControl that changed its Text.&lt;/param&gt;
/// &lt;param name=&quot;e&quot;&gt;DependencyPropertyChangedEventArgs.&lt;/param&gt;
private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
    var source = d as MyControl;
    if (source != null) {
        var value = (string)e.NewValue;
        //TODO: Handle new value.
    }
}
</pre>
<h2>5  propds_nocallback</h2>
<p>Creates a Silverlight dependency property without a callback method</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
public string Caption {
    get { return (string)GetValue(CaptionProperty); }
    set { SetValue(CaptionProperty, value); }
}

public static readonly DependencyProperty CaptionProperty =
    DependencyProperty.Register(&quot;Caption&quot;,
                                typeof(string),
                                typeof(MyControl),
                                new PropertyMetadata(null));
</pre>
<h2>6  propNotify</h2>
<p>Uses the OnPropertyChanged with a string parameter (&#8220;&#8221;) from ObservableObject.</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
private string name;

public string Name {
    get { return name; }
    set {
        if (name != value) {
            name = value;
            OnPropertyChanged(&quot;Name&quot;);
        }
    }
}
</pre>
<h2>7  propNotify_typed</h2>
<p>Uses the typed OnPropertyChanged method from ObservableObject.</p>
<p>Output code:</p>
<pre class="brush: csharp; title: ; notranslate">
private string name;
public string Name {
    get { return name; }
    set {
        if (name != value) {
            name = value;
            OnPropertyChanged(() =&gt; this.Name);
        }
    }
}
</pre>
<p>You can download a <a href="http://loekvandenouweland.com/download/VisualStudioSnippets.zip" target="_blank">zipfile</a> with the snippets</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2012/01/seven-silverlight-snippets-you-can-not-live-without/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open dual side-by-side finder with applescript</title>
		<link>http://loekvandenouweland.com/index.php/2011/12/open-dual-side-by-side-finder-with-applescript/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/12/open-dual-side-by-side-finder-with-applescript/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 11:50:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=579</guid>
		<description><![CDATA[&#8230;and save as an app on your desktop! create an app with applescript to open two finders side-by-side in a few minutes! I use both a Mac and Windows machine and if I may compare the two, I would say one of them is my feel-good-machine and the other a workhorse to develop .NET stuff [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;and save as an app on your desktop!</p>
<p><img class="alignnone size-full wp-image-592" title="dualfi" src="http://loekvandenouweland.com/wp-content/uploads/2011/12/dualfi.jpg" alt="" width="500" height="200" /></p>
<p><em>create an app with applescript to open two finders side-by-side in a few minutes!<br />
</em></p>
<p><em> </em></p>
<p>I use both a Mac and Windows machine and if I may compare the two, I would say one of them is my feel-good-machine and the other a workhorse to develop .NET stuff on. Both OSses have file managers which work great for finding and opening files but when you copy, move and view files all the time, doing that in the windows explorer or the Mac Finder soon becomes a click fest.</p>
<h2>TotalCommander</h2>
<p>On my windows machines I use the brilliant <a href="http://www.ghisler.com/" target="_blank">Total Commander</a> which was very accurately described by someone as: &#8220;Using windows without Total Commander is like driving without my glasses&#8221;. It&#8217;s true. This thing can do anything from file management to comparing files and from FTP to batch copy.</p>
<h2>Back to the Finder</h2>
<p>When I bought my Mac I searched for <a href="http://mac.appstorm.net/roundups/utilities-roundups/5-alternatives-to-the-os-x-finder/" target="_blank">Total Commander alternatives</a> and while some of them work OK, they are not perfect. So while I wait and hope one day Christian Ghistler will re-write Total Commander for the Mac, I&#8217;m just going to use the Finder. But to copy and move files, I really need to have side by side Finders. Of course you can open two Finders but why not have an AppleScript do that for me? I googled, found <a href="http://hints.macworld.com/article.php?story=20011127022706921" target="_blank">this one to start from</a> and made some changes like determining the screen size automatically and place the finders side-by-side around the center of the screen.</p>
<h2>AppleScript to open two Finders side-by-side</h2>
<h3>STEP1: Fire up the AppleScript Editor and paste this code in it:</h3>
<pre class="brush: csharp; title: ; notranslate">
-- Feel free to copy, modify and redistribute this script any way you like
-- Be careful to run this &quot;AS IS&quot; script on your machine. I've
-- tested it and it works on my iMac but if you don't know what you're doing,
-- you could end up hurting your beloved Mac and the data on it.
-- Cheers, Loek

-- This script opens two finder windows side-by-side
property finderWidth : 900 -- MUST BE SMALLER THEN HALF OF THE ACTUAL SCREEN SIZE!
property finderHeight : 700

tell application &quot;Finder&quot;
	set screenBounds to bounds of window of desktop
	set screenWidth to item 3 of screenBounds
	set screenHeight to item 4 of screenBounds
	set centerX to screenWidth / 2
	set centerY to screenHeight / 2
	activate
	set visible of (every process whose visible is true and frontmost is false) to false
	set finder1 to make new Finder window
	set the bounds of finder1 to {centerX - finderWidth div 1, centerY - (finderHeight / 2) div 1, centerX - 2 div 1, centerY + (finderHeight / 2) div 1}
	set the current view of finder1 to column view
	set finder2 to make new Finder window
	set the bounds of finder2 to {centerX + 2, centerY - (finderHeight / 2) div 1, centerX + finderWidth, centerY + (finderHeight / 2) div 1}
	set the current view of finder2 to column view
end tell
</pre>
<h3>STEP2: Set a correct value for the finderWidth and finderHeight and if you run the script, two Finders should open. If not, make sure the finderWidth is less then half of the actual screen width.</h3>
<p><img class="alignnone size-full wp-image-582" title="dualrun" src="http://loekvandenouweland.com/wp-content/uploads/2011/12/dualrun.jpg" alt="" width="541" height="298" /></p>
<h3>STEP3: Save as app</h3>
<p>In the AppleScriptEditer goto File | Save As&#8230;</p>
<p>Type a name and choose Application as File Format</p>
<p><img class="alignnone size-full wp-image-583" title="Screen Shot 2011-12-09 at 12.47.36" src="http://loekvandenouweland.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-09-at-12.47.36.png" alt="" width="421" height="242" /></p>
<p>Open the DualFinder.app et voila! Two Finders side by side!</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/12/open-dual-side-by-side-finder-with-applescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open radio streams in iTunes</title>
		<link>http://loekvandenouweland.com/index.php/2011/11/open-radio-streams-in-itunes/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/11/open-radio-streams-in-itunes/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 10:03:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=564</guid>
		<description><![CDATA[The Radio function in iTunes lets you browse stations but it won&#8217;t let you search for one. If you know a station that shares a music stream, you can open it directly in iTunes. Find a stream Google for radio streams and find playlists that end with .m3u. Copy the stream address to your clipboard. [...]]]></description>
			<content:encoded><![CDATA[<p>The Radio function in iTunes lets you browse stations but it won&#8217;t let you search for one. If you know a station that shares a music stream, you can open it directly in iTunes.</p>
<h2>Find a stream</h2>
<p>Google for radio streams and find playlists that end with .m3u. Copy the stream address to your clipboard.</p>
<h2>Open in iTunes</h2>
<p>In iTunes go to Advanced &gt; Open stream (CMD+U) and enter the address. For your convenience, you can drag the item from the main grid to your playlists for later listening.</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/11/open-radio-streams-in-itunes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eindhoven Glow 2011</title>
		<link>http://loekvandenouweland.com/index.php/2011/11/eindhoven-glow-2011/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/11/eindhoven-glow-2011/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 13:14:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=559</guid>
		<description><![CDATA[This week is the 5th Glow festival in Eindhoven. Being born in the heart of Eindhoven I really enjoy seeing Eindhoven becoming more and more design and history (Philips, Light) aware and Glow is a great initiative where light and design meet. I shot this video with my Windows Phone yesterday: www.youtube.com/watch?v=-FXn6zo8Z4s More Architectural Projection [...]]]></description>
			<content:encoded><![CDATA[<p>This week is the 5th <a href="http://nl.wikipedia.org/wiki/GLOW_Festival">Glow festival</a> in Eindhoven. Being born in the heart of Eindhoven I really enjoy seeing Eindhoven becoming more and more design and history (Philips, Light) aware and Glow is a great initiative where light and design meet. I shot this video with my Windows Phone yesterday:</p>
<p><span class="youtube">
<object width="640" height="385">
<param name="movie" value="http://www.youtube.com/v/-FXn6zo8Z4s?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/-FXn6zo8Z4s?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="385"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=-FXn6zo8Z4s&fmt=18">www.youtube.com/watch?v=-FXn6zo8Z4s</a></p></p>
<h2>More Architectural Projection</h2>
<p>I personally like the architectural projections the most and here are some of my favorites:</p>
<p><a href="http://www.youtube.com/watch?v=BGXcfvWhdDQ" target="_blank">http://www.youtube.com/watch?v=BGXcfvWhdDQ</a></p>
<p><a href="http://www.youtube.com/watch?v=gE3Zg_sa0iY&amp;feature=related" target="_blank">http://www.youtube.com/watch?v=gE3Zg_sa0iY&amp;feature=related</a></p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/11/eindhoven-glow-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20 goto 10</title>
		<link>http://loekvandenouweland.com/index.php/2011/10/20-goto-10/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/10/20-goto-10/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 20:00:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=550</guid>
		<description><![CDATA[I set my first steps into programming in 1984. My father bought a Philips P2000T that housed a Z80 processor, used a teletext display chip and had a mini cassette player to store and load programs. Philips used Microsoft BASIC on their earlier released Videopac G7000 game console and used this also in the P2000. [...]]]></description>
			<content:encoded><![CDATA[<p>I set my first steps into programming in 1984. My father bought a Philips P2000T that housed a Z80 processor, used a teletext display chip and had a mini cassette player to store and load programs.</p>
<p><img class="alignnone size-full wp-image-551" title="p2000t" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/p2000t.jpg" alt="" width="400" height="254" /></p>
<p>Philips used Microsoft BASIC on their earlier released Videopac G7000 game console and used this also in the P2000. This programming language is responsible for my future love for computers. This weekend I dug up the computer from my parents basement and took it home. I was very surprised that it still worked after all these years. For old time sakes, I input my favorite statement and enjoyed the output very much:</p>
<p><img class="alignnone size-full wp-image-552" title="basic1" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/basic1.jpg" alt="" width="550" height="413" /></p>
<p><img class="alignnone size-full wp-image-554" title="basic2" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/basic2.jpg" alt="" width="550" height="413" /></p>
<p><img class="alignnone size-full wp-image-555" title="basic3" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/basic3.jpg" alt="" width="550" height="413" /></p>
<p>Soon after working on the P2000T, I bought a commodore64 where I learned assembler language and really started to learn the ins and outs of computers but when I look at the P2000T, it is like looking at my first love :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/10/20-goto-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XamlParseException occurred</title>
		<link>http://loekvandenouweland.com/index.php/2011/10/xamlparseexception-the-dictionary-key-is-already-used-key-attributes-are-used-as-keys-when-inserting-objects-into-a-dictionary-and-must-be-unique/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/10/xamlparseexception-the-dictionary-key-is-already-used-key-attributes-are-used-as-keys-when-inserting-objects-into-a-dictionary-and-must-be-unique/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 21:13:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=542</guid>
		<description><![CDATA[I know how lost you can feel when that happens. XamlParseExceptions can be caused by a lot of things. Most of the time the troubled resource is stated in the error. But if you get the following error, what are you going to search for? The dictionary key &#8221; is already used. Key attributes are [...]]]></description>
			<content:encoded><![CDATA[<p>I know how lost you can feel when that happens. XamlParseExceptions can be caused by a lot of things. Most of the time the troubled resource is stated in the error. But if you get the following error, what are you going to search for?</p>
<p><img class="alignnone size-full wp-image-548" title="xamlparserror" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/xamlparserror.png" alt="" width="448" height="267" /></p>
<h2>The dictionary key &#8221; is already used. Key attributes are used as keys when inserting objects into a dictionary and must be unique.</h2>
<p>If this error occurs, it&#8217;s possible there are implicit styles that target a type more than once. In my case I got stuck with the following code after a version control update:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;Style TargetType=&quot;ComboBox&quot; BasedOn=&quot;{StaticResource DefaultComboBoxStyle}&quot; /&gt;
&lt;Style TargetType=&quot;HyperlinkButton&quot; BasedOn=&quot;{StaticResource DefaultHyperlinkButtonStyle}&quot; /&gt;
&lt;Style TargetType=&quot;ComboBox&quot; BasedOn=&quot;{StaticResource DefaultComboBoxStyle}&quot; /&gt;
</pre>
<h2>Implicit style defined twice</h2>
<p>When I removed the second ComboBox style the error was gone. I hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/10/xamlparseexception-the-dictionary-key-is-already-used-key-attributes-are-used-as-keys-when-inserting-objects-into-a-dictionary-and-must-be-unique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Google Dart as an online collaboration calculator</title>
		<link>http://loekvandenouweland.com/index.php/2011/10/using-google-dart-as-an-online-collaboration-calculator/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/10/using-google-dart-as-an-online-collaboration-calculator/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 09:27:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=532</guid>
		<description><![CDATA[When I&#8217;m stuck on math questions I turn to my friend chris who can write pixel perfect C# code in a chat window. Yesterday I needed to calculate where a line intersects a circle so after a few google searches I came up with this Google Dart code: As it turned out, I made two [...]]]></description>
			<content:encoded><![CDATA[<p>When I&#8217;m stuck on math questions I turn to my friend <a href="http://www.chrismeijers.com/" target="_blank">chris</a> who can write pixel perfect C# code in a chat window. Yesterday I needed to calculate where a line intersects a circle so after a few google searches I came up with this Google Dart code:</p>
<pre class="brush: plain; title: ; notranslate">
double x1=100.0;
double y1=100.0;
double x2=200.0;
double y2=200.0;
double radians=Math.atan2(y2-y1, x2-x1) ;
double radius=50.0;
double y3=y2+radius * Math.cos(radians);
double x3=x2+radius * Math.sin(radians);
</pre>
<p>As it turned out, I made two mistakes. The last two lines should be:</p>
<pre class="brush: plain; title: ; notranslate">
double y3=y1+radius * Math.sin(radians);
double x3=x1+radius * Math.cos(radians);
</pre>
<p>How did I find out? Easy! I entered the code in the Dart editor and sent <a href="http://try-dart-lang.appspot.com/s/aFwa" target="_blank">the generated link</a> to Chris. He looked at the code, made some changes and sent a link back.</p>
<h2>Calculate intersection point of line and circle</h2>
<p>I wrote this post to point out the power of a shared code editor and to show how to <a href="http://try-dart-lang.appspot.com/s/aFwa" target="_blank">calculate where a line intersects a circle</a>. Open the link in a recent Chrome or Firefox browser and press play!</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/10/using-google-dart-as-an-online-collaboration-calculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Class and property in the Google Dart language</title>
		<link>http://loekvandenouweland.com/index.php/2011/10/class-and-property-in-the-google-dart-language/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/10/class-and-property-in-the-google-dart-language/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 18:40:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=516</guid>
		<description><![CDATA[Today I played with the new Google Dart language and I liked what I saw. Google calls it &#8220;Structured Web Programming&#8221; and it&#8217;s purpose is replacing Javascript as the primary scripting language in browsers. One of the things I really miss in Javascript are proper classes. You can fake classes with functions but it is [...]]]></description>
			<content:encoded><![CDATA[<p>Today I played with the new <a href=" http://www.dartlang.org/">Google Dart language</a> and I liked what I saw. Google calls it &#8220;Structured Web Programming&#8221; and it&#8217;s purpose is replacing Javascript as the primary scripting language in browsers.</p>
<p>One of the things I really miss in Javascript are proper classes. You  can fake classes with functions but it is what it is. Not a Class (NaC). So in my example I rebuilt a C# class that we use a lot in our <a href="http://silverlighttraining.nl">Silverlight training</a>: &#8216;Employee&#8217;</p>
<p>The Employee class has a constructor that takes a Name (string) and Salary (double). It has a method RaiseSalary(double percentage) and a public property &#8216;Info&#8217; that returns info about the employee.</p>
<h2>Getting started</h2>
<p>So let&#8217;s start by opening <a href="http://try-dart-lang.appspot.com/" target="_blank">http://try-dart-lang.appspot.com/</a> in Chrome. I use Chrome 14.0.835.202.</p>
<h2>Dart code</h2>
<p>Let&#8217;s start with a main top level function main function:</p>
<pre class="brush: csharp; title: ; notranslate">
main() {
  print('Hello, Vera!');
}
</pre>
<p>Enter the code in the <a href="http://try-dart-lang.appspot.com/" target="_blank">Dart editor</a> and press the play button:</p>
<p><img class="alignnone size-full wp-image-522" title="dart1" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/dart1.png" alt="" width="550" height="465" /></p>
<h2>Employee class</h2>
<p>So here&#8217;s an example of a class with a public property in Google Dart:</p>
<pre class="brush: csharp; title: ; notranslate">
class Employee{
  String name;
  double salary;

  Employee(String name, double salary){
    this.name=name;
    this.salary=salary;
  }

  get Info()=&gt; &quot;Hello &quot;+name+&quot;, your salary is €&quot;+salary;

  RaiseSalary(double percentage){
    salary=salary+salary*percentage/100;
  }
}
</pre>
<p>Create and use this class like this:</p>
<pre class="brush: csharp; title: ; notranslate">
main() {
 var emp=new Employee(&quot;Vera&quot;,4500.0);
 print(emp.Info);
 emp.RaiseSalary(6);
 print(emp.Info);
}
</pre>
<p>Wich results in:</p>
<p><img class="alignnone size-full wp-image-523" title="resultdart" src="http://loekvandenouweland.com/wp-content/uploads/2011/10/resultdart.png" alt="" width="582" height="627" /></p>
<p>This is just a small example but it&#8217;s a nice start with Dart. You can find the <a href="http://www.dartlang.org/docs/spec/dartLangSpec.pdf">full Language specification</a> on the Dart website. Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/10/class-and-property-in-the-google-dart-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find unused resources in Silverlight or WPF with ResourceCounter</title>
		<link>http://loekvandenouweland.com/index.php/2011/08/find-unused-resources-in-silveright-or-wpf-with/</link>
		<comments>http://loekvandenouweland.com/index.php/2011/08/find-unused-resources-in-silveright-or-wpf-with/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 20:59:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://loekvandenouweland.com/?p=506</guid>
		<description><![CDATA[I am currently working on a very interesting Silverlight Project for Philips Healthcare. Like all projects it is rapidly growing and it’s time for some cleaning up. When you use Expression blend it’s easy to create static resources for everything you are going to re-use. Static resources are always loaded in Silverlight. Even if they [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently working on a very interesting Silverlight Project for Philips Healthcare. Like all projects it is rapidly growing and it’s time for some cleaning up.</p>
<p>When you use Expression blend it’s easy to create static resources for everything you are going to re-use. Static resources are always loaded in Silverlight. Even if they are not used. Unfortunately Expression Blend does not have a way to get rid of unused resources. Last year I built a small WPF app that analyses your project for you and indicates unused static resources. I’ve used it again today and decided to share it with you.</p>
<h2>ResourceCounter</h2>
<p>Download and extract <a href="http://loekvandenouweland.com/download/ResourceCounterExe.zip" target="_blank">ResourceCounter.zip</a> and run the exe.<br />
Enter a valid path to a Silverlight or WPF project and click ‘Analyse’</p>
<p><img class="alignnone size-full wp-image-510" title="resourcecounter" src="http://loekvandenouweland.com/wp-content/uploads/2011/08/resourcecounter.jpg" alt="" width="550" height="294" /></p>
]]></content:encoded>
			<wfw:commentRss>http://loekvandenouweland.com/index.php/2011/08/find-unused-resources-in-silveright-or-wpf-with/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

