<?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; WPF</title>
	<atom:link href="http://www.tewari.info/category/wpf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tewari.info</link>
	<description>Professional Software Development by Ash Tewari</description>
	<lastBuildDate>Wed, 04 Jan 2012 03:03:39 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Remove ListBoxItem Highlighting</title>
		<link>http://www.tewari.info/2011/04/29/remove-listboxitem-highlighting/</link>
		<comments>http://www.tewari.info/2011/04/29/remove-listboxitem-highlighting/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 03:25:58 +0000</pubDate>
		<dc:creator>tewari</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>
		<category><![CDATA[ControlTemplate]]></category>
		<category><![CDATA[ListBox]]></category>
		<category><![CDATA[ListboxItem]]></category>

		<guid isPermaLink="false">http://www.tewari.info/?p=239</guid>
		<description><![CDATA[	A Silverlight/Wpf ListBoxItem is highlighted when selected or when the mouse hovers over it.
	I need to display a list of items that are not highlighted when selected. This is a common scenario when displaying an inactive list for simply listing out some information.
	ListBoxItem&#8217;s default template can be easily inspected and modified using Expression Blend &#8211; [...]]]></description>
			<content:encoded><![CDATA[	<p>A Silverlight/Wpf ListBoxItem is highlighted when selected or when the mouse hovers over it.</p>
	<p>I need to display a list of items that are not highlighted when selected. This is a common scenario when displaying an inactive list for simply listing out some information.</p>
	<p>ListBoxItem&#8217;s default template can be easily inspected and modified using Expression Blend &#8211; Select a ListBoxItem in Objects and Timeline pane, Right click and select Edit template &gt; Edit a Copy. Name you template and save it at the scope of your choice.</p>
	<p>This will create a copy of the template and allow you to modify it. Switch to the xaml view. Locate the VisualStates of MouseOver, Selected and Focused, and blank them out -</p>
	<p><img class="alignnone size-full wp-image-241" title="de-highlighted-xaml" src="http://www.tewari.info/wp-content/2011-04-29_2257.png" alt="de-highlighted-xaml" width="700" height="489" /></p>
	<p>The style is applied to the ListBoxItems using ItemContainerStyle -</p>
	<p><img class="alignnone size-full wp-image-243" title="applying-style-to-listboxitems" src="http://www.tewari.info/wp-content/2011-04-29_2307.png" alt="applying-style-to-listboxitems" width="571" height="106" /></p>
	<p>Here is the xaml style for the ListBoxItem -<br />
<textarea class="xml" name="code"><Style x:Key="ListBoxtemStyleNoHighlighting" TargetType="ListBoxItem"><br />
    <Setter Property="Padding" Value="3"/><br />
    <Setter Property="HorizontalContentAlignment" Value="Left"/><br />
    <Setter Property="VerticalContentAlignment" Value="Top"/><br />
    <Setter Property="Background" Value="Transparent"/><br />
    <Setter Property="BorderThickness" Value="1"/><br />
    <Setter Property="TabNavigation" Value="Local"/><br />
    <Setter Property="Template"><br />
        <Setter.Value><br />
            <ControlTemplate TargetType="ListBoxItem"><br />
                <Grid Background="{TemplateBinding Background}"><br />
                    <VisualStateManager.VisualStateGroups><br />
                        <VisualStateGroup x:Name="CommonStates"><br />
                            <VisualState x:Name="Normal"/><br />
                            <VisualState x:Name="MouseOver"/><br />
                        </VisualStateGroup><br />
                        <VisualStateGroup x:Name="SelectionStates"><br />
                            <VisualState x:Name="Unselected"/><br />
                            <VisualState x:Name="Selected"/><br />
                        </VisualStateGroup><br />
                        <VisualStateGroup x:Name="FocusStates"><br />
                            <VisualState x:Name="Focused"/><br />
                            <VisualState x:Name="Unfocused"/><br />
                        </VisualStateGroup><br />
                    </VisualStateManager.VisualStateGroups><br />
                    <Rectangle x:Name="fillColor" Fill="#FFBADDE9" IsHitTestVisible="False"<br />
				Opacity="0" RadiusY="1" RadiusX="1"/><br />
                    <Rectangle x:Name="fillColor2" Fill="#FFBADDE9" IsHitTestVisible="False"<br />
				Opacity="0" RadiusY="1" RadiusX="1"/><br />
                    <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}"<br />
			Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"<br />
			Margin="{TemplateBinding Padding}"/><br />
                    <Rectangle x:Name="FocusVisualElement" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1"<br />
			StrokeThickness="1" Visibility="Collapsed"/><br />
                </Grid><br />
            </ControlTemplate><br />
        </Setter.Value><br />
    </Setter><br />
</Style></textarea></p>
	<p>After the style is applied, the ListBoxItems are not highlighted when selected or focused. Here is a live demo of a ListBox that does not highlight when items are selected : <a href="http://www.tewari.info/remove-listboxitem-highlighting-demo/">remove-listboxitem-hlighting-demo</a><hr/>Copyright &copy; 2012 <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=239&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_239" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.tewari.info/2011/04/29/remove-listboxitem-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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; 2012 <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; 2012 <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>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; 2012 <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>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; 2012 <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; 2012 <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>5</slash:comments>
		</item>
	</channel>
</rss>

