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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:15:25+00:00 2026-06-10T16:15:25+00:00

I am trying to navigate to a page from a ScrollViewer control: <Button x:Name=btnViewMenu

  • 0

I am trying to navigate to a page from a ScrollViewer control:

  <Button x:Name="btnViewMenu" Content="View Menu" Click="btnViewMenu_Click" Margin="0,20,0,0" CommandParameter="{Binding}" Grid.Row="3" />

 private void btnViewMenu_Click(object sender, RoutedEventArgs e)
    {
        Button btn = (Button)sender;
        RestaurantLocation loc = btn.CommandParameter as RestaurantLocation;
        App.CurrentRestaurantLocation = loc;
        this.Frame.Navigate(typeof(SearchFormPage));
    }

On the search form page, I get this error:

_pageKey cannot be null:

    /// <summary>
    /// Invoked when this page will no longer be displayed in a Frame.
    /// </summary>
    /// <param name="e">Event data that describes how this page was reached.  The Parameter
    /// property provides the group to be displayed.</param>
    protected override void OnNavigatedFrom(NavigationEventArgs e)
    {
        var frameState = SuspensionManager.SessionStateForFrame(this.Frame);
        var pageState = new Dictionary<String, Object>();
        this.SaveState(pageState);
        frameState[_pageKey] = pageState;
    }

Am I navigating improperly? This only happens inside of a scrollviewer.

  • 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-06-10T16:15:26+00:00Added an answer on June 10, 2026 at 4:15 pm

    Thanks. I had to call the base method:

     protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            List<string> theResults = e.Parameter as List<string>;
            city = theResults[0];
            state = theResults[1];
            category = theResults[2];
            BindData();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to navigate from one page to another on a button click
I'm trying to navigate from Home page view to Account page view i.e from
From JQGrid , on Double Click I am trying to navigate the user to
i am trying to navigate on windows phone 7.1 from one page to another
I'm trying to navigate from the codebehind of a Silverlight page back to an
When trying to navigate from index.html page to purchase.html, this A Network error occurred
am trying to goto a page from main window by using I have put
I'm trying to retrofit a page to read from XML rather than the DOM,
I'm trying to set up an initial view for my application (introduction page) and
i'm trying to navigate the page tables for a process in linux. In a

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.