<?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>tewari &#187; code</title>
	<atom:link href="http://www.tewari.info/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tewari.info</link>
	<description>Professional Software Development by Ash Tewari</description>
	<lastBuildDate>Thu, 03 Jun 2010 01:52:16 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Win Advanced MVVM Book</title>
		<link>http://www.tewari.info/2010/05/09/win-advanced-mvvm-book/</link>
		<comments>http://www.tewari.info/2010/05/09/win-advanced-mvvm-book/#comments</comments>
		<pubDate>Mon, 10 May 2010 03:33:06 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[xaml]]></category>
		<category><![CDATA[CodeCamp]]></category>
		<category><![CDATA[mvvm]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://www.tewari.info/?p=200</guid>
		<description><![CDATA[	I am presenting a session on Building WPF Application using MVVM (Model-View-ViewModel) on May 15th at the Carolina Code Camp 2010.
	I will dissect a Sample WPF MVVM application and then highlight the most important aspects of the MVVM by coding a brand new ViewModel and incorporating it into the application. You will learn about the [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="../library/josh-smith/advanced-mvvm/"><img class="alignleft" title="Advanced MVVM Cover" src="http://www.tewari.info/wp-content/advancedmvvmcover.jpg" alt="Advanced MVVM Cover" width="246" height="320" /></a>I am presenting a session on Building WPF Application using MVVM (<a title="Wikipedia-MVVM" href="http://en.wikipedia.org/wiki/Model_View_ViewModel">Model-View-ViewModel</a>) on May 15th at the <a title="Carolina Code Camp 2010" href="http://codecamp.developersguild.org/">Carolina Code Camp</a> 2010.</p>
	<p>I will dissect a Sample WPF MVVM application and then highlight the most important aspects of the MVVM by coding a brand new ViewModel and incorporating it into the application. You will learn about the Roles of the MVVM triad, the advantages of using MVVM and Characteristics of the ViewModel.</p>
	<p>Attendees will be eligible to win <del datetime="2010-06-02T01:39:18+00:00">two copies</del> one copy (see below) of <a title="Josh Smith" href="http://joshsmithonwpf.wordpress.com/">Josh Smith&#8217;s</a> <a title="advanced-mvvm-book" href="http://joshsmithonwpf.wordpress.com/advanced-mvvm/">Advanced MVVM book</a> as well as a few other WPF Books.</p>
	<p><em>{ I will be giving away one hard copy version of the book instead of digital versions due to concerns about DRM protection and unclear gift guidelines at lulu.com }</em>.</p>
	<p>And the winner is &#8230; Mark Freeman !!! Congratulations Mark, your copy of &#8220;Advanced MVVM&#8221; is on its way. Thanks for attending the code camp and your feedback.<br />
<hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=200&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_200" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2010/05/09/win-advanced-mvvm-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Model-View-ViewModel in WPF Applications</title>
		<link>http://www.tewari.info/2010/01/25/using-model-view-viewmodel-in-wpf-applications/</link>
		<comments>http://www.tewari.info/2010/01/25/using-model-view-viewmodel-in-wpf-applications/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:23:39 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[xaml]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[mvvm]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[socalcodecamp]]></category>

		<guid isPermaLink="false">http://www.tewari.info/?p=155</guid>
		<description><![CDATA[	I am presenting at SoCalCodeCamp this weekend (January 30th, 2010) - Advanced WPF &#8211; Using Model-View-ViewModel in WPF Applications.
	Agenda :
	1. Roles of the M-V-VM triad
	2. Why use M-V-VM ?
	3. Characteristics of the ViewModel
	4. Build a Sample WPF Application using M-V-VM
	
	Resources :
	
	MSDN Magazine Article and Sample Application Download
	Martin Fowler’s  description of the ‘Presentation Model ‘
	Jeremy [...]]]></description>
			<content:encoded><![CDATA[	<div class="mceTemp">I am presenting at <a title="socalcodecamp website" href="http://www.socalcodecamp.com/" target="_self">SoCalCodeCamp</a> this weekend (January 30th, 2010) -<a title="WPF MVVM Presntation " href="http://www.socalcodecamp.com/socalcodecamp/session.aspx?sid=0b2ee44f-595d-4f55-a5d6-2b1293f546d0" target="_self"> Advanced WPF &#8211; Using Model-View-ViewModel in WPF Applications</a>.</div>
	<p><div id="attachment_156" class="wp-caption alignnone" style="width: 460px"><img class="size-full wp-image-156" title="Sample WPF App - TaskList" src="http://www.tewari.info/wp-content/tasklist.png" alt="tasklist-mockup" width="450" height="256" /><p class="wp-caption-text">tasklist-mockup</p></div></p>
	<p>Agenda :</p>
	<div>1. Roles of the M-V-VM triad</div>
	<div>2. Why use M-V-VM ?</div>
	<div>3. Characteristics of the ViewModel</div>
	<div>4. Build a Sample WPF Application using M-V-VM</div>
	<p></br></br></p>
	<p>Resources :</p>
	<ol>
	<li><a title="MSDN Magazine Article" href="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx">MSDN Magazine Article</a> and Sample Application <a title="Download Demo Application Code" href="http://code.msdn.microsoft.com/mag200902MVVM/Release/ProjectReleases.aspx">Download</a></li>
	<li><a title="MartinFowler.com" href="http://martinfowler.com/eaaDev/PresentationModel.html">Martin Fowler’s  description of the ‘Presentation Model ‘</a></li>
	<li><a title="Jeremy Miller's - Build Your CAB" href="http://codebetter.com/blogs/jeremy.miller/archive/2007/07/25/the-build-your-own-cab-series-table-of-contents.aspx">Jeremy Miller’s ‘Build Your Own CAB’ series</a></li>
	</ol>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=155&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_155" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2010/01/25/using-model-view-viewmodel-in-wpf-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReSharper vs CodeRush + Refactor Pro</title>
		<link>http://www.tewari.info/2009/02/21/resharper-vs-coderush-refactor-pro/</link>
		<comments>http://www.tewari.info/2009/02/21/resharper-vs-coderush-refactor-pro/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 17:43:03 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[coderush]]></category>
		<category><![CDATA[Comparison]]></category>
		<category><![CDATA[devexpress]]></category>
		<category><![CDATA[keyboard shortcuts]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2009/02/21/resharper-vs-coderush-refactor-pro/</guid>
		<description><![CDATA[	I have been playing with JetBrains ReSharper (version 4.1) and DevExpress CodeRush + Refactor! Pro (version 3.2.2) lately. I wanted to decide on which one to go with. Here are some notes -
	R# = ReSharper
CodeRush = CodeRush + Refactor! Pro
	
	R# seems to be better for      refactoring, because it does not assume [...]]]></description>
			<content:encoded><![CDATA[	<p class="MsoNormal" style="margin-bottom: 6pt">I have been playing with JetBrains <a href="http://www.jetbrains.com/resharper/">ReSharper </a>(version 4.1) and DevExpress <a href="http://devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/">CodeRush + Refactor! Pro</a> (version 3.2.2) lately. I wanted to decide on which one to go with. Here are some notes -</p>
	<p>R# = ReSharper<br />
CodeRush = CodeRush + Refactor! Pro</p>
	<ul type="disc">
	<li class="MsoNormal" style="margin-bottom: 6pt">R# seems to be better for      refactoring, because it does not assume that I follow a rigid work flow      when writing code. For example, I don&#8217;t always decide on the class      hierarchies upfront. I do discover them as I write code. So, when I      discover that I need to extract a base class from the class I am working      on, I can do so with R#. I couldn&#8217;t find a way to do extract a base/super class with CodeRush.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">In R#, I can create an      overloaded constructor using &#8220;Change Signature&#8221; refactoring      (Ctrl+R, S). I couldn&#8217;t find a way to do this in CodeRush. CodeRush does allow me to create overloaded methods.</li>
	</ul>
	<p class="MsoNormal" style="margin-bottom: 6pt; margin-left: 0.25in">However, comparisons that only focus on how many refactorings each tool can do are not very important to me. After all, it should be easy for the individual missing refactorings to be implemented in the subsequent releases of these tools. I want to know which one is a better investment in the long run. The investment is not just a couple of hundred dollars, it is going to be an investment of time too.</p>
	<ul type="disc">
	<li class="MsoNormal" style="margin-bottom: 6pt">R# &#8220;finds&#8221; Types as      you try to use them and adds references and &#8220;using&#8221; directives from      other projects in your solution. You will not believe how useful this is! You      don&#8217;t have to interrupt your train of thought to go add references and      &#8220;using&#8221; directives. CodeRush doesn&#8217;t do that.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">I found R# &#8220;<a href="http://www.jetbrains.com/resharper/features/code_generation.html#Create_from_Usage">Create      From Usage</a>&#8221; feature incredibly useful with <a title="TDD" href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank">TDD</a>. This feature will be available in <a title="Code Focused Development in VS 2010" href="http://blogs.msdn.com/somasegar/archive/2008/12/19/code-focused-development-in-vs-2010.aspx" target="_blank">Visual Studio 2010</a>.      They are calling it “Consume-First Development”.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">R# has keyboard shortcuts for      individual refactorings. All refactorings are accessible from ALT+ENTER or      ALT+R. Again, R# helps you keep focused on the code you are writing.       In CodeRush, individual refactorings don&#8217;t have keyboard shortcuts.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">R# allows me to specify      exactly what to include when doing ExtractXXX refactorings. CodeRush      doesn&#8217;t.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">R# seems to know what I want      to do. For example, when I discover that an existing class would be a good      starting point to write the class I am thinking about and copy-paste the      class and attempt to rename it, CodeRush renames both classes. R# renames      the one you intend to rename.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">R# introduces much less      friction when running unit tests. It is possible to add unit-testing      add-ins to Visual Studio and access similar functionality, but the way      unit-testing is integrated into R#, it is much more conducive to <a title="TDD" href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank">TDD</a>.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">Collapse a class region. Now      try to do a refactoring on this class, like “Rename file to match type”      etc. In CodeRush, you will not be able to do it because the three-dot      glyph will not be displayed when the class is collapsed.</li>
	<li class="MsoNormal" style="margin-bottom: 6pt">CodeRush keeps getting in my      way by automatically writing over as I type. It expands its “smart      templates” when you press space. Guess what! That is how I separate words      in my sentences &#8211; by pressing space. It gets quite annoying. I wish I      could turn it off.</li>
	</ul>
	<p class="MsoNormal" style="margin-bottom: 6pt">As you have probably guessed by now, I think ReSharper is a better fit for me.</p>
	<p class="MsoNormal" style="margin-bottom: 6pt">Here is a list of some other comparisons, covering aspects and features of these products I haven’t mentioned here that might be important to you. Some of these concluded in favor of CodeRush. Keep in mind that some of the following articles are a couple of years old.</p>
	<ul>
	<li><a href="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/05/resharper-4-0-vs-coderush-refactor-smack-down-results.aspx">Derik Whittaker</a> is keeping CodeRush but uninstalled Refactor Pro.</li>
	<li><a href="http://davidhayden.com/blog/dave/archive/2008/04/23/ReSharperCodeRushRefactorProInterestingDiscussion.aspx">David Hayden</a> is keeping an open mind.</li>
	<li><a href="http://www.hanselman.com/blog/ReSharperVsCodeRush.aspx">Scott Hanselman</a> likes CodeRush better.</li>
	<li><a href="http://ryangaraygay.com/blog/post/2008/04/Resharper-vs-CodeRush.aspx">Ryan Garagay</a> went with R#.</li>
	<li><a href="http://stackoverflow.com/questions/24216/resharper-vs-coderush">StackOverflow.com</a> has some useful comments and more links.</li>
	<li>There is some discussion on <a href="http://discuss.joelonsoftware.com/default.asp?joel.3.515309.7">JoelOnSoftware.com</a>.</li>
	<li>Ian decided to stick with <a href="http://ianolsen.com/2006/06/21/resharper-vs-coderush-part-1/">ReSharper</a>.</li>
	</ul>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=44&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_44" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2009/02/21/resharper-vs-coderush-refactor-pro/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using NHibernate With SQLite in DbUpdater</title>
		<link>http://www.tewari.info/2008/09/09/using-nhibernate-with-sqlite-in-dbupdater/</link>
		<comments>http://www.tewari.info/2008/09/09/using-nhibernate-with-sqlite-in-dbupdater/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 04:46:39 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[DbUpdater]]></category>
		<category><![CDATA[sqlite NHibernate]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2008/09/09/using-nhibernate-with-sqlite-in-dbupdater/</guid>
		<description><![CDATA[	DbUpdater (version 1.3 onwards) can be used with sqlite3.
	Review the files included in DbUpdater-sqlite3.zip
	1. DbUpdater.exe.config must be modified. Note changes to the following keys &#8211; exe-file, exe-args, dialect, driver_class, connetion_string.
2. SchemaVersion.hbm.xml must be modified. The &#8216;class&#8217; attributes value for the &#8216;generator&#8217; of &#8216;id&#8217; must be changed to &#8216;identity&#8217;. No other changes are needed here.
3. \SqlScripts\schema-version-table.sql [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://www.tewari.info/dbupdater/">DbUpdater</a> (<a href="http://sourceforge.net/projects/dbupdater/">version 1.3</a> onwards) can be used with <a href="http://www.sqlite.org/">sqlite3</a>.</p>
	<p>Review the files included in<a href="http://www.tewari.info/downloads/DbUpdater-sqlite3.zip"> DbUpdater-sqlite3.zip</a></p>
	<p>1. DbUpdater.exe.config must be modified. Note changes to the following keys &#8211; exe-file, exe-args, dialect, driver_class, connetion_string.<br />
2. SchemaVersion.hbm.xml must be modified. The &#8216;class&#8217; attributes value for the &#8216;generator&#8217; of &#8216;id&#8217; must be changed to &#8216;identity&#8217;. No other changes are needed here.<br />
3. \SqlScripts\schema-version-table.sql is modified. Note that the datatypes of all columns are changed to TEXT, except for SchemaChangeId, which is changed to integer primary key. integer primary key is used for auto-incremented columns in sqlite.<br />
4. \SqlScripts\baseline.sql is modified. Note the use of current_timestamp function. The actual sql syntax in this file must conform to sqlite dialect.<br />
5. All other .sql scripts in \SqlScripts directory are also modified to conform to sqlite dialect.</p>
	<p>The following files are expected to be in DbUpdater.exe directory (as configured in the DbUpdater.exe.config file) -</p>
	<p>1. sqlite3.exe : <a href="http://www.sqlite.org/download.html">download</a>.<br />
2. System.Data.SQLite.dll : <a href="http://sqlite.phxsoftware.com/">download</a>.<br />
3. createdb.bat file : This file is included. This batch script will call sqlite3.exe to execute sql queries.</p>
	<p>Another very useful tool for working with sqlite database files is <a href="http://sqlitebrowser.sourceforge.net/">SQLite Database Browzer</a>.<a href="http://www.tewari.info/wp-content/sqlite-support.html" title="sqlite-support.html"> </a><hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=41&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_41" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2008/09/09/using-nhibernate-with-sqlite-in-dbupdater/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Dial Gauge is a ProgressBar</title>
		<link>http://www.tewari.info/2008/06/10/dial-gauge-is-a-progressbar/</link>
		<comments>http://www.tewari.info/2008/06/10/dial-gauge-is-a-progressbar/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 06:49:43 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[xaml]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Dial]]></category>
		<category><![CDATA[Gauge]]></category>
		<category><![CDATA[ProgressBar]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2008/06/10/dial-gauge-is-a-progressbar/</guid>
		<description><![CDATA[	I am not just being philosophical here. In WPF, ControlTemplates allow you to transform a control&#8217;s appearance. This is not the same as applying stylesheets. This is an entirely new level of customization. What you see in the screenshot below looks like a Dial but is actually a simple  ProgressBar control wearing a &#8220;Dial&#8221; [...]]]></description>
			<content:encoded><![CDATA[	<p>I am not just being philosophical here. In <a href="http://msdn.microsoft.com/en-us/netframework/aa663326.aspx" title="MSDN-WPF" target="_blank">WPF</a>, <a href="http://msdn.microsoft.com/en-us/magazine/cc163497.aspx" title="Using Templates to Customize WPF Controls" target="_blank">ControlTemplates </a>allow you to transform a control&#8217;s appearance. This is not the same as applying stylesheets. This is an entirely new level of customization. What you see in the screenshot below looks like a Dial but is actually a simple  ProgressBar control wearing a &#8220;Dial&#8221; template. The Dial template was created using <a href="http://www.microsoft.com/expression/products/Overview.aspx?key=blend" title="Microsoft-Expression-Blend" target="_blank">Microsoft Expression Blend</a> .</p>
	<p><img src="http://www.tewari.info/images/dial-is-a-progressbar.PNG" alt="dial-is-a-progressbar.PNG" height="483" width="566" /></p>
	<p>Include the ControlTemplate as a Window.Resource and then assign it to ProgressBar element&#8217;s Template attribute :</p>
	<pre name="code" class="xml">
        <ProgressBar x:Name=\"pBar\" Template=\"{StaticResource templateDial}\"
                     Minimum=\"0\" Maximum=\"270\" Margin=\"0\" />
</pre>
	<p>Of course that is not all. The ControlTemplate must define some named elements of  FrameworkElement type. Charles Petzold has explained it in detail : <a href="http://msdn.microsoft.com/en-us/magazine/cc163497.aspx" title="Charles-Petzold-Using Templates to Customize WPF Controls" target="_blank">MSDN Magazine Article</a>. So, I will not repeat it here.</p>
	<p>The sample code can be downloaded here : <a href="http://www.tewari.info/downloads/DialTest.zip" title="DialTest.zip" target="_blank">DialTest.zip</a><br />
License : <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" rel="license">Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.</a><hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=38&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_38" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2008/06/10/dial-gauge-is-a-progressbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostSharp with SharpDevelop</title>
		<link>http://www.tewari.info/2008/04/28/postsharp-with-sharpdevelop/</link>
		<comments>http://www.tewari.info/2008/04/28/postsharp-with-sharpdevelop/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 05:04:43 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[AOP]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Aspect]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[PostSharp]]></category>
		<category><![CDATA[SharpDevelop]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2008/04/28/postsharp-with-sharpdevelop/</guid>
		<description><![CDATA[	SharpDevelop3.0 uses MSBuild. Including PostSharp in your build process is transparent if you are doing a global install using PostSharp installer. If you are doing a per-project installation using &#8220;Binary &#8211; No Installer&#8221; download, you will need to import the PostSharp targets into your .csproj file -
	
	
    True

	C:\code\PostSharp-1.0.8.316-Binary\


	For more details, read the [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://sharpdevelop.net/OpenSource/SD/Default.aspx" title="SharpDevelop HomePage" target="_blank">SharpDevelop3.0</a> uses <a href="http://en.wikipedia.org/wiki/MSBuild" title="MSBuild on wikipedia" target="_blank">MSBuild</a>. Including PostSharp in your build process is transparent if you are doing a global install using PostSharp installer. If you are doing a per-project installation using &#8220;Binary &#8211; No Installer&#8221; <a href="http://www.postsharp.org/download/" title="postsharp download" target="_blank">download</a>, you will need to import the PostSharp targets into your .csproj file -</p>
	<pre name="code" class="xml">
	<propertygroup>
    <dontimportpostsharp>True</dontimportpostsharp>
</propertygroup>
	<postsharpdirectory>C:\code\PostSharp-1.0.8.316-Binary\</postsharpdirectory>
<import project=\"$(MSBuildBinPath)\Microsoft.CSharp.targets\"></import>
<import project=\"$(PostSharpDirectory)PostSharp.targets\"></import></pre>
	<p>For more details, read the install instructions included in the PostSharp <a href="http://www.postsharp.org/download/" title="postsharp download" target="_blank">download </a>and <a href="http://www.postsharp.org/blog/2008/01/under-hood-of-msbuild-integration.html" title="under-hood-of-msbuild-integration" target="_blank">under-the-hood-of-msbuild-integration</a>.</p>
	<p>To use local PostSharp binaries (relative to your project) , modify your .csproj file as follows -</p>
	<pre name="code" class="xml">
  <PropertyGroup Condition=\" Exists('PostSharp\PostSharp.targets') \">
    <DontImportPostSharp>True</DontImportPostSharp>
    <PostSharpDirectory>$(MSBuildProjectDirectory)\PostSharp\</PostSharpDirectory>
  </PropertyGroup>
	
  <Import Project=\"$(MSBuildBinPath)\Microsoft.CSharp.targets\" />
	
  <Import Project=\"$(PostSharpDirectory)PostSharp.targets\"
  Condition=\" Exists('$(PostSharpDirectory)PostSharp.targets') \" />
</pre>
	<p>$(MSBuildProjectDirectory) is the directory containing your .csproj file.<br />
\PostSharp\ is the directory containing local PostSharp binaries.</p>
	<p>2. You will need to exclude the Aspect class itself from being woven.</p>
	<p>If you are following the <a href="http://www.postsharp.org/about/getting-started/" title="getting-started-sample" target="_blank">getting-started sample</a>, see the following example:</p>
	<pre name="code" class="csharp">
[Serializable]
[Trace( null, AttributeExclude = true )]
public sealed class TraceAttribute : OnMethodBoundaryAspect
{</pre>
	<p>3. Compile your project.<hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=35&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_35" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2008/04/28/postsharp-with-sharpdevelop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Custom Converter in XAML</title>
		<link>http://www.tewari.info/2008/04/15/using-custom-converter-in-xaml/</link>
		<comments>http://www.tewari.info/2008/04/15/using-custom-converter-in-xaml/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 05:22:12 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[xaml]]></category>
		<category><![CDATA[Binding]]></category>
		<category><![CDATA[ImageDataConverter]]></category>
		<category><![CDATA[ListView]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2008/04/15/using-custom-converter-in-xaml/</guid>
		<description><![CDATA[	In my previous post : WPF-LINQ To SQL Sample, I had to resort to modifying .dbml file to get the images stored as varbinary into the WPF ListView control. I had to change the Type of image fields to System.Byte[], instead of using System.Data.Linq.Binary. A better way to do this is to use a custom [...]]]></description>
			<content:encoded><![CDATA[	<p>In my previous post : <a href="http://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/" title="wpf-linq-to-sql-sample" target="_blank">WPF-LINQ To SQL Sample</a>, I had to resort to modifying .dbml file to get the images stored as varbinary into the WPF ListView control. I had to change the Type of image fields to System.Byte[], instead of using System.Data.Linq.Binary. A better way to do this is to use a custom converter. WPF allows you    to specify custom converter as part of the Binding in .xaml, like this -</p>
	<pre name="code" class="xml">
&lt;Image Grid.Row=\"2\"
Source=\"{Binding Path=ThumbNailPhoto ,
Converter={StaticResource imageConverter}}\"&gt;&lt;/Image&gt;</pre>
	<p>The custom converter is declared in the same .xaml file as a resource -</p>
	<pre name="code" class="xml">
&lt;Window.Resources&gt;
&lt;local:ImageDataConverter x:Key=\"imageConverter\" /&gt;
&lt;/Window.Resources&gt;</pre>
	<p>ImageDataConverter is implemented in .xaml.cs file -</p>
	<pre name="code" class="csharp">
public class ImageDataConverter : IValueConverter
{
   public object Convert(object value, Type targetType, object parameter,
   System.Globalization.CultureInfo culture)
   {
      byte[] image = ((System.Data.Linq.Binary)value).ToArray();
      return image;
   }
	
   public object ConvertBack(object value, Type targetType, object parameter,
   System.Globalization.CultureInfo culture)
   {
      throw new NotSupportedException();
   }
}</pre>
	<p>The updated sample code can be downloaded here : <a href="http://www.tewari.info/downloads/Linq2SqlSample2.zip" title="Linq2SqlSample2.zip" target="_blank">WPF-LINQ to SQL Sample</a><br />
License : <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" rel="license">Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.</a><hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=34&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_34" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2008/04/15/using-custom-converter-in-xaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPF &#8211; LINQ to SQL Sample</title>
		<link>http://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/</link>
		<comments>http://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 07:15:35 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[AdventureWorks]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[DataBinding]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[ListView]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[Share]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WPF-LINQ]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/</guid>
		<description><![CDATA[	This exercise in binding a WPF ListView control with LINQ to SQL was a lot of fun ! The following image shows data from AdventureWorks sample database displayed in the ListView control. The end result is very admirable, even in this very basic demo. Feeling a complete sense of freedom is unavoidable when working with [...]]]></description>
			<content:encoded><![CDATA[	<p>This exercise in binding a WPF ListView control with LINQ to SQL was a lot of fun ! The following image shows data from <a href="http://www.codeplex.com/MSFTDBProdSamples" title="MSSQL Sample Databases" target="_blank">AdventureWorks </a>sample database displayed in the ListView control. The end result is very admirable, even in this very basic demo. Feeling a complete sense of freedom is unavoidable when working with WPF.</p>
	<p><img src="http://www.tewari.info/images/Linq2SqlSample1.Png" alt="Linq2SqlSample1.Png" height="390" width="555" /></p>
	<p>This sample demonstrates :</p>
	<ol>
	<li>LINQ to SQL mapping.</li>
	<li>WPF ListView Control DataBinding.</li>
	<li>Displaying images stored in database as varbinary in WPF control.</li>
	</ol>
	<p>The sample code can be downloaded here : <a href="http://www.tewari.info/downloads/Linq2SqlSample.zip" title="Linq2SqlSample.zip" target="_blank">WPF-LINQ to SQL Sample</a><br />
License : <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" rel="license">Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.</a></p>
	<p><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" rel="license"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png" alt="Creative Commons License" style="border-width: 0pt" /></a><hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=33&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_33" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customize log4net Output Path</title>
		<link>http://www.tewari.info/2008/03/06/customize-log4net-output-path/</link>
		<comments>http://www.tewari.info/2008/03/06/customize-log4net-output-path/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 00:56:55 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[log4net]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[output path]]></category>
		<category><![CDATA[RollingFileAppender]]></category>
		<category><![CDATA[startup directory]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2008/03/06/customize-log4net-output-path/</guid>
		<description><![CDATA[	 The default log4net output path is relative to the startup directory of your executable. To customize the output path, you can override the base Appender&#8217;s File property in your own Appender class. The following example describes how to route the log files relative to the temp folder :
	
   public class MyOwnAppender : [...]]]></description>
			<content:encoded><![CDATA[	<p> The default log4net output path is relative to the startup directory of your executable. To customize the output path, you can override the base Appender&#8217;s File property in your own Appender class. The following example describes how to route the log files relative to the temp folder :</p>
	<pre name="code" class="csharp">
   public class MyOwnAppender : log4net.Appender.RollingFileAppender
   {
         public override string File
         {
             get
             {
                 return base.File;
             }
	
            set
            {
                if (Path.IsPathRooted(value))
                {
                    base.File = value;
                }
                else
                {
                    base.File = Path.Combine(Path.GetTempPath(), value);
                }
            }
        }
    }
</pre>
	<p>Your log4net config file must be modified so that log4net can locate and use your custom Appender. If MyOwnAppender is in MyNamespace and you have implemented it in MyLoggerLib.dll :</p>
	<pre name="code" class="xml">
<appender name=\"myFileAppender\" type=\"MyNamespace.MyOwnAppender, MyLoggerLib\">
</pre>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=30&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_30" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2008/03/06/customize-log4net-output-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSimSim 1.0-RC is out</title>
		<link>http://www.tewari.info/2007/12/24/opensimsim-10-rc-is-out/</link>
		<comments>http://www.tewari.info/2007/12/24/opensimsim-10-rc-is-out/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 17:04:31 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[free tool]]></category>
		<category><![CDATA[OpenSimSim]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.tewari.info/2007/12/24/opensimsim-10-rc-is-out/</guid>
		<description><![CDATA[	OpenSimSim : Your Password Solution. Download 1.0 Release Candidate here : OpenSimSim 1.0-RC
	Copyright &#169; 2010 tewari. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://opensimsim.sourceforge.net" title="OpenSimSim Website" target="_blank">OpenSimSim</a> : Your Password Solution. Download 1.0 Release Candidate here : <a href="https://sourceforge.net/project/showfiles.php?group_id=194886" title="OpenSimSim 1.0-RC" target="_blank">OpenSimSim 1.0-RC</a></p>
	<p><img src="http://opensimsim.sourceforge.net/opensimsim-screenshot-1.png" alt="opensimsim-screenshot" height="225" width="300" /><hr/>Copyright &copy; 2010 <strong><a href="http://www.tewari.info">tewari</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@tewari.info so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>
</p>
<p class="akst_link"><a href="http://www.tewari.info/?p=11&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_11" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2007/12/24/opensimsim-10-rc-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
