NavigationService Transition

5 posts, 0 answers
  1. NS
    NS avatar
    179 posts
    Member since:
    Jan 2007

    Posted 16 Oct 2008 Link to this post

    Hi,
    I have a problem trying to use the Transition Property on a navigation service.

    If I click on a RadMenuItem, I execute the following code:
     service = NavigationService.GetNavigationService(ContentPanel);  
                service.Transition = new FadeTransition(ContentPanel, new TimeSpan(0, 0, 2));  
                service.Dispose();  
                service.FrameHistory.Clear();  
                service.Navigate(new ADSearch()); 

    Problem is that the Transition effect is not shown. I think this is because the service object only gets filled after I click on the menuitem. Until then the transition effect is Default. Setting the transition effect on menuitem_click is probably too late ?

    The Telerik demo site "First Look" on PageNavigation also sets the transition after something is changed in the transition effect combobox.

    So my question is: how can you initially set a transition effect that is different than the Default one.

    Thanks,
    Nicolas
  2. NS
    NS avatar
    179 posts
    Member since:
    Jan 2007

    Posted 16 Oct 2008 Link to this post

    For a moment I thought that the reason was that I set the transition before the dispose call.

    Placing it after the dispose call still doesn't solve it for me.

    Nicolas
  3. DevCraft banner
  4. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 16 Oct 2008 Link to this post

    Hi there,

    You can set the Transition property whenever you want.

    As for RaPageNavigation`s "First Look" example:

    void FirstLook_Loaded(object sender, RoutedEventArgs e)
            {
                service = NavigationService.GetNavigationService(this.contentPanel);
                service.Dispose();
                service.FrameHistory.Clear();
                service.Transition = new FadeTransition(this.contentPanel, new TimeSpan(0, 0, 2));
                service.Navigate("Page1");
                service.Navigate("Page2");
            }

    You can initially set a transition effect that is different than the default one using:
      service.Transition = new FadeTransition(this.contentPanel, new TimeSpan(0, 0, 2));
      service.Transition = new SlideTransition(this.contentPanel, new TimeSpan(0, 0, 2));

    NOTE: If  the target panel is empty then the first time you put a page into the panel, the page will be shown using the DefaultTransition. If you  navigate to another page in the same panel, you will be able to see the Fade/Slide effect.

    Try this example and you will see the Fade effect when navigating to Page2.

     
    Regards,
    Boryana
    Telerik Silverlight Team


    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. NS
    NS avatar
    179 posts
    Member since:
    Jan 2007

    Posted 16 Oct 2008 Link to this post

    Hi,
    This still doesn't work in my project.
    I filled in a support ticket: 168019

    There is a demo project attached that simulates the problem.

    Thanks,
    Nicolas
  6. NS
    NS avatar
    179 posts
    Member since:
    Jan 2007

    Posted 16 Oct 2008 Link to this post

    Never mind, found the solution :)

    I did some changes and now the pagenavigation works perfectly in my application. This is a control with a great added value !
Back to Top
DevCraft banner