none
How to navigate from one page to another page using ReactiveAsyncCommand

    Question

  • Hi experts..

      Is it possible to navigate the page using ReactiveAsyncCommand?

     Now i have use like this.

       
     private void button6_Click(object sender, RoutedEventArgs e)
    {
    NavigationService.Navigate(new Uri("/com/views/Page2.xaml", UriKind.Relative));
    }

    But now i want to use ReactiveAsyncCommand in my project. How to navigate from one page to another page using ReactiveAsyncCommand.

    Thanks in advance...

    Monday, February 3, 2014 6:57 AM

All replies

  • Are you talking about Reactive Extensions?

    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Monday, February 3, 2014 3:34 PM

  • public ReactiveAsyncCommand otherAccInfoButton { get; set; } otherAccInfoButton = new ReactiveAsyncCommand(); var otherAccResults = otherAccInfoButton.RegisterAsyncObservable(_ => { return HTTPServices.postAndGetResponse((new FedService().GetFed())); }); otherAccResults.Subscribe( x => { var rootFrame = (App.Current as App).RootFrame; rootFrame.Navigate(new Uri("/com/views/OtherAccountInfo.xaml", UriKind.Relative)); } );

    Hi Jeff Sanders.. Thanks for reply..

    Using of this code i have navigate from one page to another page. But i can only do navigate in the subscribe method. Here

    return HTTPServices.postAndGetResponse((new FedService().GetFed()));

    this is no needed for me. But when i delete this line it shows error. And i havetry to return null value also. It is also show error to me. 

    What my expectation is i just want to navigate the page. I don't want do any other operations. What i have to do??

    Thanks in advance..

    Tuesday, February 4, 2014 3:20 AM
  • I played with Reactive Extensions but not a lot of experience.  You can post your questions about that technology on the NuGet page you download it from.

    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Tuesday, February 4, 2014 4:24 PM
  • Ok Jeff Sanders.. Thanks for the reply..!! :-)
    Wednesday, February 5, 2014 5:06 AM
  • Hi.. I have found the solution for me. This may be very silly.. But this what i want..

            
      public ReactiveAsyncCommand LoginButton { get; set; }
    
                LoginButton = new ReactiveAsyncCommand();
                LoginButton.Subscribe(
                 x =>
                 {
                     var rootFrame = (App.Current as App).RootFrame;
                     rootFrame.Navigate(new Uri("/com/views/LoginPage.xaml", UriKind.Relative));
                 }
                );

    This is for just navigate the page. For example main page to Login page..

    Thanks to all..

    Monday, February 10, 2014 10:11 AM