This is a migrated thread and some comments may be shown as answers.

Navigation Samples failing with Silverlight 3 because of URIMapping

1 Answer 102 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
Yusuf
Top achievements
Rank 1
Yusuf asked on 18 Jul 2009, 12:57 AM
The Books Sample and Car samples for Page Navigation are failing in Silverlight 3 with the following error.
System.Windows.Markup.XamlParseException occurred
  Message="AG_E_PARSER_UNKNOWN_TYPE [Line: 8 Position: 26]"
  LineNumber=8
  LinePosition=26
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at BooksExample.App.InitializeComponent()
       at BooksExample.App..ctor()
  InnerException:

In order to debug the issue I tried the Silverlight Navigation Framework and that too failed. Further analysis showed that earlier navigation:Frame element we didn't specify the UriMapper. After explicitly setting the same it works fine. So is the issue with Book Sample similiar to this one? But I didn't see any property like UriMapper in the RadFrame? How to solve this issue?

Thanks & Regards,
Yusuf Nazami

1 Answer, 1 is accepted

Sort by
0
Accepted
Bobi
Telerik team
answered on 20 Jul 2009, 12:50 PM
Hello Yusuf,

This exception happens because you try to access internal or private resources .
In order to have working example in Silverlight 3 you have to do the following:

1.Go to Resource.Designer.cs ,  now you have the following code:

[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resource() {
        }

in order to work correctly  you have to make the constructor public:

[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public Resource() {
        }

2.Go to App.xaml and verify that you reference the resource file correctly. For example :
 xmlns:local="clr-namespace:BooksExample"

<local:Resource x:Key="Resources"/>

I hope that this answers your question.

Greetings,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Navigation
Asked by
Yusuf
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or