<?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>Mon, 24 May 2010 15:43:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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) you have to use [...]]]></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://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.formatexception.com%2F2008%2F09%2Fnamespace-aliasing%2F&amp;title=Namespace%20Aliasing&amp;bodytext=%C2%A0When%20working%20with%20WPF%2C%20though%20this%20is%20applicable%20universally%2C%20a%20lot%20of%0D%0Atimes%20you%20end%20up%20working%20with%20both%20the%20old%20WinForms%20stuff%20and%20the%20new%0D%0AWPF%20stuff.%C2%A0%20The%20object%20names%20between%20the%20two%20namespaces%20are%20almost%0D%0Aidentical%20which%20can%20be%20a%20real%20pain%20m" title="Digg"><img src="http://www.formatexception.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<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://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.formatexception.com%2F2008%2F09%2Fnamespace-aliasing%2F&amp;title=Namespace%20Aliasing" title="DotNetKicks"><img src="http://www.formatexception.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.formatexception.com%2F2008%2F09%2Fnamespace-aliasing%2F&amp;title=Namespace%20Aliasing&amp;annotation=%C2%A0When%20working%20with%20WPF%2C%20though%20this%20is%20applicable%20universally%2C%20a%20lot%20of%0D%0Atimes%20you%20end%20up%20working%20with%20both%20the%20old%20WinForms%20stuff%20and%20the%20new%0D%0AWPF%20stuff.%C2%A0%20The%20object%20names%20between%20the%20two%20namespaces%20are%20almost%0D%0Aidentical%20which%20can%20be%20a%20real%20pain%20m" title="Google Bookmarks"><img src="http://www.formatexception.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.formatexception.com%2F2008%2F09%2Fnamespace-aliasing%2F&amp;title=Namespace%20Aliasing" title="Live"><img src="http://www.formatexception.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" 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>
