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

  • Home
  • SEARCH
  • 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 8669127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:23:39+00:00 2026-06-12T18:23:39+00:00

Within a XAML user control, the Frame object is null: this.Frame.Navigate(typeof(FaxPropertiesPage)); How do I

  • 0

Within a XAML user control, the Frame object is null:

this.Frame.Navigate(typeof(FaxPropertiesPage));

How do I navigate between pages with a Windows 8 XAML User Control? I have placed the control within a Callisto Flyout on a XAML page.

The search button below must navigate the user to another XAML page.

enter image description here

  • 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-12T18:23:40+00:00Added an answer on June 12, 2026 at 6:23 pm

    There’s the nice way and the not-so-nice way:

    Both of them start with a navigation service:

    public interface INavigationService
    {
        bool CanGoBack { get; }
        void GoBack();
        void GoForward();
        bool Navigate<T>(object parameter = null);
        bool Navigate(Type source, object parameter = null);
        void ClearHistory();
        event EventHandler<NavigatingCancelEventArgs> Navigating;
    }
    
    public class NavigationService : INavigationService
    {
        private readonly Frame _frame;
    
        public NavigationService(Frame frame)
        {
            _frame = frame;
            frame.Navigating += FrameNavigating;
        }
    
        #region INavigationService Members
    
        public void GoBack()
        {
            _frame.GoBack();
        }
    
        public void GoForward()
        {
            _frame.GoForward();
        }
    
        public bool Navigate<T>(object parameter = null)
        {
            Type type = typeof (T);
    
            return Navigate(type, parameter);
        }
    

    So, where do I get the Frame? In App.xaml.cs

    protected async override void OnLaunched(LaunchActivatedEventArgs args)
    {
        // Do not repeat app initialization when already running, just ensure that
        // the window is active
        if (args.PreviousExecutionState == ApplicationExecutionState.Running)
        {
            Window.Current.Activate();
            return;
        }
    
        // Create a Frame to act as the navigation context and navigate to the first page
        var rootFrame = new Frame();
        if (DesignMode.DesignModeEnabled)
            SimpleIoc.Default.Register<INavigationService, DesignTimeNavigationService>();
        else
            SimpleIoc.Default.Register<INavigationService>(() => new NavigationService(rootFrame));
    

    I’m using MVVM Light here. This makes life easy because all my viewmodels get created using dependency injection and have their services injected into them.

    If you’re not using something like MVVM Light and rely on code-behind then you can still make this work: Just make the navigation service static

      public class NavigationService : INavigationService
        {
            public static INavigationService Current{
    get;set;}
    
    blah blah blah
    }
    

    And change App.xaml.cs to:

        protected async override void OnLaunched(LaunchActivatedEventArgs args)
        {
            // Do not repeat app initialization when already running, just ensure that
            // the window is active
            if (args.PreviousExecutionState == ApplicationExecutionState.Running)
            {
                Window.Current.Activate();
                return;
            }
    
            // Create a Frame to act as the navigation context and navigate to the first page
            var rootFrame = new Frame();
            NavigationService.Current= new NavigationService(rootFrame));
    }
    

    And you can then access your main Frame anywhere in the app by saying:

    NavigationService.Current.Navigate<MyView>();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight user control that has an Image control within it. This
I have a Silverlight 4 user control that calls a WCF service residing within
I have the following xaml which resides in a wpf user control - <Grid>
I am converting some Silverlight XAML into WPF. I currently have a user control
I have a Silverlight user control that has several canvas controls within a Stack
I have a user control where the XAML of the control can bind to
I have custom classes that I currently instantiate within App.xaml as resources. I want
Within my code I have list items like this; <div id=content> <ul class=kwicks> <li
I am trying to create a user control within a WPF application that will
I have a user control that has a grid (the one you get automatically

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.