<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Prabu&#039;s Blog</title>
	<atom:link href="http://prabuguru.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://prabuguru.wordpress.com</link>
	<description>I love to swim in the programming ocean especially in WPF and SILVERLIGHT.</description>
	<lastBuildDate>Mon, 17 May 2010 15:58:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='prabuguru.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Prabu&#039;s Blog</title>
		<link>http://prabuguru.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://prabuguru.wordpress.com/osd.xml" title="Prabu&#039;s Blog" />
	<atom:link rel='hub' href='http://prabuguru.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to get the DependencyObject under the mouse cursor?</title>
		<link>http://prabuguru.wordpress.com/2010/05/17/how-to-get-the-dependencyobject-under-the-mouse-cursor/</link>
		<comments>http://prabuguru.wordpress.com/2010/05/17/how-to-get-the-dependencyobject-under-the-mouse-cursor/#comments</comments>
		<pubDate>Mon, 17 May 2010 15:58:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2010/05/17/how-to-get-the-dependencyobject-under-the-mouse-cursor</guid>
		<description><![CDATA[With help of VisualTreeHelper and its HitTest() methods, we can easily find the DependencyObject under the mouse cursor. Use the following code snippet to achieve this. &#160;&#160;&#160; List&#60;DependencyObject&#62; hitTestList = null; &#160;&#160;&#160; //Raised When Mouse is entered inside Panel &#160;&#160;&#160; private void Panel_MouseEnter(object sender, MouseEventArgs e) &#160;&#160;&#160; { &#160;&#160;&#160;&#160;&#160;&#160;&#160; hitTestList = new List&#60;DependencyObject&#62;();&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; Point [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=89&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal">With help of <b><i><u><a href="http://msdn.microsoft.com/en-us/library/ms635657(v=VS.100).aspx">VisualTreeHelper</a></u></i></b> and its <b><i><u><a href="http://msdn.microsoft.com/en-us/library/ms608752(v=VS.100).aspx">HitTest</a></u></i></b>() methods, we can easily find the <b><i><u><a href="http://msdn.microsoft.com/en-us/library/system.windows.dependencyobject.aspx">DependencyObject</a></u></i></b> under the mouse cursor. Use the following code snippet to achieve this.</div>
<div class="MsoNormal"></div>
<p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr>
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;width:478.8pt;padding:0 5.4pt;" valign="top" width="638">
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">DependencyObject</span>&gt; hitTestList = <span style="color:blue;">null</span>;</span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:green;">//Raised When Mouse is entered inside Panel</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">private</span> <span style="color:blue;">void</span> Panel_MouseEnter(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">MouseEventArgs</span> e)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hitTestList = <span style="color:blue;">new</span> <span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">DependencyObject</span>&gt;();</span><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">Point</span> pt = e.GetPosition(sender <span style="color:blue;">as</span> <span style="color:#2b91af;">IInputElement</span>);</span><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<span style="color:#2b91af;">VisualTreeHelper</span>.HitTest( </span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sender <span style="color:blue;">as</span> <span style="color:#2b91af;">Visual</span>, <span style="color:blue;">null</span>,</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CollectAllVisuals_Callback,</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">new</span> <span style="color:#2b91af;">PointHitTestParameters</span>(pt));</span><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hitTestList.Reverse();</span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">DependencyObject</span> elementToFind = <span style="color:blue;">null</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">foreach</span> (<span style="color:#2b91af;">DependencyObject</span> element <span style="color:blue;">in</span> hitTestList)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (element.GetType().Name.Equals(<span style="color:#a31515;">&#8220;ElementToFind&#8221;</span>))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elementToFind = element;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green;">// &#8230;</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green;">// &#8230;</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;"></span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">HitTestResultBehavior</span> CollectAllVisuals_Callback(<span style="color:#2b91af;">HitTestResult</span> result)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (result == <span style="color:blue;">null</span> || result.VisualHit == <span style="color:blue;">null</span>)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">return</span> <span style="color:#2b91af;">HitTestResultBehavior</span>.Stop;</span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hitTestList.Add(result.VisualHit);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">return</span> <span style="color:#2b91af;">HitTestResultBehavior</span>.Continue;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></div>
</td>
</tr>
</tbody>
</table>
<div class="MsoNormal"></div>
<p>
<div class="MsoNormal">Drop me a comment if you have any queries.</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=89&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2010/05/17/how-to-get-the-dependencyobject-under-the-mouse-cursor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to load Bitmap image to Image object in WPF</title>
		<link>http://prabuguru.wordpress.com/2010/05/14/how-to-load-bitmap-image-to-image-object-in-wpf/</link>
		<comments>http://prabuguru.wordpress.com/2010/05/14/how-to-load-bitmap-image-to-image-object-in-wpf/#comments</comments>
		<pubDate>Fri, 14 May 2010 10:50:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2010/05/14/how-to-load-bitmap-image-to-image-object-in-wpf</guid>
		<description><![CDATA[I am doing an application (which I am converting Windows forms 2.0 application into WPF application for rich look) in WPF and I am need of the load the Image from an instance of a System.Drawing.Bitmap. Initially I was struggled to do this. After a few minutes of search in goggle, I found the following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=88&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal" style="line-height:150%;">I am doing an application (which I am converting <b>Windows forms 2.0</b> application into <b>WPF</b> application for rich look) in WPF and I am need of the load the <b>Image</b> from an instance of a <b><i><a href="http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx">System.Drawing.Bitmap</a></i>. </b>Initially I was struggled to do this. After a few minutes of search in goggle, I found the following solution. With help of <b><i><a href="http://msdn.microsoft.com/en-us/library/system.windows.interop.imaging.aspx">Imaging</a></i></b> class, we can create a <b><i><u><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx">BitmapSource</a></u></i></b> and assign the BitmapSource value to the Image. The following code will help you to do this. </div>
<div class="MsoNormal" style="line-height:150%;"></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr>
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;width:495.75pt;padding:0 5.4pt;" valign="top" width="661">
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:#2b91af;">BitmapSource</span> ToBitmapSource(<span style="color:blue;">this</span> System.Drawing.<span style="color:#2b91af;">Bitmap</span> source)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">BitmapSource</span> bitmapSrc = <span style="color:blue;">null</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">var</span> hBitmap = source.GetHbitmap();</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">try</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bitmapSrc = System.Windows.Interop.<span style="color:#2b91af;">Imaging</span>.CreateBitmapSourceFromHBitmap(</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hBitmap,</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">IntPtr</span>.Zero,</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">Int32Rect</span>.Empty,</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">BitmapSizeOptions</span>.FromEmptyOptions());</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">catch</span> (<span style="color:#2b91af;">Win32Exception</span>)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bitmapSrc = <span style="color:blue;">null</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; </span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">finally</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">NativeMethods</span>.DeleteObject(hBitmap);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">return</span> bitmapSrc;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; } </span></div>
<div class="MsoNormal"></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">internal</span> <span style="color:blue;">static</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">NativeMethods</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<span style="color:#2b91af;">DllImport</span>(<span style="color:#a31515;">"gdi32.dll"</span>)]</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<span style="color:blue;">return</span>: <span style="color:#2b91af;">MarshalAs</span>(<span style="color:#2b91af;">UnmanagedType</span>.Bool)]</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">internal</span> <span style="color:blue;">static</span> <span style="color:blue;">extern</span> <span style="color:blue;">bool</span> DeleteObject(<span style="color:#2b91af;">IntPtr</span> hObject);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; } </span></div>
</td>
</tr>
</tbody>
</table>
<div class="MsoNormal"></div>
<p>
<div class="MsoNormal">Please check this <a href="http://stackoverflow.com/questions/94456/load-a-wpf-bitmapimage-from-a-system-drawing-bitmap">link</a> for more details.</div>
<div class="MsoNormal"></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=88&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2010/05/14/how-to-load-bitmap-image-to-image-object-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to close the whole application in WPF Browser based application (XBAP application)</title>
		<link>http://prabuguru.wordpress.com/2010/05/04/how-to-close-the-whole-application-in-wpf-browser-based-application-xbap-application/</link>
		<comments>http://prabuguru.wordpress.com/2010/05/04/how-to-close-the-whole-application-in-wpf-browser-based-application-xbap-application/#comments</comments>
		<pubDate>Tue, 04 May 2010 13:45:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[XBAP]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2010/05/04/how-to-close-the-whole-application-in-wpf-browser-based-application-xbap-application</guid>
		<description><![CDATA[In Windows based WPF application, there is an option to close the whole application using (Application.Current.ShutDown) statement. But the same statement is not working in Web based WPF application (perhaps it will close the application. But not close the IE browser – It showing with the blank inactive tab). &#160;We have an option to close [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=87&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal"></div>
<p>
<div class="MsoNormal">In Windows based WPF application, there is an option to close the whole application using (<span style="color:#2b91af;font-family:&quot;font-size:10pt;">Application</span><span style="font-family:&quot;font-size:10pt;">.Current.ShutDown) </span>statement. But the same statement is not working in Web based WPF application (perhaps it will close the application. But not close the IE browser – It showing with the blank inactive tab). &nbsp;We have an option to close the application along with the IE window by using the following code,</div>
<div class="MsoNormal"></div>
<p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr style="height:183.75pt;">
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;height:183.75pt;width:478.8pt;padding:0 5.4pt;" valign="top" width="638">
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">private</span> <span style="color:blue;">void</span> buttonClose_Click(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">RoutedEventArgs</span> e)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">WindowInteropHelper</span> wih = <span style="color:blue;">new</span> <span style="color:#2b91af;">WindowInteropHelper</span>(<span style="color:#2b91af;">Application</span>.Current.MainWindow);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#2b91af;">IntPtr</span> ieHwnd = GetAncestor(wih.Handle, 2 <span style="color:green;">/*GA_ROOT*/</span>);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PostMessage(ieHwnd, 0&#215;10<span style="color:green;">/*WM_CLOSE*/</span>, <span style="color:#2b91af;">IntPtr</span>.Zero, <span style="color:#2b91af;">IntPtr</span>.Zero);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; [<span style="color:#2b91af;">DllImport</span>(<span style="color:#a31515;">"user32"</span>, ExactSpelling = <span style="color:blue;">true</span>, CharSet = <span style="color:#2b91af;">CharSet</span>.Auto)]</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">private</span> <span style="color:blue;">static</span> <span style="color:blue;">extern</span> <span style="color:#2b91af;">IntPtr</span> GetAncestor(<span style="color:#2b91af;">IntPtr</span> hwnd, <span style="color:blue;">int</span> flags);</span><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; </span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; [<span style="color:#2b91af;">DllImport</span>(<span style="color:#a31515;">"user32"</span>, CharSet = <span style="color:#2b91af;">CharSet</span>.Auto)]</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">private</span> <span style="color:blue;">static</span> <span style="color:blue;">extern</span> <span style="color:blue;">bool</span> PostMessage(<span style="color:#2b91af;">IntPtr</span> hwnd, <span style="color:blue;">int</span> msg, <span style="color:#2b91af;">IntPtr</span> wparam, <span style="color:#2b91af;">IntPtr</span> lparam);</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=87&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2010/05/04/how-to-close-the-whole-application-in-wpf-browser-based-application-xbap-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to find the visual parent or child element using VisualTreeHelper</title>
		<link>http://prabuguru.wordpress.com/2010/04/28/how-to-find-the-visual-parent-or-child-element-using-visualtreehelper/</link>
		<comments>http://prabuguru.wordpress.com/2010/04/28/how-to-find-the-visual-parent-or-child-element-using-visualtreehelper/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 10:46:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2010/04/28/how-to-find-the-visual-parent-or-child-element-using-visualtreehelper</guid>
		<description><![CDATA[VisualTreeHelper is very useful class which help us to find or drill-down element from the hosted container. The following method will help you to find the visual parent element from the container. &#160;&#160;&#160; public static T FindVisualParent&#60;T&#62;(UIElement element) where T : UIElement &#160;&#160;&#160; { &#160;&#160;&#160;&#160;&#160;&#160;&#160; UIElement parent = element; &#160;&#160;&#160;&#160; &#160;&#160;&#160;while (parent != null) &#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=86&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal"><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.visualtreehelper.aspx">VisualTreeHelper</a> is very useful class which help us to find or drill-down element from the hosted container. </div>
<div class="MsoNormal"></div>
<p>
<div class="MsoNormal">The following method will help you to find the visual <b><i><u>parent element</u></i></b> from the container.</div>
<div class="MsoNormal"></div>
<p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr>
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;width:478.8pt;padding:0 5.4pt;" valign="top" width="638">
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">public</span> <span style="color:blue;">static</span> T FindVisualParent&lt;T&gt;(<span style="color:#2b91af;">UIElement</span> element) <span style="color:blue;">where</span> T : <span style="color:#2b91af;">UIElement</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">UIElement</span> parent = element;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style="color:blue;">while</span> (parent != <span style="color:blue;">null</span>)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T correctlyTyped = parent <span style="color:blue;">as</span> T;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (correctlyTyped != <span style="color:blue;">null</span>)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">return</span> correctlyTyped;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent = <span style="color:#2b91af;">VisualTreeHelper</span>.GetParent(parent) <span style="color:blue;">as</span> <span style="color:#2b91af;">UIElement</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br /><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">return</span> <span style="color:blue;">null</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></div>
</td>
</tr>
</tbody>
</table>
<div class="MsoNormal"></div>
<p>
<div class="MsoNormal">The following method will help you to find the <b><i><u>child element</u></i></b> from the container.</div>
<div class="MsoNormal"></div>
<p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr>
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;width:509.9pt;padding:0 5.4pt;" valign="top" width="680">
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">public</span> <span style="color:blue;">static</span> T FindChild&lt;T&gt;(<span style="color:#2b91af;">DependencyObject</span> parent)<span style="color:blue;">where</span> T : <span style="color:#2b91af;">DependencyObject</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (parent == <span style="color:blue;">null</span>) <span style="color:blue;">return</span> <span style="color:blue;">null</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T childElement = <span style="color:blue;">null</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">int</span> childrenCount = <span style="color:#2b91af;">VisualTreeHelper</span>.GetChildrenCount(parent);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">for</span> (<span style="color:blue;">int</span> i = 0; i &lt; childrenCount; i++)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">var</span> child = <span style="color:#2b91af;">VisualTreeHelper</span>.GetChild(parent, i);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T childType = child <span style="color:blue;">as</span> T;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (childType == <span style="color:blue;">null</span>)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; childElement = FindChild&lt;T&gt;(child);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (childElement != <span style="color:blue;">null</span>) <span style="color:blue;">break</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">else</span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; childElement = (T)child;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">break</span>;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">return</span> childElement;</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></div>
</td>
</tr>
</tbody>
</table>
<div class="MsoNormal"></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=86&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2010/04/28/how-to-find-the-visual-parent-or-child-element-using-visualtreehelper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to detect CTRL + ALT key combinations in WPF</title>
		<link>http://prabuguru.wordpress.com/2010/02/26/how-to-detect-ctrl-alt-key-combinations-in-wpf/</link>
		<comments>http://prabuguru.wordpress.com/2010/02/26/how-to-detect-ctrl-alt-key-combinations-in-wpf/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 10:41:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2010/02/26/how-to-detect-ctrl-alt-key-combinations-in-wpf</guid>
		<description><![CDATA[Key combinations are a fancy pair of words to describe pressing/holding multiple keyboard buttons to perform a command. Ex:- Few of ever using key combinations are, Ctrl + S to Save, Ctrl + C to Copy, Alt + F4 to close an application, Ctrl + Alt + Del to lock our computer, etc.,&#160;&#160; There are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=85&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal" style="line-height:150%;">Key combinations are a fancy pair of words to describe pressing/holding multiple keyboard buttons to perform a command. </p>
<div></div>
<p><b>Ex:-</b> Few of ever using key combinations are,
<ul>
<li><b>Ctrl + S</b> to Save,</li>
<li><b>Ctrl + C</b> to Copy,</li>
<li><b>Alt + F4</b> to close an application,</li>
<li><b>Ctrl + Alt + Del </b>to lock our computer, etc.,&nbsp;&nbsp;</li>
</ul>
</div>
<p>There are many such combinations, and while I provided some common ones, many applications like Visual Studio provide their own key combinations to help save you some time. Let&#8217;s add some key combinations to our little program also.</p>
<div class="MsoNormal" style="line-height:150%;"></div>
<div class="MsoNormal" style="line-height:150%;"></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr>
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;width:478.8pt;padding:0 5.4pt;" valign="top" width="638">
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">void</span> SpecialKeyHandler(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">KeyEventArgs</span> e)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green;">// Ctrl + N </span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> ((<span style="color:#2b91af;">Keyboard</span>.Modifiers == <span style="color:#2b91af;">ModifierKeys</span>.Control) &amp;&amp; (e.Key == <span style="color:#2b91af;">Key</span>.N))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">&#8220;New&#8221;</span>);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal">
<div></div>
<p><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green;">// Ctrl + O </span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> ((<span style="color:#2b91af;">Keyboard</span>.Modifiers == <span style="color:#2b91af;">ModifierKeys</span>.Control) &amp;&amp; (e.Key == <span style="color:#2b91af;">Key</span>.O))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">&#8220;Open&#8221;</span>);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<p>
<div></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green;">// Ctrl + S </span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> ((<span style="color:#2b91af;">Keyboard</span>.Modifiers == <span style="color:#2b91af;">ModifierKeys</span>.Control) &amp;&amp; (e.Key == <span style="color:#2b91af;">Key</span>.S))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">&#8220;Save&#8221;</span>);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal">
<div></div>
<p><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green;">// Ctrl + Alt + I </span></span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> ((<span style="color:#2b91af;">Keyboard</span>.Modifiers == (<span style="color:#2b91af;">ModifierKeys</span>.Alt | <span style="color:#2b91af;">ModifierKeys</span>.Control)) &amp;&amp; (e.Key == <span style="color:#2b91af;">Key</span>.I))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">&#8220;Ctrl + Alt + I&#8221;</span>);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></div>
</td>
</tr>
</tbody>
</table>
<div class="MsoNormal"></div>
<p>
<div></div>
<p>The key approach doesn&#8217;t work for another reason because your commonly used <b>Alt, Ctrl, Shift</b>, and <b>Windows</b> keys can&#8217;t be accessed from the Key enum at all. Instead, those four keys can only be accessed using the <i><a href="http://msdn.microsoft.com/en-us/library/system.windows.input.modifierkeys.aspx">ModifierKeys</a></i> enum and checking whether <i><a href="http://msdn.microsoft.com/en-us/library/system.windows.input.keyboard.modifiers.aspx">Keyboard.Modifiers</a></i> is equal to that key. </p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=85&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2010/02/26/how-to-detect-ctrl-alt-key-combinations-in-wpf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to enable .NET Framework 3.5 SP1 Bootstrapper package in ClickOnce application.</title>
		<link>http://prabuguru.wordpress.com/2009/12/30/how-to-enable-net-framework-3-5-sp1-bootstrapper-package-in-clickonce-application/</link>
		<comments>http://prabuguru.wordpress.com/2009/12/30/how-to-enable-net-framework-3-5-sp1-bootstrapper-package-in-clickonce-application/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 13:47:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[Click Once]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2009/12/30/how-to-enable-net-framework-3-5-sp1-bootstrapper-package-in-clickonce-application</guid>
		<description><![CDATA[I have struggled with the issue which I was not able to include the .NET Framework 3.5 SP1 bootstrapper package in my click once WPF XBAP application. Even If the .NET Framework 3.5 SP1 bootstrapper package is selected in the Prerequisite dialog box for a Setup project or in ClickOnce publishing, and also the &#34;Download [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=84&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<p class="MsoNormal" style='line-height:150%;'>I have struggled with the issue which I was not able to include the .NET Framework 3.5 SP1 bootstrapper package in my click once WPF XBAP application. Even If the .NET Framework 3.5 SP1 bootstrapper package is selected in the Prerequisite dialog box for a Setup project or in ClickOnce publishing, and also the &quot;<b>Download prerequisites from the same location as my application</b>&quot; option is selected, the following build error is shown:  </p>
<p class="MsoNormal" style='line-height:150%;'>The install location for prerequisites has not been set to &#8216;<b>component vendor&#8217;s web site</b>&#8216; and the file &#8216;<b>dotNetFx35setup.exe</b>&#8216; in item &#8216;<b>Microsoft.Net.Framework.3.5.SP1</b>&#8216; cannot be located on disk. </p>
<p class="MsoNormal" style='line-height:150%;'>To resolve this issue, please do the following steps:</p>
<p class="MsoNormal" style='line-height:150%;'><b><span lang="EN-US">Update the Package Data</span></b><span lang="EN-US"> </span></p>
<ol start="1" type="1">
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Open the <b>&lt;Drive&gt;:</b>\<b>Program      Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1</b>      folder or <b>%ProgramFiles(x86)%\Microsoft      SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1</b> on x64      operating systems. </span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Edit the <b>Product.xml</b>      file in Notepad.</span><span lang="EN-US"> </span><span lang="EN-US"></span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Paste the      following into the </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:#0066FF;'>&lt;</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>PackageFiles</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:#0066FF;'>&gt;</span><span lang="EN-US"> element: <br />      </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>&lt;PackageFile </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:red;'>Name</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>=&quot;TOOLS\clwireg.exe&quot;/&gt;<br />      &lt;PackageFile </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:red;'>Name</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>=&quot;TOOLS\clwireg_x64.exe&quot;/&gt;<br />      &lt;PackageFile </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:red;'>Name</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>=&quot;TOOLS\clwireg_ia64.exe&quot;/&gt;</span><span lang="EN-US"> </span><span lang="EN-US"></span></li>
<li class="MsoNormal" style='color:blue;line-height:150%;'><span lang="EN-US" style='color:windowtext;'>Find the element for </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";'>&lt;PackageFile</span><span lang="EN-US" style='color:windowtext;'> </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:red;'>Name</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";'>=&quot;dotNetFX30\XPSEPSC-x86-en-US.exe&quot;</span><span lang="EN-US" style='color:windowtext;'> and change the </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";'>PublicKey</span><span lang="EN-US" style='color:windowtext;'> value to: </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";'>3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001      </span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Find the      element for </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>&lt; PackageFile</span><span lang="EN-US"> </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:red;'>Name</span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>=&quot;dotNetFX30\XPSEPSC-amd64-en-US.exe&quot;</span><span lang="EN-US"> and change the </span><span lang="EN-US" style='font-size:10pt;line-height:150%;font-family:"Courier New";color:blue;'>PublicKey</span><span lang="EN-US"> value to the same as in step 4 above</span><span lang="EN-US"> </span><span lang="EN-US"></span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Save the <b>product.xml</b>      file</span><span lang="EN-US"> </span><span lang="EN-US"></span></li>
</ol>
<p class="MsoNormal" style='line-height:150%;'><b><span lang="EN-US">Download and Extract the Core Installation Files</span></b><span lang="EN-US"> </span></p>
<ol start="1" type="1">
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Navigate to the      following URL: <a href="http://go.microsoft.com/fwlink?LinkID=118080">http://go.microsoft.com/fwlink?LinkID=118080</a></span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Download the <b><i><u><span style='color:blue;'>dotNetFx35.exe</span></u></i></b> file to your local      disk.</span><span lang="EN-US"> </span><span lang="EN-US"></span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Open a Command      Prompt window and change to the directory to which you downloaded      dotNetFx35.exe.</span><span lang="EN-US"> </span><span lang="EN-US"></span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">At the command      prompt, type: <br />      <b><span style='color:blue;'>dotNetFx35.exe /x:</span></b><br />      This will extract the Framework files to a folder named &#8220;<b>WCU</b>&#8221;      in the current directory. </span></li>
<li class="MsoNormal" style='line-height:150%;'><span lang="EN-US">Copy the      contents of the <b>WCU\dotNetFramework</b> folder and paste them in the <b>%Program      Files%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1</b>      fo<b>lder (%ProgramFiles(x86)%\Microsoft      SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1</b> on <b>x64</b>      operating systems). </span></li>
</ol>
<p class="MsoNormal" style='margin-left:36pt;line-height:150%;'><b><span lang="EN-US" style='color:red;'>Note:</span></b><span lang="EN-US" style='color:red;'> </span><span lang="EN-US">Do not copy the <b>WCU\dotNetFramework</b> folder itself. There should be 5 folders under the <b>WCU</b> folder, and each of these should now appear in the <b>DotNetFx35SP1</b> folder. The folder structure should resemble the following:</span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span lang="EN-US" style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">DotNetFx35SP1 (folder) </span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span lang="EN-US" style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">dotNetFX20 (folder)</span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span lang="EN-US" style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US"> dotNetFX30 (folder)</span><span lang="EN-US"> </span><span lang="EN-US"></span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span lang="EN-US" style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">dotNetFX35 (folder)</span><span lang="EN-US"> </span><span lang="EN-US"></span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span lang="EN-US" style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">dotNetMSP (folder)</span><span lang="EN-US"> </span><span lang="EN-US"></span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span lang="EN-US" style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">TOOLS (folder)</span><span lang="EN-US"> </span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">en (or some other localized folder)</span><span lang="EN-US"> </span></p>
<p class="MsoListParagraph" style='margin-left:54pt;text-indent:-18pt;line-height:150%;'><span style='font-family:Wingdings;'><span>ü<span style='font:7pt "Times New Roman";'>&nbsp; </span></span></span><span lang="EN-US">dotNetFx35setup.exe (file)</span><span lang="EN-US"> </span></p>
<p class="MsoListParagraph" style='text-indent:-18pt;line-height:150%;'><span lang="EN-US"><span>6.<span style='font:7pt "Times New Roman";'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US">You may now delete the files and folders you downloaded and extracted in steps 2 and 4.</span></p>
<p class="MsoNormal" style='line-height:150%;'>Please refer the following link for more details.</p>
<p class="MsoNormal" style='line-height:150%;'><a href="http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm#General%20Issues">http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm#General%20Issues</a></p>
</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=84&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2009/12/30/how-to-enable-net-framework-3-5-sp1-bootstrapper-package-in-clickonce-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to read all countries using C#</title>
		<link>http://prabuguru.wordpress.com/2009/12/18/how-to-read-all-countries-using-c/</link>
		<comments>http://prabuguru.wordpress.com/2009/12/18/how-to-read-all-countries-using-c/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 08:04:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2009/12/18/how-to-read-all-countries-using-c</guid>
		<description><![CDATA[We can use CultureInfo&#160;&#38; RegionInfo class for getting all the countries information. From the CultureInfo class, we can get all the Culture information available in .Net Framework. Then we can use RegionInfo class for reading all the information about the region along with the Country name. Please use the following code snippet to achieve this. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=83&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal" style="line-height:18pt;"><span style="color:#333333;font-family:&quot;font-size:10pt;">We can use <a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx">CultureInfo</a>&nbsp;&amp; </span><span lang="EN" style="color:#333333;font-family:&quot;font-size:10pt;"><a href="http://msdn.microsoft.com/en-us/library/system.globalization.regioninfo.aspx">RegionInfo</a></span><b><span lang="EN" style="color:black;font-family:&quot;font-size:15pt;"> </span></b><span style="color:#333333;font-family:&quot;font-size:10pt;">class for getting all the countries information. From the CultureInfo class, we can get all the Culture information available in .Net Framework. Then we can use RegionInfo class for reading all the information about the region along with the Country name. Please use the following code snippet to achieve this.</span></div>
<p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr style="height:246.35pt;">
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;height:246.35pt;width:744.85pt;padding:0 5.4pt;" valign="top" width="993">
<div class="MsoNormal"><span style="color:blue;font-family:&quot;font-size:10pt;">static</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:blue;">void</span> Main(<span style="color:blue;">string</span>[] args)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">{</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt; countriesList = <span style="color:blue;">new</span> <span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt;();</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">foreach</span> (<span style="color:#2b91af;">CultureInfo</span> culture <span style="color:blue;">in</span> <span style="color:#2b91af;">CultureInfo</span>.GetCultures(<span style="color:#2b91af;">CultureTypes</span>.AllCultures &amp; ~<span style="color:#2b91af;">CultureTypes</span>.NeutralCultures))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">if</span> (!<span style="color:blue;">string</span>.IsNullOrEmpty(culture.Name))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#2b91af;">RegionInfo</span> ri = <span style="color:blue;">new</span> <span style="color:#2b91af;">RegionInfo</span>(culture.LCID);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue;">if</span> (!countriesList.Contains(ri.EnglishName))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; countriesList.Add(ri.EnglishName);</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; countriesList.Sort();</span><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">foreach</span> (<span style="color:blue;">string</span> str <span style="color:blue;">in</span> countriesList)</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#2b91af;">Console</span>.WriteLine(str);</span><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp; <span style="color:#2b91af;">Console</span>.ReadLine();</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">}</span></div>
</td>
</tr>
</tbody>
</table>
<div class="MsoNormal" style="line-height:18pt;"><span style="color:#333333;font-family:&quot;font-size:10pt;"></span></div>
<p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=83&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2009/12/18/how-to-read-all-countries-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get all Culture information using C#</title>
		<link>http://prabuguru.wordpress.com/2009/12/16/how-to-get-all-culture-information-using-c/</link>
		<comments>http://prabuguru.wordpress.com/2009/12/16/how-to-get-all-culture-information-using-c/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 10:22:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2009/12/16/how-to-get-all-culture-information-using-c</guid>
		<description><![CDATA[The CultureInfo&#160;class will provide us all Culture information available in .Net Framework. &#160;You can use CultureInfo.Get­Cultures&#160;static method for getting all the culture information. To get associated specific culture, please use static method CultureInfo.Cre­ateSpecificCul­ture.&#160; The following example will show you how to get all culture information. static void Main(string[] args) {&#160;&#160;&#160;&#160; // Get culture names&#160;&#160;&#160;&#160; List&#60;string&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=82&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<div class="MsoNormal">The <a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx">CultureInfo</a>&nbsp;class will provide us all Culture information available in .Net Framework. <span lang="EN"><span>&nbsp;</span>You can use <a href="http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.getcultures.aspx">CultureInfo.Get­Cultures</a>&nbsp;static method for getting all the culture information. To get associated specific culture, please use static method <a href="http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.createspecificculture.aspx">CultureInfo.Cre­ateSpecificCul­ture</a>.</span><span lang="EN">&nbsp;</span></div>
<p><span lang="EN">The following example will show you how to get all culture information.</span></p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background:#f2f2f2;border-bottom:medium none;border-collapse:collapse;border-left:medium none;border-right:medium none;border-top:medium none;">
<tbody>
<tr>
<td style="border-bottom:black 1pt solid;border-left:black 1pt solid;border-right:black 1pt solid;border-top:black 1pt solid;width:594.95pt;padding:0 5.4pt;" valign="top" width="793"><span style="font-family:&quot;font-size:10pt;"><span style="color:blue;">static </span><span style="color:blue;">void</span> Main(<span style="color:blue;">string</span>[] args)</span>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">{</span><br /><span style="font-family:Courier New;"><span style="font-size:x-small;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size:10pt;"><span></span><span style="color:green;">// Get culture names</span></span></span></span><br /><span style="font-family:&quot;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp; List</span>&lt;<span style="color:blue;">string</span>&gt; list = <span style="color:blue;">new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt;();</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:blue;">foreach </span>(<span style="color:#2b91af;">CultureInfo</span> ci <span style="color:blue;">in </span><span style="color:#2b91af;">CultureInfo</span>.GetCultures(<span style="color:#2b91af;">CultureTypes</span>.AllCultures))</span></div>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span><br /><span style="font-family:&quot;font-size:10pt;"><span style="color:blue;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string </span>specName = <span style="color:#a31515;">&#8220;(none)&#8221;</span>;</span><br /><span style="font-family:&quot;font-size:10pt;"><span style="color:blue;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try </span>{ specName = <span style="color:#2b91af;">CultureInfo</span>.CreateSpecificCulture(ci.Name).Name;}</span></div>
<p><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:blue;">catch</span>(<span style="color:#2b91af;">Exception</span>) { }</span></p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>list.Add(<span style="color:blue;">string</span>.Format(<span style="color:#a31515;">&#8220;{0,-12}{1,-12}{2}&#8221;</span>, ci.Name, specName, ci.EnglishName));</span><br /><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp; }</span></div>
<p><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp; list.Sort(); </span></p>
<p><span style="font-family:&quot;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp; Console</span>.WriteLine(<span style="color:#a31515;">&#8220;CULTURE<span>&nbsp;&nbsp;</span>SPEC.CULTURE<span>&nbsp; </span>ENGLISH NAME&#8221;</span>);</span><br /><span style="font-family:&quot;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp; Console</span>.WriteLine(<span style="color:#a31515;">&#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</span>);</span></p>
<p><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:blue;">foreach </span>(<span style="color:blue;">string</span> str <span style="color:blue;">in </span>list)</span><br /><span style="font-family:&quot;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console</span>.WriteLine(str);</span></p>
<p><span style="font-family:&quot;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp; Console</span>.ReadLine();</span><br /><span style="font-family:&quot;font-size:10pt;">}</span></td>
</tr>
</tbody>
</table>
<p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=82&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2009/12/16/how-to-get-all-culture-information-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to load the WPF controls dynamically at Runtime</title>
		<link>http://prabuguru.wordpress.com/2009/11/03/how-to-load-the-wpf-controls-dynamically-at-runtime/</link>
		<comments>http://prabuguru.wordpress.com/2009/11/03/how-to-load-the-wpf-controls-dynamically-at-runtime/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 08:08:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2009/11/03/how-to-load-the-wpf-controls-dynamically-at-runtime</guid>
		<description><![CDATA[In order to load the WPF controls dynamically at Runtime,&#160; please do the following steps. 1. Create a dummy XAML content file (Dynamic_Content.xaml) with Controls details. &#60;StackPanel&#160;&#160;&#160;&#160;xmlns=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;&#160;&#160;&#160;&#160;xmlns:x=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;&#62; &#160;&#160;&#160; &#60;Button x:Name=&#8221;buttonStart&#8221; IsEnabled=&#8221;True&#8221; Content=&#8221;Start&#8221; Height=&#8221;25&#8243; Width=&#8221;100&#8243; Margin=&#8221;5&#8243; /&#62;&#160;&#160;&#160; &#60;Button x:Name=&#8221;buttonStop&#8221; IsEnabled=&#8221;False&#8221; Content=&#8221;Stop&#8221; Height=&#8221;25&#8243; Width=&#8221;100&#8243; Margin=&#8221;5&#8243; /&#62; &#60;/StackPanel&#62; 2. Select the file (Dynamic_Content.xaml) in Solution Explorer and &#160;go [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=30&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:&quot;font-size:10pt;line-height:150%;">In order to load the WPF controls dynamically at Runtime,<span>&nbsp; </span>please do the following steps.</span></p>
<ul>
<div class="MsoListParagraph" style="line-height:150%;text-align:justify;text-indent:-18pt;"></div>
</ul>
<p><span style="font-family:&quot;font-size:10pt;line-height:150%;">1. Create a dummy XAML content file (Dynamic_Content.xaml) with Controls details.</span>
<ul>
<div class="MsoListParagraph" style="line-height:150%;text-align:justify;text-indent:-18pt;"></div>
</ul>
<div style="background:#f2f2f2;border-bottom:windowtext 1pt solid;border-left:windowtext 1pt solid;border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;margin-left:36pt;margin-right:0;padding:1pt 4pt;"><span style="color:blue;font-family:&quot;font-size:10pt;">&lt;</span><span style="color:#a31515;font-family:&quot;font-size:10pt;">StackPanel</span><br /><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;</span><span style="color:red;"><span>&nbsp;</span>xmlns</span><span style="color:blue;">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;</span></span><br /><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp;</span><span style="color:red;"><span>&nbsp;</span>xmlns</span><span style="color:blue;">:</span><span style="color:red;">x</span><span style="color:blue;">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;&gt;</span></span></p>
<p><span style="color:#a31515;font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span></span><span style="color:blue;font-family:&quot;font-size:10pt;">&lt;</span><span style="color:#a31515;font-family:&quot;font-size:10pt;">Button</span><span style="color:red;font-family:&quot;font-size:10pt;"> x</span><span style="color:blue;font-family:&quot;font-size:10pt;">:</span><span style="color:red;font-family:&quot;font-size:10pt;">Name</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;buttonStart&#8221; </span><span style="color:red;font-family:&quot;font-size:10pt;">IsEnabled</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;True&#8221;</span><span style="color:red;font-family:&quot;font-size:10pt;"> Content</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;Start&#8221; </span><span style="color:red;font-family:&quot;font-size:10pt;">Height</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;25&#8243;</span><span style="color:red;font-family:&quot;font-size:10pt;"> Width</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;100&#8243; </span><span style="color:red;font-family:&quot;font-size:10pt;">Margin</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;5&#8243; /&gt;</span><br /><span style="color:#a31515;font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span></span><span style="color:blue;font-family:&quot;font-size:10pt;">&lt;</span><span style="color:#a31515;font-family:&quot;font-size:10pt;">Button</span><span style="color:red;font-family:&quot;font-size:10pt;"> x</span><span style="color:blue;font-family:&quot;font-size:10pt;">:</span><span style="color:red;font-family:&quot;font-size:10pt;">Name</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;buttonStop&#8221; </span><span style="color:red;font-family:&quot;font-size:10pt;">IsEnabled</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;False&#8221;</span><span style="color:red;font-family:&quot;font-size:10pt;"> Content</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;Stop&#8221; </span><span style="color:red;font-family:&quot;font-size:10pt;">Height</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;25&#8243;</span><span style="color:red;font-family:&quot;font-size:10pt;"> Width</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;100&#8243; </span><span style="color:red;font-family:&quot;font-size:10pt;">Margin</span><span style="color:blue;font-family:&quot;font-size:10pt;">=&#8221;5&#8243; /&gt;</span></p>
<p>
<div class="MsoListParagraph" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;margin-left:0;padding:0;"><span style="color:blue;font-family:&quot;font-size:10pt;">&lt;/</span><span style="color:#a31515;font-family:&quot;font-size:10pt;">StackPanel</span><span style="color:blue;font-family:&quot;font-size:10pt;">&gt;</span></div>
</div>
<p><span style="font-family:&quot;font-size:10pt;line-height:150%;">2. Select the file (Dynamic_Content.xaml) in Solution Explorer and <span>&nbsp;</span>go to the properties.</span></p>
<p><span style="font-family:Trebuchet MS;"><span style="font-size:x-small;">3. <span style="font-size:10pt;line-height:150%;">Set “Build Action” as “Content” and “Copy to Output Directory” as “Copy always”.</span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Trebuchet MS;">4. <span style="font-size:10pt;line-height:150%;">Then you can use </span></span><u><span style="color:#0070c0;font-family:&quot;font-size:10pt;line-height:150%;"><a href="http://msdn.microsoft.com/en-us/library/system.windows.markup.xamlreader.aspx"><span style="color:#0070c0;">XamlReader</span></a></span></u><span style="font-family:&quot;font-size:10pt;line-height:150%;"> class for reading the XAML content which we have the controls.</span></span></p>
<p><span style="font-family:Trebuchet MS;"><span style="font-size:x-small;">5. <span style="font-size:10pt;line-height:150%;">Please use the following code to read and load controls from XAML content file.</span></span></span></p>
<p>
<div style="background:#f2f2f2;border-bottom:windowtext 1pt solid;border-left:windowtext 1pt solid;border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;margin-left:36pt;margin-right:0;padding:1pt 4pt;">
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="color:blue;font-family:&quot;font-size:10pt;">private</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:blue;">void </span>tab_TabItemAdded(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">TabItemEventArgs</span> e)</span></div>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;">{</span></div>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span><span style="color:#2b91af;">FileStream</span> stream = <span style="color:blue;">new </span><span style="color:#2b91af;">FileStream</span>(<span style="color:#a31515;">@&#8221;Dynamic_Content.xaml&#8221;</span>, <span style="color:#2b91af;">FileMode</span>.Open, <span style="color:#2b91af;">FileAccess</span>.Read);</span></div>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span><span style="color:#2b91af;">StackPanel</span> panel = <span style="color:#2b91af;">XamlReader</span>.Load(stream) <span style="color:blue;">as</span> <span style="color:#2b91af;">StackPanel</span>;</span></div>
<p>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span>e.TabItem.Content = panel;</span></div>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span>e.TabItem.Header = <span style="color:blue;">string</span>.Format(<span style="color:#a31515;">&#8220;Tab Item &#8211; {0}&#8221;</span>, tab.Items.Count);</span></div>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span>stream.Close();</span></div>
<p>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span><span style="color:#2b91af;">Button</span> buttonStart = panel.Children[0] <span style="color:blue;">as</span> <span style="color:#2b91af;">Button</span>;</span></div>
<p><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span>buttonStart.Click += <span style="color:blue;">new</span> <span style="color:#2b91af;">RoutedEventHandler </span>buttonStart_Click);<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;">}</span></div>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"></span></div>
<p>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="color:blue;font-family:&quot;font-size:10pt;">void</span><span style="font-family:&quot;font-size:10pt;"> buttonStart_Click(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">RoutedEventArgs </span>e)</span></div>
<p><span style="font-family:&quot;font-size:10pt;">{</span>
<div class="MsoNormal" style="background:#f2f2f2;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding:0;"><span style="font-family:&quot;font-size:10pt;"><span>&nbsp;&nbsp;&nbsp; </span><span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">&#8220;Start button invloked&#8221;</span>);</span></div>
<p><span style="font-family:&quot;font-size:10pt;">}</span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=30&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2009/11/03/how-to-load-the-wpf-controls-dynamically-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
		<item>
		<title>How to push certificate to &quot;Trusted root certificate authorities&quot; using Installer</title>
		<link>http://prabuguru.wordpress.com/2009/10/30/how-to-push-certificate-to-trusted-root-certificate-authorities-using-installer/</link>
		<comments>http://prabuguru.wordpress.com/2009/10/30/how-to-push-certificate-to-trusted-root-certificate-authorities-using-installer/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 09:37:00 +0000</pubDate>
		<dc:creator>Prabu</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://prabuguru.wordpress.com/2009/10/30/how-to-push-certificate-to-trusted-root-certificate-authorities-using-installer</guid>
		<description><![CDATA[In order to run your Full Trust enabled WPF XBAP application, you have to use “Self signed certificate authority file” for running and deploying XBAP application. The certificate should pushed it into “Trusted Publisher” and “Authority Root” certificate storages. You can use X509Certificate2 and X509Store classes in your installer assembly for pushing the certificate to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=29&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:&quot;font-size:10pt;">In order to run your Full Trust enabled WPF XBAP application, you have to use “<b>Self signed certificate authority file</b>” for running and deploying XBAP application. The certificate should pushed it into “<b>Trusted Publisher</b>” and “<b>Authority Root</b>” certificate storages. You can use </span><span style="color:#2b91af;font-family:&quot;font-size:10pt;"><a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificate2.aspx"><span style="color:#0b5394;">X509Certificate2</span></a> </span><span style="font-family:&quot;font-size:10pt;">and</span><span style="color:#2b91af;font-family:&quot;font-size:10pt;"> <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509store.aspx"><span style="color:#073763;">X509Store</span></a> </span><span style="font-family:&quot;font-size:10pt;">classes in your installer assembly for pushing the certificate to certificate storage. Please use the following code snippet. </span>
<div class="Section1">
<div style="border-bottom:windowtext 1pt solid;border-left:windowtext 1pt solid;border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;padding:1pt 4pt;">
<div class="MsoNormal" style="background:#f2f2f2;"><span style="color:blue;font-family:&quot;font-size:10pt;">string </span><span style="font-family:&quot;font-size:10pt;">certPath = <span style="color:blue;">string</span>.Format(<span style="color:#a31515;">@&#8221;{0}\Aaa.cer&#8221;</span>, <span style="color:#2b91af;">Environment</span>.GetFolderPath(<span style="color:#2b91af;">Environment</span>.<span style="color:#2b91af;">SpecialFolder</span>.System));</span><br /><span style="color:#2b91af;font-family:&quot;font-size:10pt;"></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="color:#2b91af;font-family:&quot;font-size:10pt;">X509Certificate2 </span><span style="font-family:&quot;font-size:10pt;">certificate = <span style="color:blue;">new</span> <span style="color:#2b91af;">X509Certificate2</span>(certPath);</span><br /><span style="color:#2b91af;font-family:&quot;font-size:10pt;">X509Store</span><span style="font-family:&quot;font-size:10pt;"> trustedPublisherStore = <span style="color:blue;">new</span> <span style="color:#2b91af;">X509Store</span>(<span style="color:#2b91af;">StoreName</span>.TrustedPublisher, <span style="color:#2b91af;">StoreLocation</span>.LocalMachine);</span><br /><span style="color:#2b91af;font-family:&quot;font-size:10pt;">X509Store</span><span style="font-family:&quot;font-size:10pt;"> trustedAuthorityRootStore = <span style="color:blue;">new</span> <span style="color:#2b91af;">X509Store</span>(<span style="color:#2b91af;">StoreName</span>.AuthRoot, <span style="color:#2b91af;">StoreLocation</span>.LocalMachine);</span></p>
<p><span style="color:blue;font-family:&quot;font-size:10pt;">try</span><br /><span style="font-family:&quot;font-size:10pt;">{</span><span style="font-family:&quot;font-size:10pt;"><br />&nbsp;&nbsp;&nbsp;&nbsp; trustedPublisherStore.Add(certificate);</span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:x-small;">&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size:10pt;"><span style="font-family:Courier New;">trustedPublisherStore.Open(<span style="color:#2b91af;">OpenFlags</span>.ReadWrite);</span></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:x-small;">&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size:10pt;"><span style="font-family:Courier New;">trustedPublisherStore.Add(certificate);</span></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:x-small;">&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size:10pt;"><span style="font-family:Courier New;">trustedAuthorityRootStore.Open(<span style="color:#2b91af;">OpenFlags</span>.ReadWrite);</span></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:x-small;">&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size:10pt;"><span style="font-family:Courier New;">trustedAuthorityRootStore.Add(certificate);</span></span><br /><span style="font-family:&quot;font-size:10pt;">}</span><br /><span style="color:blue;font-family:&quot;font-size:10pt;">catch</span><span style="font-family:&quot;font-size:10pt;"> (<span style="color:#2b91af;">Exception </span>ex)</span><br /><span style="font-family:&quot;font-size:10pt;">{</span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:&quot;font-size:10pt;"><span style="color:#2b91af;font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp; MessageBox</span><span style="font-family:&quot;font-size:10pt;">.Show(ex.Message + <span style="color:#a31515;">&#8220;\n\n&#8221;</span> + ex.StackTrace);</span><br /><span style="font-family:&quot;font-size:10pt;">}</span></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:&quot;font-size:10pt;"><span style="color:blue;font-family:&quot;font-size:10pt;">finally</span><br /><span style="font-family:&quot;font-size:10pt;">{</span></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family:&quot;font-size:10pt;"><span style="font-family:&quot;font-size:10pt;">trustedPublisherStore.Close();</span></span></span></div>
<div class="MsoNormal" style="background:#f2f2f2;"><span style="font-family:&quot;font-size:10pt;"><span style="font-family:&quot;font-size:10pt;"><span style="font-family:&quot;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp; trustedAuthorityRootStore.Close();</span><br /><span style="font-family:&quot;font-size:10pt;">}</span></span></span></div>
</div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">For more information about <span class="MsoHyperlink"><a href="http://savij.com/2007/02/19/5/" title="Permanent Link to Signing &amp; Deploying CAB Based ClickOnce Code">Signing &amp; Deploying CAB Based ClickOnce&nbsp;Code</a>.</span></span></div>
<p>
<div class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">Please refer the following link to know more about “<b>WPF &#8211; XBAP as Full Trust Application</b>”</span></div>
<p>
<div class="MsoNormal"><span style="color:#073763;font-family:&quot;font-size:10pt;"><a href="http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/05/wpf-xbap-as-full-trust-application.aspx">http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/05/wpf-xbap-as-full-trust-application.aspx</a></span></p>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prabuguru.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prabuguru.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prabuguru.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prabuguru.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prabuguru.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prabuguru.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prabuguru.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prabuguru.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prabuguru.wordpress.com&amp;blog=10577931&amp;post=29&amp;subd=prabuguru&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prabuguru.wordpress.com/2009/10/30/how-to-push-certificate-to-trusted-root-certificate-authorities-using-installer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d2b8ffb4af28a6e304c4c527639f851?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Guru</media:title>
		</media:content>
	</item>
	</channel>
</rss>
