<?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/"
		>
<channel>
	<title>Comments on: Opening up Silverlight 4 Navigation: Introduction to INavigationContentLoader</title>
	<atom:link href="http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/</link>
	<description>Silverlight, RIA development, and other goofy geeky goodness.</description>
	<lastBuildDate>Mon, 30 Aug 2010 22:58:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: sagar</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-7150</link>
		<dc:creator>sagar</dc:creator>
		<pubDate>Mon, 30 Aug 2010 03:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-7150</guid>
		<description>Thanks a lot David for your quick reply. We&#039;ll go through you suggestion and links provided and let you know):</description>
		<content:encoded><![CDATA[<p>Thanks a lot David for your quick reply. We&#8217;ll go through you suggestion and links provided and let you know):</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david.poll</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-7149</link>
		<dc:creator>david.poll</dc:creator>
		<pubDate>Sun, 29 Aug 2010 20:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-7149</guid>
		<description>Sagar,

The best suggestion I can give you is to look at my sample here: http://www.davidpoll.com/2010/05/10/common-navigation-ui-and-authorization-driven-sitemaps/

The sitemap UI I present is TreeView based and uses a declarative sitemap, limiting visibility of nodes in the sitemap based upon authorization.  It&#039;s all extensible and doesn&#039;t have to be defined in XAML -- this is just the experience I chose for the 90% case.  If you run into something that&#039;s broken with it, please do let me know :)

As for your second issue, it really depends on what their content is.  If users are using the RichTextBox control to generate content, for example, you might store the XAML they generate directly into a database (just as a string) and use XamlReader.Load() on the content to pull it back out.  I actually have a richer example of this here: http://www.davidpoll.com/2010/07/25/to-xaml-with-love-an-experiment-with-xaml-serialization-in-silverlight/

If the RichTextBox only has plain inlines (e.g. Hyperlinks, Runs, Bolds, Italics, etc.) and nothing richer (e.g. Images, inline UI, etc.), then you can just use the .Xaml property of the RichTextBox to get the XAML back out.  Otherwise, the UiXamlSerializer in my post above may be able to help.

I hope that helps!
-David</description>
		<content:encoded><![CDATA[<p>Sagar,</p>
<p>The best suggestion I can give you is to look at my sample here: <a href="http://www.davidpoll.com/2010/05/10/common-navigation-ui-and-authorization-driven-sitemaps/" rel="nofollow">http://www.davidpoll.com/2010/05/10/common-navigation-ui-and-authorization-driven-sitemaps/</a></p>
<p>The sitemap UI I present is TreeView based and uses a declarative sitemap, limiting visibility of nodes in the sitemap based upon authorization.  It&#8217;s all extensible and doesn&#8217;t have to be defined in XAML &#8212; this is just the experience I chose for the 90% case.  If you run into something that&#8217;s broken with it, please do let me know <img src='http://www.davidpoll.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As for your second issue, it really depends on what their content is.  If users are using the RichTextBox control to generate content, for example, you might store the XAML they generate directly into a database (just as a string) and use XamlReader.Load() on the content to pull it back out.  I actually have a richer example of this here: <a href="http://www.davidpoll.com/2010/07/25/to-xaml-with-love-an-experiment-with-xaml-serialization-in-silverlight/" rel="nofollow">http://www.davidpoll.com/2010/07/25/to-xaml-with-love-an-experiment-with-xaml-serialization-in-silverlight/</a></p>
<p>If the RichTextBox only has plain inlines (e.g. Hyperlinks, Runs, Bolds, Italics, etc.) and nothing richer (e.g. Images, inline UI, etc.), then you can just use the .Xaml property of the RichTextBox to get the XAML back out.  Otherwise, the UiXamlSerializer in my post above may be able to help.</p>
<p>I hope that helps!<br />
-David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sagar</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-7147</link>
		<dc:creator>sagar</dc:creator>
		<pubDate>Sun, 29 Aug 2010 20:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-7147</guid>
		<description>Hi,

We are planning to develop a community site using silverlight4. We have two issues one related to SL navigation and another general concept. We need ur suggestion.

Issue 1#: We need to generate the menu and submenu at run time depending on user role. User role name and pages(URL) they can authorize to access are being defined in database( we have separate interface for that). On login we need to read the database and generate menu/submenu according to role of the user. What is best option to do this in SL.

Issue 2#: Second issue is general architectural concept. What is best way to store article submitted by user while developing a community site. 

Please share your knowledge and useful link to solve our problem and help us to develop a robust Sl application):

Thanks
Sagar</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>We are planning to develop a community site using silverlight4. We have two issues one related to SL navigation and another general concept. We need ur suggestion.</p>
<p>Issue 1#: We need to generate the menu and submenu at run time depending on user role. User role name and pages(URL) they can authorize to access are being defined in database( we have separate interface for that). On login we need to read the database and generate menu/submenu according to role of the user. What is best option to do this in SL.</p>
<p>Issue 2#: Second issue is general architectural concept. What is best way to store article submitted by user while developing a community site. </p>
<p>Please share your knowledge and useful link to solve our problem and help us to develop a robust Sl application):</p>
<p>Thanks<br />
Sagar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrus</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-6919</link>
		<dc:creator>Andrus</dc:creator>
		<pubDate>Fri, 25 Jun 2010 21:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-6919</guid>
		<description>I need to open navigation pages inside TabControl.
For this I implemented INavigationContentLoader based on this code using dummy Page() control. Navigation is invoked using

public static void Navigate(string form)
        {
            App.Current.RootVisual.ContentFrame.Navigate(new Uri(form, UriKind.Relative));
        }


If user clicks rapidly browser back and forward buttons, browser history menu contains duplicate names and name does not correspond to page. 
How to fix this ? 

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using MyApp.UI;

namespace TypenameContentLoader.ContentLoader
{
    public class TypenameContentLoader : INavigationContentLoader
    {
        string GetTypeNameFromUri(Uri uri)
        {
            if (!uri.IsAbsoluteUri)
                uri = new Uri(new Uri(&quot;dummy:///&quot;, UriKind.Absolute), uri.OriginalString);
            return Uri.UnescapeDataString(uri.AbsolutePath.Substring(1));
        }

        #region INavigationContentLoader Members

        public bool CanLoad(Uri targetUri, Uri currentUri)
        {
            return true;
        }

        public IAsyncResult BeginLoad(Uri targetUri, Uri currentUri, AsyncCallback userCallback, object asyncState)
        {
            var result = new TypenameContentLoaderAsyncResult(asyncState);
            var res = GetTypeNameFromUri(targetUri);
            var page = new Page();
            if (res != &quot;&quot;)
            {
                var frm = FormManager.LoadForm(res); 
                page.Title = FormManager.Header(res);
            }
            result.Result =  page;
            userCallback(result);
            return result;
        }

        public LoadResult EndLoad(IAsyncResult asyncResult)
        {
            return new LoadResult(((TypenameContentLoaderAsyncResult)asyncResult).Result);
        }

        public void CancelLoad(IAsyncResult asyncResult)
        {
            return;
        }

        #endregion
    }
}

 This is also discussed in  http://forums.silverlight.net/forums/p/187817/431200.aspx</description>
		<content:encoded><![CDATA[<p>I need to open navigation pages inside TabControl.<br />
For this I implemented INavigationContentLoader based on this code using dummy Page() control. Navigation is invoked using</p>
<p>public static void Navigate(string form)<br />
        {<br />
            App.Current.RootVisual.ContentFrame.Navigate(new Uri(form, UriKind.Relative));<br />
        }</p>
<p>If user clicks rapidly browser back and forward buttons, browser history menu contains duplicate names and name does not correspond to page.<br />
How to fix this ? </p>
<p>using System;<br />
using System.Windows;<br />
using System.Windows.Controls;<br />
using System.Windows.Navigation;<br />
using MyApp.UI;</p>
<p>namespace TypenameContentLoader.ContentLoader<br />
{<br />
    public class TypenameContentLoader : INavigationContentLoader<br />
    {<br />
        string GetTypeNameFromUri(Uri uri)<br />
        {<br />
            if (!uri.IsAbsoluteUri)<br />
                uri = new Uri(new Uri(&#8220;dummy:///&#8221;, UriKind.Absolute), uri.OriginalString);<br />
            return Uri.UnescapeDataString(uri.AbsolutePath.Substring(1));<br />
        }</p>
<p>        #region INavigationContentLoader Members</p>
<p>        public bool CanLoad(Uri targetUri, Uri currentUri)<br />
        {<br />
            return true;<br />
        }</p>
<p>        public IAsyncResult BeginLoad(Uri targetUri, Uri currentUri, AsyncCallback userCallback, object asyncState)<br />
        {<br />
            var result = new TypenameContentLoaderAsyncResult(asyncState);<br />
            var res = GetTypeNameFromUri(targetUri);<br />
            var page = new Page();<br />
            if (res != &#8220;&#8221;)<br />
            {<br />
                var frm = FormManager.LoadForm(res);<br />
                page.Title = FormManager.Header(res);<br />
            }<br />
            result.Result =  page;<br />
            userCallback(result);<br />
            return result;<br />
        }</p>
<p>        public LoadResult EndLoad(IAsyncResult asyncResult)<br />
        {<br />
            return new LoadResult(((TypenameContentLoaderAsyncResult)asyncResult).Result);<br />
        }</p>
<p>        public void CancelLoad(IAsyncResult asyncResult)<br />
        {<br />
            return;<br />
        }</p>
<p>        #endregion<br />
    }<br />
}</p>
<p> This is also discussed in  <a href="http://forums.silverlight.net/forums/p/187817/431200.aspx" rel="nofollow">http://forums.silverlight.net/forums/p/187817/431200.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sparks</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-6659</link>
		<dc:creator>Michael Sparks</dc:creator>
		<pubDate>Tue, 11 May 2010 17:50:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-6659</guid>
		<description>Is there a way to get a reference to the navigation service other than waiting for a page to load and grabbing the reference from the page property? I have a custom Navigation Content Provider and need access to the navigation service across the application. 

Thanks</description>
		<content:encoded><![CDATA[<p>Is there a way to get a reference to the navigation service other than waiting for a page to load and grabbing the reference from the page property? I have a custom Navigation Content Provider and need access to the navigation service across the application. </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david.poll</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-6370</link>
		<dc:creator>david.poll</dc:creator>
		<pubDate>Sat, 24 Apr 2010 04:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-6370</guid>
		<description>The lives samples for most of my content should now be updated for SL4 RTW.</description>
		<content:encoded><![CDATA[<p>The lives samples for most of my content should now be updated for SL4 RTW.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-6366</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 23 Apr 2010 20:04:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-6366</guid>
		<description>Hey David, are you able to convert your live sample to SL4 RTW? Thanks!</description>
		<content:encoded><![CDATA[<p>Hey David, are you able to convert your live sample to SL4 RTW? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gisela</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-6203</link>
		<dc:creator>Gisela</dc:creator>
		<pubDate>Sat, 10 Apr 2010 08:07:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-6203</guid>
		<description>Hi David,

your article is very helpful. Now i have one question:
Is it possible to pass objects from one page to another page via the ContentLoader? If yes, how i can do this.</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>your article is very helpful. Now i have one question:<br />
Is it possible to pass objects from one page to another page via the ContentLoader? If yes, how i can do this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Opening up Silverlight 4 Navigation: Event-based and Error-Handling INavigationContentLoaders &#171; davidpoll.com</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-5168</link>
		<dc:creator>Opening up Silverlight 4 Navigation: Event-based and Error-Handling INavigationContentLoaders &#171; davidpoll.com</dc:creator>
		<pubDate>Mon, 07 Dec 2009 08:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-5168</guid>
		<description>[...] Contact        &#171; Opening up Silverlight 4 Navigation: Introduction to INavigationContentLoader [...]</description>
		<content:encoded><![CDATA[<p>[...] Contact        &laquo; Opening up Silverlight 4 Navigation: Introduction to INavigationContentLoader [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david.poll</title>
		<link>http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/comment-page-1/#comment-5162</link>
		<dc:creator>david.poll</dc:creator>
		<pubDate>Sun, 06 Dec 2009 19:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidpoll.com/?p=195#comment-5162</guid>
		<description>Indeed, I think both MEF and PRISM might have some good prospects here :).  I&#039;ve been chatting with Glenn Block and David Hill about how these things might work together.</description>
		<content:encoded><![CDATA[<p>Indeed, I think both MEF and PRISM might have some good prospects here <img src='http://www.davidpoll.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .  I&#8217;ve been chatting with Glenn Block and David Hill about how these things might work together.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
