This is a migrated thread and some comments may be shown as answers.

NavigationService Transition

4 Answers 158 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
NS
Top achievements
Rank 1
NS asked on 16 Oct 2008, 09:29 AM
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

4 Answers, 1 is accepted

Sort by
0
NS
Top achievements
Rank 1
answered on 16 Oct 2008, 09:56 AM
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
0
Bobi
Telerik team
answered on 16 Oct 2008, 11:12 AM
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.
0
NS
Top achievements
Rank 1
answered on 16 Oct 2008, 11:48 AM
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
0
NS
Top achievements
Rank 1
answered on 16 Oct 2008, 03:15 PM
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 !
Tags
Navigation
Asked by
NS
Top achievements
Rank 1
Answers by
NS
Top achievements
Rank 1
Bobi
Telerik team
Share this question
or