<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: How to switch Silverlight UserControls</title>
	<atom:link href="http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/feed/" rel="self" type="application/rss+xml" />
	<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/</link>
	<description>Thoughts about life, the universe and everything else.</description>
	<lastBuildDate>Tue, 09 Mar 2010 19:26:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: How to sett the RootVisual multiple times from code in Silverlight 3 &#171; Knowledgebase</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-17443</link>
		<dc:creator>How to sett the RootVisual multiple times from code in Silverlight 3 &#171; Knowledgebase</dc:creator>
		<pubDate>Tue, 09 Mar 2010 19:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-17443</guid>
		<description>[...] http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/" rel="nofollow">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Nicholson</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-11625</link>
		<dc:creator>Craig Nicholson</dc:creator>
		<pubDate>Fri, 09 Oct 2009 14:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-11625</guid>
		<description>It depends how you implement your concept of a user. If you are using the commonly used cookie-based forms authentication scheme then you could make a Web service call to a logout/login method and change user that way.</description>
		<content:encoded><![CDATA[<p>It depends how you implement your concept of a user. If you are using the commonly used cookie-based forms authentication scheme then you could make a Web service call to a logout/login method and change user that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Nicholson</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-11624</link>
		<dc:creator>Craig Nicholson</dc:creator>
		<pubDate>Fri, 09 Oct 2009 14:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-11624</guid>
		<description>The InitParams solution is good for views that only change when the web page is refreshed. My solution is for when you need to keep a long-runnning instance of the same control.</description>
		<content:encoded><![CDATA[<p>The InitParams solution is good for views that only change when the web page is refreshed. My solution is for when you need to keep a long-runnning instance of the same control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Nicholson</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-11623</link>
		<dc:creator>Craig Nicholson</dc:creator>
		<pubDate>Fri, 09 Oct 2009 14:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-11623</guid>
		<description>Well if by &quot;pages&quot; you mean Silverlight canvases/controls, then yes, they all get packaged in your XAP file and sent to your browser at the same time. Using Silverlight 3 though you can do some more interesting deferred loading of resources.</description>
		<content:encoded><![CDATA[<p>Well if by &#8220;pages&#8221; you mean Silverlight canvases/controls, then yes, they all get packaged in your XAP file and sent to your browser at the same time. Using Silverlight 3 though you can do some more interesting deferred loading of resources.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean-Pierre Fouche</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-11618</link>
		<dc:creator>Jean-Pierre Fouche</dc:creator>
		<pubDate>Fri, 09 Oct 2009 10:20:57 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-11618</guid>
		<description>In an application with - say 1000 - pages, do all of these pages get streamed to the client (browser), or just the currently visible page?</description>
		<content:encoded><![CDATA[<p>In an application with &#8211; say 1000 &#8211; pages, do all of these pages get streamed to the client (browser), or just the currently visible page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wardy</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-11590</link>
		<dc:creator>Wardy</dc:creator>
		<pubDate>Mon, 05 Oct 2009 13:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-11590</guid>
		<description>I did this using startup params.
The &quot;flow&quot; goes something like this :

1. User requests page so server builds page 
2. server sends page to client and client scripts execute
3. silverlight objects are executed

So ...

In your aspx page html you put the standard object tag with this in it : 
 

depending on requirements you can either edit this object tag on the server or the client.

1 Of the params I pass in is a &quot;StartingControl&quot; which in the App.Xaml.cs file I do this with : 

void Application_Startup(object sender, StartupEventArgs e)
{
    switch(e.InitParams[&quot;StartupControl&quot;])
    {
       case &quot;Control1&quot; :
          this.RootVisual = new Control1();
          break;
       .... 
    }
}

This gives you switching functionality before the silverlight object is loaded.

Combine the 2 samples and you can make whatever changes you need at any point.

:)</description>
		<content:encoded><![CDATA[<p>I did this using startup params.<br />
The &#8220;flow&#8221; goes something like this :</p>
<p>1. User requests page so server builds page<br />
2. server sends page to client and client scripts execute<br />
3. silverlight objects are executed</p>
<p>So &#8230;</p>
<p>In your aspx page html you put the standard object tag with this in it : </p>
<p>depending on requirements you can either edit this object tag on the server or the client.</p>
<p>1 Of the params I pass in is a &#8220;StartingControl&#8221; which in the App.Xaml.cs file I do this with : </p>
<p>void Application_Startup(object sender, StartupEventArgs e)<br />
{<br />
    switch(e.InitParams["StartupControl"])<br />
    {<br />
       case &#8220;Control1&#8243; :<br />
          this.RootVisual = new Control1();<br />
          break;<br />
       &#8230;.<br />
    }<br />
}</p>
<p>This gives you switching functionality before the silverlight object is loaded.</p>
<p>Combine the 2 samples and you can make whatever changes you need at any point.</p>
<p> <img src='http://craign.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TIAJZHANE</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-11058</link>
		<dc:creator>TIAJZHANE</dc:creator>
		<pubDate>Sat, 29 Aug 2009 23:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-11058</guid>
		<description>THIS STINKS HOW DO U SWITCH USERS</description>
		<content:encoded><![CDATA[<p>THIS STINKS HOW DO U SWITCH USERS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-10868</link>
		<dc:creator>Stuart</dc:creator>
		<pubDate>Thu, 13 Aug 2009 15:22:58 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-10868</guid>
		<description>Great post, how do I update switch the control if I want to update the Silverlight Control from the hosting web page?  I have a .aspx page and based on a selection that a user makes, I want to change the Silverlight control to be displayed.  However in the .aspx.cs I don&#039;t have access to the UserControlContainer.</description>
		<content:encoded><![CDATA[<p>Great post, how do I update switch the control if I want to update the Silverlight Control from the hosting web page?  I have a .aspx page and based on a selection that a user makes, I want to change the Silverlight control to be displayed.  However in the .aspx.cs I don&#8217;t have access to the UserControlContainer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaz</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-6547</link>
		<dc:creator>Gaz</dc:creator>
		<pubDate>Sat, 07 Mar 2009 23:26:57 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-6547</guid>
		<description>It works really well! Thank you :)</description>
		<content:encoded><![CDATA[<p>It works really well! Thank you <img src='http://craign.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ljc</title>
		<link>http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/comment-page-1/#comment-5204</link>
		<dc:creator>ljc</dc:creator>
		<pubDate>Wed, 21 Jan 2009 14:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://craign.net/2008/03/11/how-to-switch-silverlight-usercontrols/#comment-5204</guid>
		<description>How to hold the state of page when switch back
from testControl</description>
		<content:encoded><![CDATA[<p>How to hold the state of page when switch back<br />
from testControl</p>
]]></content:encoded>
	</item>
</channel>
</rss>
