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 3319136
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:47:21+00:00 2026-05-17T22:47:21+00:00

I have what amounts to a menu page in my Silverlight application. It has

  • 0

I have what amounts to a menu page in my Silverlight application. It has some HyperlinkButtons in a StackPanel. The hyperlinks are mapped to other page Uris in the app using a navigation frame with a UriMapper. It all appears within the LayoutRoot Grid of the menu page. I’d rather have the UriMapping be available to the entire application, which supposedly would mean it should be in App.xaml, but I can’t figure out how to put it there so it works. Any ideas? Here’s some code that resembles what I got:

<Grid x:Name="LayoutRoot">
    <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}">
        <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" Source="" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
             <navigation:Frame.UriMapper>
                 <uriMapper:UriMapper>
                     <uriMapper:UriMapping Uri="/AgencyTechnical" MappedUri="/Views/AgencyTechnical.xaml"/>
                     <uriMapper:UriMapping Uri="/AgencyBusiness" MappedUri="/Views/AgencyBusiness.xaml"/>
            ...
                 </uriMapper:UriMapper>
             </navigation:Frame.UriMapper>
         </navigation:Frame>
     </Border>

     <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" Margin="10,10,0,0" Width="640">
         <StackPanel Name="stackPanel1" Width="490" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0" Height="326">
             <TextBlock Text="Agency Screens" Name="AgencyScreenLabel" Style="{StaticResource MenuLabelStyle}" />
                <HyperlinkButton Name="AgencyTechInfoLink" Style="{StaticResource LinksMenuStyle}"
                    Content="Agency Technical Information" ... />
                <HyperlinkButton Name="AgencyTechInfoLink" Style="{StaticResource LinksMenuStyle}"
                    Content="Agency Technical Information" ... />

Again, how do I make this navigation frame available for the whole app? I.e in one place?


I’m Accepting @Gabriel McAdams’s answer, but I had to modify it slightly. I am using the template for Silverlight Navigation Page, and there’s a Resource Dictionary in App.xaml which, if gets interfered with if I add the mapping directly into the Application.Resources node. I find that I can add the mapping to the Styles.xaml and it works fine. I get a “The type ‘ResourceDictionary’ is inside a ResourceDictionary and does not have a key.” error if I do the following:

<Application.Resources>

   <... Uri mapping here />

   <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
         <ResourceDictionary Source="Assets/Styles.xaml"/>
      </ResourceDictionary.MergedDictionaries>
   </ResourceDictionary>

</Application.Resources>

But adding it to the Assets/Styles.xaml works great.

  • 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-17T22:47:21+00:00Added an answer on May 17, 2026 at 10:47 pm

    You can put it in the Application Resources, like this:

    This is your app.xaml file:

    <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        x:Class="YourSilverlightApplication.App"
        xmlns:nav="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    >
        <Application.Resources>
            <nav:UriMapper x:Key="uriMapper">
                <nav:UriMapping Uri="/AgencyTechnical" MappedUri="/Views/AgencyTechnical.xaml"/>
                <nav:UriMapping Uri="/AgencyBusiness" MappedUri="/Views/AgencyBusiness.xaml"/>
            </nav:UriMapper>
        </Application.Resources>
    </Application>
    

    This is your page (modified):

    <Grid x:Name="LayoutRoot">
        <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}">
            <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" Source="" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed" navigation:Frame.UriMapper="{StaticResource uriMapper}">
            </navigation:Frame>
         </Border>
    
         <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" Margin="10,10,0,0" Width="640">
             <StackPanel Name="stackPanel1" Width="490" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0" Height="326">
                 <TextBlock Text="Agency Screens" Name="AgencyScreenLabel" Style="{StaticResource MenuLabelStyle}" />
                    <HyperlinkButton Name="AgencyTechInfoLink" Style="{StaticResource LinksMenuStyle}"
                        Content="Agency Technical Information" ... />
                    <HyperlinkButton Name="AgencyTechInfoLink" Style="{StaticResource LinksMenuStyle}"
                        Content="Agency Technical Information" ... />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that outputs large amounts of text data to an MFC
I have a server application that needs to find and exchange small amounts of
I have a UITextField in my app that accepts decimal amounts for prices (i.e.,
I have a large Java app that uses massive amounts of memory at times
I have an ASP.NET application that renders a 3rd party (Telerik's) menu control under
I have a list in witch I have only money amounts (numbers), then I
We have a scheduling engine with large amounts of test data to test all
I have an element which may contain very big amounts of data, but I
I have a database which I regularly need to import large amounts of data
I have a form with a textarea that can contain large amounts of content

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.