Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 955809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:26:39+00:00 2026-05-16T00:26:39+00:00

In Navigation API of Silverlight 3 the UriMapper class is case sensitive. For the

  • 0

In Navigation API of Silverlight 3 the UriMapper class is case sensitive. For the following uri mapping

<nav:Frame Source="/Home">
  <nav:Frame.UriMapper>
    <uriMapper:UriMapper>
      <uriMapper:UriMapping
        Uri=""
        MappedUri="/Views/HomePage.xaml"/>
      <uriMapper:UriMapping
        Uri="/entity/{code}"
        MappedUri="/Views/EntityEditorPage.xaml?code={code}"/>
      <uriMapper:UriMapping
        Uri="/{pageName}"
        MappedUri="/Views/{pageName}Page.xaml"/>
    </uriMapper:UriMapper>
  </nav:Frame.UriMapper>
</nav:Frame>

the “/entity/123” is correctly mapping to “/Views/EntityEditorPage.xaml?code=123”
but “/Entity/123” will fail with the “/Views/Entity/123Page.xaml not found” exception.

How can I turn the UriMapper to case-insensitive?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:26:40+00:00Added an answer on May 16, 2026 at 12:26 am

    Safor,

    I did exactly what Anthony suggested for my own application.

    Here is your XAML modified to use a CustomUriMapper:

    <nav:Frame Source="/Home">
        <nav:Frame.UriMapper>
            <app:CustomUriMapper>
                <app:CustomUriMapping Uri="" MappedUri="/Views/HomePage.xaml"/>
                <app:CustomUriMapping Uri="/entity/{code}" MappedUri="/Views/EntityEditorPage.xaml?code={code}"/>
                <app:CustomUriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}Page.xaml"/>
            </app:CustomUriMapper>
        </nav:Frame.UriMapper>
    </nav:Frame>
    

    Here is the code for the CustomUriMapping and the CustomUriMapper classes:

    using System;
    using System.Collections.ObjectModel;
    using System.Windows.Markup;
    using System.Windows.Navigation;
    
    namespace YourApplication
    {
        // In XAML:
        // <app:CustomUriMapper>
        //     <app:CustomUriMapping Uri="/{search}" MappedUri="/Views/searchpage.xaml?searchfor={search}"/>
        // </app:CustomUriMapper>
    
        public class CustomUriMapping
        {
            public Uri Uri { get; set; }
            public Uri MappedUri { get; set; }
    
            public Uri MapUri(Uri uri)
            {
                // Do the uri mapping without regard to upper or lower case
                UriMapping _uriMapping = new UriMapping() { Uri = (Uri == null || string.IsNullOrEmpty(Uri.OriginalString) ? null : new Uri(Uri.OriginalString.ToLower(), UriKind.RelativeOrAbsolute)), MappedUri = MappedUri };
                return _uriMapping.MapUri(uri == null || string.IsNullOrEmpty(uri.OriginalString) ? null : new Uri(uri.OriginalString.ToLower(), UriKind.RelativeOrAbsolute));
            }
        }
    
        [ContentProperty("UriMappings")]
        public class CustomUriMapper : UriMapperBase
        {
            public ObservableCollection<CustomUriMapping> UriMappings { get { return m_UriMappings; } private set { m_UriMappings = value; } }
            private ObservableCollection<CustomUriMapping> m_UriMappings = new ObservableCollection<CustomUriMapping>();
    
            public override Uri MapUri(Uri uri)
            {
                if (m_UriMappings == null)
                    return uri;
    
                foreach (CustomUriMapping mapping in m_UriMappings)
                {
                    Uri mappedUri = mapping.MapUri(uri);
                    if (mappedUri != null)
                        return mappedUri;
                }
    
                return uri;
            }
        }
    }
    

    Good luck, Jim McCurdy

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

During navigation of the java.lang.reflect.Method class I came across the method isBridge . Its
The navigation on the left menu in the below site uses CSS for mouseover
We have a custom navigation webpart that uses the PortalSiteMapProvider of MOSS to build
I have a navigation view with a cell that has something as simple as
Im using a navigation controller and a normal view. In the view I'd like
Today I was working on a tab navigation for a webpage. I tried the
My site has quite a deep navigation structure and quite often it looks like
I'm trying to expand navigation options of the context menu on certain elements (specifically,
Are there any html helpers for page navigation. eg. if i have 1000 records
When creating a UIView with a navigation bar in interface builder, the top bar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.