<?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>.NET Tips and Tricks &#187; C#</title>
	<atom:link href="http://blog.themagicsoftware.com/category/c/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.themagicsoftware.com</link>
	<description>General tips and tricks for developers about the Microsoft technology stack including the .NET Framework, ASP.NET, ASP.NET MVC, C#.NET, VB.NET, WCF, WPF, WF, Silverlight, XAML, XNA, Windows Phone, Windows 8 and more.</description>
	<lastBuildDate>Sat, 02 Feb 2013 04:54:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>In ShellTile TileToFind = ShellTile.ActiveTiles.First(); First doesn&#8217;t get recognized problem.</title>
		<link>http://blog.themagicsoftware.com/2012/03/in-shelltile-tiletofind-shelltile-activetiles-first-first-doesnt-get-recognized-problem.html</link>
		<comments>http://blog.themagicsoftware.com/2012/03/in-shelltile-tiletofind-shelltile-activetiles-first-first-doesnt-get-recognized-problem.html#comments</comments>
		<pubDate>Thu, 08 Mar 2012 05:29:33 +0000</pubDate>
		<dc:creator>Gerardo Melendrez</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://blog.themagicsoftware.com/?p=169</guid>
		<description><![CDATA[Problem: I have the following line: ShellTile TileToFind = ShellTile .ActiveTiles.First(); to get the first application tile of my Windows Phone 7 application, but First() doesn&#8217;t get recognized and I get this error: Error 2 &#8216;System.Collections.Generic.IEnumerable&#60;Microsoft.Phone.Shell.ShellTile&#62;&#8217; does not contain a definition for &#8216;First&#8217; and no extension method &#8216;First&#8217; accepting a first argument of type &#8216;System.Collections.Generic.IEnumerable&#60;Microsoft.Phone.Shell.ShellTile&#62;&#8217; could be found [...]]]></description>
				<content:encoded><![CDATA[<p>Problem:</p>
<p>I have the following line: <span style="color: #2b91af;">ShellTile</span><span> TileToFind = <span style="color: #2b91af;">ShellTile</span><span> .ActiveTiles.First(); to get the first application tile of my Windows Phone 7 application, but First() doesn&#8217;t get recognized and I get this error:</span></span></p>
<p>Error 2 &#8216;System.Collections.Generic.IEnumerable&lt;Microsoft.Phone.Shell.ShellTile&gt;&#8217; does not contain a definition for &#8216;First&#8217; and no extension method &#8216;First&#8217; accepting a first argument of type &#8216;System.Collections.Generic.IEnumerable&lt;Microsoft.Phone.Shell.ShellTile&gt;&#8217; could be found (are you missing a using directive or an assembly reference?)</p>
<p>Solution:</p>
<p>Add the following using statement at the top of your .cs file.</p>
<p><span style="color: #0000ff;">using</span><span> System.Linq;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.themagicsoftware.com/2012/03/in-shelltile-tiletofind-shelltile-activetiles-first-first-doesnt-get-recognized-problem.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How can I call NavigationService.Navigate from App.xaml.cs?</title>
		<link>http://blog.themagicsoftware.com/2012/02/how-can-i-call-navigationservice-navigate-from-app-xaml-cs.html</link>
		<comments>http://blog.themagicsoftware.com/2012/02/how-can-i-call-navigationservice-navigate-from-app-xaml-cs.html#comments</comments>
		<pubDate>Tue, 28 Feb 2012 03:28:50 +0000</pubDate>
		<dc:creator>Gerardo Melendrez</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://blog.themagicsoftware.com/?p=166</guid>
		<description><![CDATA[Try this: (Application .Current.RootVisual as PhoneApplicationFrame ).Navigate(new Uri (&#8220;/PageNameHere.xaml&#8221; , UriKind .Relative))]]></description>
				<content:encoded><![CDATA[<p>Try this:</p>
<p>(<span style="color: #2b91af;">Application</span><span> .Current.RootVisual <span style="color: #0000ff;">as</span><span> <span style="color: #2b91af;">PhoneApplicationFrame</span><span> ).Navigate(<span style="color: #0000ff;">new</span><span> <span style="color: #2b91af;">Uri</span><span> (<span style="color: #a31515;">&#8220;/PageNameHere.xaml&#8221;</span><span> , <span style="color: #2b91af;">UriKind</span><span> .Relative))</span></span></span></span></span></span></span></p>
<div style="color: black; overflow: auto; width: 99.5%;">
<pre style="margin: 0em;"></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.themagicsoftware.com/2012/02/how-can-i-call-navigationservice-navigate-from-app-xaml-cs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
