<?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>XAML Braindumps</title>
	<atom:link href="http://blogs.dotnetkicks.com/juergengutsch/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.dotnetkicks.com/juergengutsch</link>
	<description>A blog about Sivlerlight, WP7, WPF and XAML</description>
	<lastBuildDate>Tue, 16 Apr 2013 03:51:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Unit-Testing Silverlight Projects</title>
		<link>http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/</link>
		<comments>http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/#comments</comments>
		<pubDate>Thu, 26 May 2011 08:04:39 +0000</pubDate>
		<dc:creator>juergengutsch</dc:creator>
				<category><![CDATA[MSTest]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[unit tests]]></category>
		<category><![CDATA[mstest]]></category>
		<category><![CDATA[nunit]]></category>

		<guid isPermaLink="false">http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/</guid>
		<description><![CDATA[In the last post, I wrote about, how to use ReSharper with Silverlight Unit Test Projects. Now I can do TDD with Silverlight very easily. But I don’t like the MSTest assertions syntax. In the Past I used NUnit to &#8230; <a href="http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In the last post, I wrote about, how to use ReSharper with Silverlight Unit Test Projects. Now I can do TDD with Silverlight very easily. <img src='http://blogs.dotnetkicks.com/juergengutsch/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>But I don’t like the MSTest assertions syntax. In the Past I used NUnit to write my tests. How can I use the NUnit syntax inside the Silverlight unit tests?</p>
<p>My first Idea was to write the NUnit assertions syntax by my own to encapsulate the MSTest. But the easiest way is to really use NUnit assertions in MSTest <img src='http://blogs.dotnetkicks.com/juergengutsch/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>How does this work?</p>
<p><strong>First of all:</strong> </p>
<p>Download NUnit for Silverlight: <a href="http://code.google.com/p/nunit-silverlight/">http://code.google.com/p/nunit-silverlight/</a> and reference to NUnit.Framework. <br />(Be sure the assemblies are unblocked. If not, unblock the assemblies in the file properties dialog)</p>
<p><strong>After that:</strong></p>
<p>Write a small alias in the usings of your test class:</p>
<p><code>using Assert = NUnit.Framework.Assert;</code>
<p><strong>Thats all:</strong></p>
<p>Now you can use the NUnit assertions syntax in your MSTest:</p>
<p><code>// Assert<br />Assert.That(result, Is.EqualTo(Visibility.Visible));<br />Assert.Throws&lt;Exception&gt;(() =&gt; hasItemsConverter.Convert(items, null, null, null));</code>
<p>This is not only a solution for Silverlight Unit Test, you can do this with all other MSTest where you want to use NUnit assertions <img src='http://blogs.dotnetkicks.com/juergengutsch/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Why does that work?</strong></p>
<p>Assertions are only simple tests. If the tests fail, a Exception will be thrown. This is the same procedure in all unit test frameworks. So you can mix the frameworks in your unit test projects.</p>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0px;padding:4px 4px 4px 4px"><a href="http://dotnet-kicks.de/kick/?url=http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/"><img src="http://dotnet-kicks.de/Services/Images/KickItImageGenerator.ashx?url=http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/&amp;bgcolor=3169AD&amp;fgcolor=FFFFFF&amp;border=000000&amp;cbgcolor=D4E1ED&amp;cfgcolor=000000" alt="DotNetKicks-DE Image" border="0" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.dotnetkicks.com/juergengutsch/2011/05/26/unit-testing-silverlight-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDD with SIlverlight Unit Test Projects</title>
		<link>http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/</link>
		<comments>http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/#comments</comments>
		<pubDate>Tue, 24 May 2011 15:15:56 +0000</pubDate>
		<dc:creator>juergengutsch</dc:creator>
				<category><![CDATA[AgUnit]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[unit tests]]></category>
		<category><![CDATA[agunit]]></category>
		<category><![CDATA[resharper]]></category>

		<guid isPermaLink="false">http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/</guid>
		<description><![CDATA[I have searched a while and I have tested many tools and frameworks, but I couldn’t a tool or framework that supports TDD in a right and quick way. The perfect way is to use the ReSharper Unit Test Runner, &#8230; <a href="http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have searched a while and I have tested many tools and frameworks, but I couldn’t a tool or framework that supports TDD in a right and quick way.</p>
<p>The perfect way is to use the ReSharper Unit Test Runner, which doesn’t supports Silverlight Unit Test Projects.</p>
<p>A view Weeks ago I also tested AgUnit (<a title="http://agunit.codeplex.com/" href="http://agunit.codeplex.com/">http://agunit.codeplex.com/</a>) but it doesn’t run with the latest version of Jetbrains ReSharper. </p>
<p>Today I tried AgUnit again, because there is a new version since May 9 2011. Now AgUnit runs really great <img src='http://blogs.dotnetkicks.com/juergengutsch/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>All you have to do, is to download AgUnit and extract all the files to ReSharpers “Plugins” folder. Now restart the Visual Studio and create a new Silverlight Unit Test Project and a small test class. </p>
<p><code>[TestClass]<br />public class Tests<br />{<br />&nbsp;&nbsp;&nbsp; [TestMethod]<br />&nbsp;&nbsp;&nbsp; public void TestMethod1()<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var hallo = "Hallo";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Assert.AreEqual(hallo, "Hallo");<br />&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; [TestMethod]<br />&nbsp;&nbsp;&nbsp; public void TestMethod2()<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var hallo = 100;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Assert.AreEqual(hallo, 100);<br />&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; [TestMethod]<br />&nbsp;&nbsp;&nbsp; public void TestMethod3()<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var hallo = 100;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Assert.AreEqual(hallo, 101);<br />&nbsp;&nbsp;&nbsp; }<br />} </code>
<p><strong>Update:</strong> Before using AgUnit you have to compile the test project and to ensure, that the project references to the System.Xml.Linq.dll  </p>
<p>Now I can start the unit tests using the green ReSharper icons or the unit test runner  </p>
<p><a href="http://blogs.dotnetkicks.com/juergengutsch/files/2011/05/testrunner.png"><img style="border-right-width: 0px;margin: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px" border="0" alt="testrunner" src="http://blogs.dotnetkicks.com/juergengutsch/files/2011/05/testrunner_thumb.png" width="244" height="217" /></a>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0px;padding:4px 4px 4px 4px"><a href="http://dotnet-kicks.de/kick/?url=http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/"><img src="http://dotnet-kicks.de/Services/Images/KickItImageGenerator.ashx?url=http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/&amp;bgcolor=3169AD&amp;fgcolor=FFFFFF&amp;border=000000&amp;cbgcolor=D4E1ED&amp;cfgcolor=000000" alt="DotNetKicks-DE Image" border="0" /></a></div></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.dotnetkicks.com/juergengutsch/2011/05/24/tdd-with-silverlight-unit-test-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP7 App: See# Party (part 1)</title>
		<link>http://blogs.dotnetkicks.com/juergengutsch/2011/05/09/wp7-app-see-party-part-1/</link>
		<comments>http://blogs.dotnetkicks.com/juergengutsch/2011/05/09/wp7-app-see-party-part-1/#comments</comments>
		<pubDate>Mon, 09 May 2011 05:28:12 +0000</pubDate>
		<dc:creator>juergengutsch</dc:creator>
				<category><![CDATA[Event Based Components]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[See# Party]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://blogs.dotnetkicks.com/juergengutsch/?p=27</guid>
		<description><![CDATA[&#8220;See# Party&#8221; (www.seesharpparty.de) is a great .NET community conference in Kreuzlingen (Switzerland) which is organized by the .NET user group of Konstanz-Kreuzlingen (www.dotnetkk.de) For this second conference, I will write a small Windows Phone 7 App, which allows the users &#8230; <a href="http://blogs.dotnetkicks.com/juergengutsch/2011/05/09/wp7-app-see-party-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>&#8220;See# Party&#8221; (<a href="http://www.seesharpparty.de">www.seesharpparty.de</a>) is a great .NET community conference in Kreuzlingen (Switzerland) which is organized by the .NET user group of Konstanz-Kreuzlingen (<a href="http://www.dotnetkk.de">www.dotnetkk.de</a>)</p>
<p>For this second conference, I will write a small Windows Phone 7 App, which allows the users to see all the informations about the speakers, the sessions and the twitter wall. The user (the attendee) has the possibility to create their very own agenda to see which session they want to visit.</p>
<p>In the following blog entries I want to describe the programming of that Windows phone 7 app. This Post starts a serial about creating a WP7 app for the attendees (and other user) of the .NET community conference &#8220;See# Party&#8221;</p>
<p>The app is hosted at the online repository &#8220;BitBucket&#8221; because I love Mercurial and all of its features:<br />
<a href="https://bitbucket.org/JuergenGutsch/seesharpparty/">https://bitbucket.org/JuergenGutsch/seesharpparty/</a><br />
Feel free to visit the Repository, take a look at the code, create some Issues or contribute some code.</p>
<p>The main goal is to create a clean code application with <strong>strong MVVM</strong> in the presentation logic and <strong>event based components</strong> in the business logic.</p>
<p>The base requirements can be found at BitBucket:<br />
<a href="https://bitbucket.org/JuergenGutsch/seesharpparty/issues?status=open">https://bitbucket.org/JuergenGutsch/seesharpparty/issues?status=open</a></p>
<p><strong>A small note about the name of the conference</strong> for all of you who don&#8217;t understand German:<br />
&#8220;See&#8221; is the German word of &#8220;Lake&#8221; (Kreuzlingen is at the Lake of Constance) and is nearly pronounced like the German pronunciation of the character &#8220;C&#8221;.<br />
So &#8220;C#&#8221; and &#8220;See#&#8221; is nearly pronounced in the same way.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.dotnetkicks.com/juergengutsch/2011/05/09/wp7-app-see-party-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publish resources of a CustomControl from an external library in Silverlight</title>
		<link>http://blogs.dotnetkicks.com/juergengutsch/2011/05/06/publish-resources-of-a-customcontrol-from-an-external-library-in-silverlight/</link>
		<comments>http://blogs.dotnetkicks.com/juergengutsch/2011/05/06/publish-resources-of-a-customcontrol-from-an-external-library-in-silverlight/#comments</comments>
		<pubDate>Fri, 06 May 2011 07:33:06 +0000</pubDate>
		<dc:creator>juergengutsch</dc:creator>
				<category><![CDATA[CustomControl]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blogs.dotnetkicks.com/juergengutsch/?p=14</guid>
		<description><![CDATA[Sometimes it’s useful to add a Style programmatically to a CustomControl. This part is very easy. You just have to allocate the Style in the Constructor of that Control: [code lang="csharp"]Style = (Style)Application.Current.Resources[&#34;BrowserWindowStyle&#34;];[/code] This Style is placed in the Current &#8230; <a href="http://blogs.dotnetkicks.com/juergengutsch/2011/05/06/publish-resources-of-a-customcontrol-from-an-external-library-in-silverlight/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Sometimes it’s useful to add a Style programmatically to a CustomControl.</p>
<p>This part is very easy. You just have to allocate the Style in the Constructor of that Control:</p>
<p>[code lang="csharp"]Style = (Style)Application.Current.Resources[&quot;BrowserWindowStyle&quot;];[/code]</p>
<p>This Style is placed in the Current resources of the Application. But what do you do, if you need a default Style which is not in the resources of your application? What do you do, if you don’t want to write the Style in C# directly in the Source of your Control?</p>
<p>You can add a XAML file with a ResourceDictionary to your Library. Maybe called “BrowserWindowStyle.xaml”</p>
<p>You can Load the XAML file as a ResourceDictionary object and add them to the MergeDictionaries of your current Application:</p>
<p>[code lang="csharp"]public BrowserWindow()<br />
{<br />
  var dic = ResourceHandler.ResolveResourceDictionaryByPath&lt;BrowserWindow&gt;(&quot;Dialogs/BrowserWindowStyle.xaml&quot;);<br />
  if (!Application.Current.Resources.MergedDictionaries.Contains(dic))<br />
  {<br />
    Application.Current.Resources.MergedDictionaries.Add(dic);<br />
  }</p>
<p>  Style = (Style)Application.Current.Resources[&quot;BrowserWindowStyle&quot;];<br />
}[/code]</p>
<p>Really simple, if you know how to do that <img src='http://blogs.dotnetkicks.com/juergengutsch/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The ResourceHandler is a small class which provides useful static methods to resolve resource paths:</p>
<p>[code lang="csharp"]public static ResourceDictionary ResolveResourceDictionaryByPath&lt;T&gt;(string path)<br />
{<br />
  var namespacePath = typeof(T).Assembly.ToString().Split(',')[0];</p>
<p>  var uri = new Uri(string.Format(&quot;/{0};component/{1}&quot;, namespacePath, path), UriKind.RelativeOrAbsolute);</p>
<p>  return new ResourceDictionary { Source = uri };<br />
}[/code]</p>
<div class="wlWriterHeaderFooter" style="text-align: left;margin: 0px;padding: 4px 4px 4px 4px"><a href="http://dotnet-kicks.de/kick/?url=http://blogs.dotnetkicks.com/juergengutsch/?p=14"><img src="http://dotnet-kicks.de/Services/Images/KickItImageGenerator.ashx?url=http://blogs.dotnetkicks.com/juergengutsch/?p=14&amp;bgcolor=3169AD&amp;fgcolor=FFFFFF&amp;border=000000&amp;cbgcolor=D4E1ED&amp;cfgcolor=000000" border="0" alt="DotNetKicks-DE Image" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.dotnetkicks.com/juergengutsch/2011/05/06/publish-resources-of-a-customcontrol-from-an-external-library-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://blogs.dotnetkicks.com/juergengutsch/2011/05/05/hello-world-2/</link>
		<comments>http://blogs.dotnetkicks.com/juergengutsch/2011/05/05/hello-world-2/#comments</comments>
		<pubDate>Thu, 05 May 2011 20:37:06 +0000</pubDate>
		<dc:creator>juergengutsch</dc:creator>
				<category><![CDATA[first post]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://blogs.dotnetkicks.com/juergengutsch/?p=1</guid>
		<description><![CDATA[Welcome to my first Post on Juergens DotNetKicks Blog. In this blog, I will provide articles about XAML related topics, such as Silverlight, Windows Phone 7, WPF and other XAML This is my first technology blog, which is complete written &#8230; <a href="http://blogs.dotnetkicks.com/juergengutsch/2011/05/05/hello-world-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>
<div>Welcome to my first Post on Juergens DotNetKicks Blog.</div>
<div>In this blog, I will provide articles about XAML related topics, such as Silverlight, Windows Phone 7, WPF and other XAML</div>
<div>This is my first technology blog, which is complete written in English. I hope you will excuse some typos.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.dotnetkicks.com/juergengutsch/2011/05/05/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
