<?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>JAPF &#187; resharper</title>
	<atom:link href="http://www.japf.fr/tag/resharper/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.japf.fr</link>
	<description>Jeremy Alles Presentation Foundation: WPF, Silverlight, Windows Phone 7, Windows 8</description>
	<lastBuildDate>Fri, 27 Jan 2012 07:57:31 +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>ReSharper and code generation</title>
		<link>http://www.japf.fr/2012/01/resharper-and-code-generation/</link>
		<comments>http://www.japf.fr/2012/01/resharper-and-code-generation/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 12:58:39 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[resharper]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=1053</guid>
		<description><![CDATA[I don&#8217;t know why I&#8217;ve found this feature only today, but I wanted to share another great feature of ReSharper. Let say you need to implement a C# structure. You may start with the following code: ?View Code CSHARP1 2 3 4 5 6 public struct ServerItem &#123; public string Id &#123; get; private set; [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why I&#8217;ve found this feature only today, but I wanted to share another great feature of ReSharper. Let say you need to implement a C# structure. You may start with the following code:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1053code4'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10534"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p1053code4"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">struct</span> ServerItem
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Id <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> DateTime<span style="color: #008000;">?</span> Added <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">int</span> ChildCount <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Then you start thinking, &#8220;I need to setup a constructor&#8230;&#8221; You can do it manually, but you can also ask ReSharper do to the job for you. All you have to do is press ALT+Enter (this might depend on your configuration obviously&#8230;)</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/GeneratorCtor.png" rel="lightbox[1053]"><img class="alignnone size-full wp-image-1056" title="GeneratorCtor" src="http://www.japf.fr/wp-content/uploads/2012/01/GeneratorCtor.png" alt="" width="324" height="237" /></a></p>
<p>ReSharper will generate the constructor for you:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1053code5'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10535"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p1053code5"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">struct</span> ServerItem
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> ServerItem<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> id, DateTime<span style="color: #008000;">?</span> added, <span style="color: #6666cc; font-weight: bold;">int</span> childCount<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span> <span style="color: #008000;">=</span> id<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Added</span> <span style="color: #008000;">=</span> added<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ChildCount</span> <span style="color: #008000;">=</span> childCount<span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Id <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> DateTime<span style="color: #008000;">?</span> Added <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">int</span> ChildCount <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Fine. Then you remember that you also need to setup equality members properly&#8230; You have to override Equals, GetHashCode&#8230; This is not complicated but it can become cumbersome and it often feels like a waste of time. Here is the ReSharper way of doing this:</p>
<p>1. Press ALT+Enter</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/GenerateEquals0.png" rel="lightbox[1053]"><img class="alignnone size-full wp-image-1054" title="GenerateEquals0" src="http://www.japf.fr/wp-content/uploads/2012/01/GenerateEquals0.png" alt="" width="433" height="236" /></a></p>
<p>2. Choose &#8220;Equality members&#8221; and setup the code generation:</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/GenerateEquals1.png" rel="lightbox[1053]"><img class="alignnone  wp-image-1055" title="GenerateEquals1" src="http://www.japf.fr/wp-content/uploads/2012/01/GenerateEquals1.png" alt="" width="378" height="378" /></a></p>
<p>And BOOOM ! You&#8217;re done:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1053code6'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10536"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
</pre></td><td class="code" id="p1053code6"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">struct</span> ServerItem
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> ServerItem<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> id, DateTime<span style="color: #008000;">?</span> added, <span style="color: #6666cc; font-weight: bold;">int</span> childCount<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span> <span style="color: #008000;">=</span> id<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Added</span> <span style="color: #008000;">=</span> added<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ChildCount</span> <span style="color: #008000;">=</span> childCount<span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Id <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> DateTime<span style="color: #008000;">?</span> Added <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">int</span> ChildCount <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">private</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">bool</span> Equals<span style="color: #008000;">&#40;</span>ServerItem other<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> Equals<span style="color: #008000;">&#40;</span>other<span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span>, <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&amp;&amp;</span> other<span style="color: #008000;">.</span><span style="color: #0000FF;">Added</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Equals</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Added</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&amp;&amp;</span> other<span style="color: #008000;">.</span><span style="color: #0000FF;">ChildCount</span> <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ChildCount</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">bool</span> Equals<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> obj<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>ReferenceEquals<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, obj<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>obj<span style="color: #008000;">.</span><span style="color: #0000FF;">GetType</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">!=</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>ServerItem<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> Equals<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>ServerItem<span style="color: #008000;">&#41;</span>obj<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">int</span> GetHashCode<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008000;">unchecked</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #6666cc; font-weight: bold;">int</span> result <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span> <span style="color: #008000;">?</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetHashCode</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">:</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            result <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>result <span style="color: #008000;">*</span> <span style="color: #FF0000;">397</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">^</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Added</span><span style="color: #008000;">.</span><span style="color: #0000FF;">HasValue</span> <span style="color: #008000;">?</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Added</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetHashCode</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">:</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            result <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>result <span style="color: #008000;">*</span> <span style="color: #FF0000;">397</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">^</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ChildCount</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> result<span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">bool</span> <span style="color: #0600FF; font-weight: bold;">operator</span> <span style="color: #008000;">==</span><span style="color: #008000;">&#40;</span>ServerItem left, ServerItem right<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> left<span style="color: #008000;">.</span><span style="color: #0000FF;">Equals</span><span style="color: #008000;">&#40;</span>right<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">bool</span> <span style="color: #0600FF; font-weight: bold;">operator</span> <span style="color: #008000;">!=</span><span style="color: #008000;">&#40;</span>ServerItem left, ServerItem right<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #008000;">!</span>left<span style="color: #008000;">.</span><span style="color: #0000FF;">Equals</span><span style="color: #008000;">&#40;</span>right<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The code-generation features of ReSharper has been there for a long time&#8230; But because I just found out the power of them, I wanted to briefly showcased them in this post <img src='http://www.japf.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2012/01/resharper-and-code-generation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>If you like typing XAML you will love ReSharper 6.1 !</title>
		<link>http://www.japf.fr/2012/01/if-you-like-typing-xaml-you-will-love-resharper-6-1/</link>
		<comments>http://www.japf.fr/2012/01/if-you-like-typing-xaml-you-will-love-resharper-6-1/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:42:25 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=1029</guid>
		<description><![CDATA[Resharper is an amazing tool for any .Net developers. The latest version 6.1 has been released just a couple of weeks ago and I wanted to share with you a brief overview of the new workflow available in the XAML world ! Visual Studio 2010 introduced 2 new design time properties: d:DesignInstance and d:DesignData. Those [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jetbrains.com/resharper/">Resharper</a> is an amazing tool for any .Net developers. The latest version 6.1 has been released just a couple of weeks ago and I wanted to share with you a brief overview of the new workflow available in the XAML world !</p>
<p>Visual Studio 2010 introduced 2 new design time properties: d:DesignInstance and d:DesignData. Those properties can be used in order to specify a design time DataContext in order to have more help during the creation of a binding.</p>
<p>For example, when you create a binding using the Property dialog of VS2010 you can browse your DataContext to select the right property (image from this <a href="http://karlshifflett.wordpress.com/2009/10/28/ddesigninstance-ddesigndata-in-visual-studio-2010-beta2/">blog post</a> from <a href="http://karlshifflett.wordpress.com/">Karl Shifflet</a>):</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/bindingbuilder_thumb.png" rel="lightbox[1029]"><img class="alignnone size-medium wp-image-1031" title="bindingbuilder_thumb" src="http://www.japf.fr/wp-content/uploads/2012/01/bindingbuilder_thumb-300x291.png" alt="" width="300" height="291" /></a></p>
<p>Resharper 6.1 is now able to use those metadata in order to improve the experience you have while typing XAML (which I personally do a LOT!). Here is how it works:</p>
<ul>
<li>you create a new ViewModel with a simple property (this property has just get/set because we don&#8217;t need much more in the context of this post&#8230;)</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/01.png" rel="lightbox[1029]"><img class="alignnone size-medium wp-image-1034" title="01" src="http://www.japf.fr/wp-content/uploads/2012/01/01-300x99.png" alt="" width="300" height="99" /></a></p>
<ul>
<li>you setup a binding in your view</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/02.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1035" title="02" src="http://www.japf.fr/wp-content/uploads/2012/01/02.png" alt="" width="514" height="126" /></a></p>
<p>At this point the ReSharper magic comes into play&#8230;</p>
<ul>
<li>ReSharper warns you the DataContext is unknown</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/02.1.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1043" title="02.1" src="http://www.japf.fr/wp-content/uploads/2012/01/02.1.png" alt="" width="565" height="126" /></a></p>
<ul>
<li>Offer the ability to fix this</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/03.png" rel="lightbox[1029]"><img title="03" src="http://www.japf.fr/wp-content/uploads/2012/01/03.png" alt="" width="545" height="271" /></a></p>
<ul>
<li>Note that like in C#, you can very easily resolve namespace issues</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/041.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1046" title="04" src="http://www.japf.fr/wp-content/uploads/2012/01/041.png" alt="" width="602" height="192" /></a></p>
<ul>
<li>Then notice that the warning is gone (the Title property is no longer underlined)</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/06.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1039" title="06" src="http://www.japf.fr/wp-content/uploads/2012/01/06.png" alt="" width="577" height="191" /></a></p>
<ul>
<li>You can now add a new binding</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/07.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1040" title="07" src="http://www.japf.fr/wp-content/uploads/2012/01/07.png" alt="" width="576" height="207" /></a></p>
<ul>
<li>You can then ask ReSharper to create the property in your ViewModel</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/08.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1041" title="08" src="http://www.japf.fr/wp-content/uploads/2012/01/08.png" alt="" width="580" height="378" /></a></p>
<ul>
<li>Choosing the first option will get you to the ViewModel definition</li>
</ul>
<p><a href="http://www.japf.fr/wp-content/uploads/2012/01/09.png" rel="lightbox[1029]"><img class="alignnone size-full wp-image-1042" title="09" src="http://www.japf.fr/wp-content/uploads/2012/01/09.png" alt="" width="417" height="242" /></a></p>
<p>Now that I&#8217;ve upgraded my installation to version 6.1, I think this is a must have !</p>
<p>That&#8217;s all for today ! Hope it helps <img src='http://www.japf.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2012/01/if-you-like-typing-xaml-you-will-love-resharper-6-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>R# can create resources for you in XAML</title>
		<link>http://www.japf.fr/2010/04/resharper-to-creates-resources-in-xaml/</link>
		<comments>http://www.japf.fr/2010/04/resharper-to-creates-resources-in-xaml/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 12:33:36 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=498</guid>
		<description><![CDATA[I was aware for some time now that R# offers some support for editing XAML but I didn&#8217;t know the following features until recently.When you create a StaticResource in XAML, R# is able to help you by generating some code for you. The famous R# &#8220;bubble&#8221; shows up offering various options to create the resource: [...]]]></description>
			<content:encoded><![CDATA[<p>I was aware for some time now that R# offers some support for editing XAML but I didn&#8217;t know the following features until recently.When you create a StaticResource in XAML, R# is able to help you by generating some code for you. The famous R# &#8220;bubble&#8221; shows up offering various options to create the resource:</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2010/04/2.png" rel="lightbox[498]"><img class="alignnone size-full wp-image-501" title="2" src="http://www.japf.fr/wp-content/uploads/2010/04/2.png" alt="" width="507" height="191" /></a></p>
<p>Then the resource is automatically created for you:</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2010/04/3.png" rel="lightbox[498]"><img class="alignnone size-full wp-image-502" title="3" src="http://www.japf.fr/wp-content/uploads/2010/04/3.png" alt="" width="469" height="173" /></a></p>
<p>Note that it works with converter too:</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2010/04/4.png" rel="lightbox[498]"><img class="alignnone size-full wp-image-503" title="4" src="http://www.japf.fr/wp-content/uploads/2010/04/4.png" alt="" width="691" height="255" /></a></p>
<p>R# 5.0 has been released a couple of weeks ago. Go ahead and <a href="http://www.jetbrains.com/resharper/">grab your copy</a> !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2010/04/resharper-to-creates-resources-in-xaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review of 2009 blog posts</title>
		<link>http://www.japf.fr/2010/01/review-of-2009-blog-posts/</link>
		<comments>http://www.japf.fr/2010/01/review-of-2009-blog-posts/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 19:01:42 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[model-view-viewmodel]]></category>
		<category><![CDATA[mvvm]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs2010]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=391</guid>
		<description><![CDATA[In the past year, I&#8217;ve posted more than 30 articles on my blog. Here is a summary of those posts (link in bold are those which got the most traffic during the year). Obviously, MVVM was a very hot topic during 2009 January XAML guidelines: interviews of WPF masters photoSuru: a WPF application with spectacular [...]]]></description>
			<content:encoded><![CDATA[<p>In the past year, I&#8217;ve posted more than 30 articles on my blog. Here is a summary of those posts (link in bold are those which got the most traffic during the year). Obviously, MVVM was a very hot topic during 2009 <img src='http://www.japf.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>January</p>
<ul>
<li><a href="http://www.japf.fr/2009/01/xaml-guidelines-interviews-from-wpf-masters/">XAML guidelines: interviews of WPF masters</a></li>
<li><a href="http://www.japf.fr/2009/01/photosuru-a-wpf-application-with-spectacular-user-experience/">photoSuru: a WPF application with spectacular user experience</a></li>
<li><a href="http://www.japf.fr/2009/01/model-view-viewmodel-commands-and-inputbindings/">Model-View-ViewModel, Commands and InputBindings</a></li>
<li><a href="http://www.japf.fr/2009/01/filtering-with-or-without-icollectionview/">Filtering with or without ICollectionView ?</a></li>
<li><a href="http://www.japf.fr/2009/01/why-i-love-linq/">Why do I love Extension Methods in System.Linq ?</a></li>
<li><a href="http://www.japf.fr/2009/01/using-extension-methods-to-raise-an-event/">Using extension methods to raise an event</a></li>
</ul>
<p>February</p>
<ul>
<li><strong><a href="http://www.japf.fr/2009/02/very-simple-mvvm-demo-application/">Very simple MVVM demo application</a></strong></li>
<li><a href="http://www.japf.fr/2009/02/vs2010-ui/">VS2010 UI</a></li>
</ul>
<p>March</p>
<ul>
<li><a href="http://www.japf.fr/2009/03/french-article-about-mvvm-posted/">French article about MVVM posted !</a></li>
<li><strong><a href="http://www.japf.fr/2009/03/thinking-with-mvvm-data-templates-contentcontrol/">Thinking with MVVM: Data Templates + ContentControl</a></strong></li>
<li><a href="http://www.japf.fr/2009/03/mix09-starts-today/">MIX09 starts today !</a></li>
<li><a href="http://www.japf.fr/2009/03/first-look-at-expression-blend-3/">First look at Expression Blend 3 !</a></li>
<li><a href="http://www.japf.fr/2009/03/the-future-of-wpf-at-mix09/">The future of WPF at Mix09</a></li>
</ul>
<p>April</p>
<ul>
<li><a href="http://www.japf.fr/2009/04/adding-transitions-to-a-mvvm-based-dialog/">Adding transitions to a MVVM based dialog</a></li>
</ul>
<p>May</p>
<ul>
<li><a href="http://www.japf.fr/2009/05/browse-your-codebase-like-a-pro-with-resharper/">Browse your codebase like a pro with ReSharper</a></li>
<li><a href="http://www.japf.fr/2009/05/visual-studio-2010-beta1-available-with-net4-and-wpf4-included/">Visual Studio 2010: Beta1 available with .Net4 and WPF4 included</a></li>
<li><a href="http://www.japf.fr/2009/05/net4-wpf4-and-vs2010-interesting-links/">.Net4, WPF4 and VS2010 interesting links</a></li>
</ul>
<p>July</p>
<ul>
<li><a href="http://www.japf.fr/2009/07/beziersegment-demo-application/">BezierSegment demo application</a></li>
</ul>
<p>August</p>
<ul>
<li><a href="http://www.japf.fr/2009/08/learn-how-net-manages-memory-in-15min/">Learn how .Net manages memory in 15min</a></li>
<li><a href="http://www.japf.fr/2009/08/wpf-memory-leak-with-eventmanager-registerclasshandler/">WPF possible memory leak with EventManager.RegisterClassHandler</a></li>
</ul>
<p>September</p>
<ul>
<li><a href="http://www.japf.fr/2009/09/how-to-close-a-view-from-a-viewmodel/">How to close a View from a ViewModel ?</a></li>
</ul>
<p>October</p>
<ul>
<li><a href="http://www.japf.fr/2009/10/a-quick-tour-of-existing-mvvm-frameworks/">A quick tour of existing MVVM frameworks</a></li>
<li><a href="http://www.japf.fr/2009/10/the-cost-of-building-visual-trees/">The cost of building Visual Trees</a></li>
<li><a href="http://www.japf.fr/2009/10/announcing-the-wpf-internals-series/">Announcing the “WPF internals” series</a></li>
<li><a href="http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/">Analyzing events usage using a R# plugin</a></li>
<li><strong><a href="http://www.japf.fr/2009/10/wpf-internals-part-1-what-are-the-core-wpf-classes/">WPF internals part 1 : what are the core WPF classes ?</a></strong></li>
<li><a href="http://www.japf.fr/2009/10/vs2010-beta-2-coming-today/">VS2010 Beta 2 coming today !</a></li>
<li><a href="http://www.japf.fr/2009/10/measure-rendering-time-in-a-wpf-application/">How to measure rendering time in a WPF application ?</a></li>
</ul>
<p>November</p>
<ul>
<li><a href="http://www.japf.fr/2009/11/using-snoop-with-vs2010/">Using Snoop to take a look at VS2010 !</a></li>
<li><a href="http://www.japf.fr/2009/11/pdc09-some-announcements/">PDC09: some announcements</a></li>
<li><a href="http://www.japf.fr/2009/11/pdc09-some-wpf-sessions-are-available/">PDC09: some WPF sessions are available !</a></li>
<li><a href="http://www.japf.fr/2009/11/pdc09-wpf-application-performance-tuning/">PDC09: Advanced WPF Application Performance Tuning</a></li>
<li><a href="http://www.japf.fr/2009/11/pdc09-how-vs2010-was-built-with-wpf/">PDC09 : How VS2010 was built with WPF ?</a></li>
<li><strong><a href="http://www.japf.fr/2009/11/discover-compare-existing-mvvm-frameworks/">Discover and compare existing MVVM frameworks !</a></strong></li>
</ul>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;"><strong><a class="row-title" title="Edit “Discover and compare existing MVVM frameworks !”" href="post.php?action=edit&amp;post=369">Discover and compare existing MVVM frameworks !</a></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2010/01/review-of-2009-blog-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing events usage using a R# plugin</title>
		<link>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/</link>
		<comments>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 12:20:47 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[practises]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[resharper]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=286</guid>
		<description><![CDATA[As you might already know, even if the .Net framework has a garbage collector, you can easily create memory leaks in your application. The most common way to create a leak is to register to an event handler on a object that has a longer lifetime than the object where the handler is defined. The [...]]]></description>
			<content:encoded><![CDATA[<p>As you might already know, even if the .Net framework has a garbage collector, you can easily create memory leaks in your application.</p>
<p>The most common way to create a leak is to register to an event handler on a object that has a longer lifetime than the object where the handler is defined. The problem can also occurs by using static class such as EventManager (for more information see <a href="http://www.japf.fr/2009/08/wpf-memory-leak-with-eventmanager-registerclasshandler/">this blog post</a>). Some .Net developers have been working on a way to go round the problem using Reflection, Weak Reference and other cool stuff. You can check out for example <a href="http://www.codeproject.com/KB/cs/WeakEvents.aspx">this excellent article</a> on Code Project.</p>
<p>However, if you cannot change the way your declare events (because of internal policies in the company or because you don&#8217;t have the source code), you must be very carefull about the way you manage your events.</p>
<p>I&#8217;ve been working lately on a <a href="http://www.jetbrains.com/resharper/index.html">Resharper</a> plugin that helps detecting events that are never unsubscribed. Basically, what is does is the following:</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2009/10/resharper_plugin.png" rel="lightbox[286]"><img class="size-full wp-image-287 alignnone" title="resharper_plugin" src="http://www.japf.fr/wp-content/uploads/2009/10/resharper_plugin.png" alt="resharper_plugin" width="528" height="213" /></a></p>
<p><strong>I&#8217;d like to have feedback from you .Net developpers, about whether you find such a plugin useful or not. </strong></p>
<ul>
<li>How do you deal with the event memory leak problem ?</li>
<li>Would you like to use my plugin ?</li>
<li>Would you like me to release it on a open source platform ?</li>
<li>What other kind of possible leaks are you thinking about to enhance the plugin ?</li>
</ul>
<p>Please write a comment to let my know what you think. Thank you for your feedback !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Browse your codebase like a pro with ReSharper</title>
		<link>http://www.japf.fr/2009/05/browse-your-codebase-like-a-pro-with-resharper/</link>
		<comments>http://www.japf.fr/2009/05/browse-your-codebase-like-a-pro-with-resharper/#comments</comments>
		<pubDate>Mon, 18 May 2009 11:27:03 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Stutio]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=211</guid>
		<description><![CDATA[I&#8217;ve already blogged about R# a couple of times. There is no doubt: it&#8217;s a must have for any serious .Net developper. A few weeks ago I learned and setup new shortcuts to improve my navigation skills in Visual Studio. Here are the results&#8230; If I want: to find a Type I hit Ctrl+T to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve already blogged about R# a couple of times. There is no doubt: it&#8217;s a must have for any serious .Net developper. A few weeks ago I learned and setup new shortcuts to improve my navigation skills in Visual Studio.</p>
<p>Here are the results&#8230; If I want:</p>
<ul>
<li>to find a <strong>Type</strong> I hit <strong>Ctrl+T</strong></li>
<li>to find a <strong>File</strong> I hit <strong>Ctrl+Shift+T</strong></li>
<li>to find a <strong>Member</strong> (in a file) I hit <strong>Ctrl+Alt+T</strong> (Note: I setup this one on my own using Tools/Options/Keyboard)</li>
</ul>
<p>A search box opens and I can start searching instantaneously.</p>
<p><a href="http://www.japf.fr/wp-content/uploads/2009/05/resharpernavigation1.png" rel="lightbox[211]"><img class="alignnone size-medium wp-image-217" title="resharpernavigation1" src="http://www.japf.fr/wp-content/uploads/2009/05/resharpernavigation1-300x92.png" alt="resharpernavigation1" width="300" height="92" /></a></p>
<p>Here are the basic scenarios :</p>
<ul>
<li>I want to open the <strong>ViewModelBase</strong> class, I hit <strong>Ctrl+T</strong> and then <strong>VMB</strong> (R# is able to search using capital letters)</li>
<li>I want to go to the <strong>OnPropertyChanged</strong>, I hit <strong>Ctrl+Alt+T</strong> and then <strong>OPC</strong> (same as previous example)</li>
<li>Finally, to open the file in the Solution Explorer I hit <strong>Shift+Alt+L</strong></li>
</ul>
<p>It&#8217;s simply amazing the time we can save using those simple shorcuts. Of course, you need to be quite familiar with your codebase (if you just arrive on a project it will be harder :p)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2009/05/browse-your-codebase-like-a-pro-with-resharper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Becoming a Resharper Samourai</title>
		<link>http://www.japf.fr/2008/12/becoming-a-resharper-samourai/</link>
		<comments>http://www.japf.fr/2008/12/becoming-a-resharper-samourai/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 10:23:54 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[resharper]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=71</guid>
		<description><![CDATA[I already blogged about Resharper. Resharper is a must have plugin for any serious .Net developer because it will help you to write better code faster. If you&#8217;re not yet convinced by the power of this addin, 2 very nice short screencast (about 10min each) are available to show what you can do with Resharper: [...]]]></description>
			<content:encoded><![CDATA[<p>I already <a href="http://www.japf.fr/?p=55">blogged about Resharper</a>. <a href="http://www.jetbrains.com/resharper/">Resharper</a> is a must have plugin for any serious .Net developer because it will help you to write better code faster. If you&#8217;re not yet convinced by the power of this addin, 2 very nice short screencast (about 10min each) are available to show what you can do with Resharper:</p>
<ul>
<li><a href="http://www.dimecasts.net/Casts/CastDetails/61" target="_blank">http://www.dimecasts.net/Casts/CastDetails/61</a></li>
<li><a href="http://www.dimecasts.net/Casts/CastDetails/68" target="_blank">http://www.dimecasts.net/Casts/CastDetails/68</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2008/12/becoming-a-resharper-samourai/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>StyleCop + Resharper = StyleCop for Resharper addin</title>
		<link>http://www.japf.fr/2008/11/stylecop-resharper-stylecop-for-resharper-addin/</link>
		<comments>http://www.japf.fr/2008/11/stylecop-resharper-stylecop-for-resharper-addin/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 09:22:30 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[practises]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[resharper]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=55</guid>
		<description><![CDATA[If you&#8217;re a .Net developper then you MUST use ReSharper. I you don&#8217;t, I suggest you to have a look at this very nice video demonstrating some of the feature of this Visual Studio addin. If you also like having a clean C# code, then you might also use Microsoft StyleCop tool. I just found [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a .Net developper then you <strong>MUST </strong>use ReSharper. I you don&#8217;t, I suggest you to have a look at <a href="http://www.dimecasts.net/Casts/CastDetails/61">this very nice video</a> demonstrating some of the feature of this Visual Studio addin. If you also like having a clean C# code, then you might also use <a href="http://code.msdn.microsoft.com/sourceanalysis">Microsoft StyleCop tool</a>.</p>
<p>I just found this a <a href="http://www.codeplex.com/StyleCopForReSharper">very cool Resharper</a> plugin that<span id="ctl00_ctl00_MasterContent_TabContentPanel_Content_wikiSourceLabel"> allows Microsoft StyleCop to be run as you type, generating real-time syntax highlighting of violations:</span></p>
<p><a href="http://www.japf.fr/wp-content/uploads/2008/11/stylecopresharper.png" rel="lightbox[55]"><img class="alignnone size-medium wp-image-56" title="stylecopresharper" src="http://www.japf.fr/wp-content/uploads/2008/11/stylecopresharper-300x231.png" alt="" width="397" height="305" /></a></p>
<p>The <a href="http://www.codeplex.com/StyleCopForReSharper">StyleCop for Resharper plugin</a> is hosted on <a href="http://www.codeplex.com">CodePlex</a> and is free. I think it&#8217;s a must have for any .Net developer. Its author really did a good work <img src='http://www.japf.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.japf.fr%2f%3fp%3d55"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.japf.fr%2f%3fp%3d55" border="0" alt="kick it on DotNetKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2008/11/stylecop-resharper-stylecop-for-resharper-addin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

