<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FormatException &#187; aliasing</title>
	<atom:link href="http://www.formatexception.com/tag/aliasing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.formatexception.com</link>
	<description>Ramblings on developing in the Windows World</description>
	<lastBuildDate>Fri, 23 Sep 2011 15:34:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Namespace Aliasing</title>
		<link>http://www.formatexception.com/2008/09/namespace-aliasing/</link>
		<comments>http://www.formatexception.com/2008/09/namespace-aliasing/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 22:22:02 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[aliasing]]></category>

		<guid isPermaLink="false">http://www.formatexception.com/?p=10</guid>
		<description><![CDATA[ When working with WPF, though this is applicable universally, a lot of times you end up working with both the old WinForms stuff and the new WPF stuff.  The object names between the two namespaces are almost identical which can be a real pain meaning anytime you reference &#8220;Label&#8221; in code (but outside the XAML) [...]]]></description>
			<content:encoded><![CDATA[<p><!--StartFragment --> When working with WPF, though this is applicable universally, a lot of<br />
times you end up working with both the old WinForms stuff and the new<br />
WPF stuff.  The object names between the two namespaces are almost<br />
identical which can be a real pain meaning anytime you reference &#8220;Label&#8221;<br />
in code (but outside the XAML) you have to use the fully-qualified<br />
namespace.  Well, you can short cut (alias) that by doing the following:</p>
<p>// WPF namespace<br />
using WPF = System.Windows.Controls;<br />
// WinForms namespace<br />
using WinForms = System.Windows.Forms;</p>
<p>Huh, an equals in the namespace?  Yes, and now rather then having to use<br />
System.Windows.Controls.Label for a WPF label or<br />
System.Windows.Forms.Label for a WinForms label you can just use WPF.Label<br />
for a wpf label and WinForms.Label for a WinForms label.  That should<br />
save you some typing!</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.formatexception.com%2F2008%2F09%2Fnamespace-aliasing%2F&amp;t=Namespace%20Aliasing" title="Facebook"><img src="http://www.formatexception.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.formatexception.com%2F2008%2F09%2Fnamespace-aliasing%2F&amp;t=Namespace%20Aliasing" title="HackerNews"><img src="http://www.formatexception.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.formatexception.com/2008/09/namespace-aliasing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

