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

A New problem/behavior

5 Answers 68 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
Ben Hayat
Top achievements
Rank 2
Ben Hayat asked on 25 Nov 2008, 04:43 AM
After solving the previous, now I can run the first link and it will open up the company page in the main frame with three of it's own link.

But, if I click on the main page another link, the page will go into this sub frame of the newly created page rather than the main frame.
Although I have a new NavService for the new sub frame, but the main NavService gets confused.

How do I get around t his problem?
Thanks!
..Ben

[Update]
I have created a test project to show this problem

5 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 26 Nov 2008, 11:49 AM
Hi Ben,

The NavigationService is a static class that is common for the whole application. If you want to navigate to page with different target all you need to do is just set the NavigationService.Transition.Target to the desired frame container, where you want to put the page. Anytime you want to navigate to different RadFrameContainet you have to set the target.

As for the test project you created I couldn't find it. Actually, you cannot attach files to the forums. You can, however, start a new support ticket and attach the files there.

All the best,
Boryana

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ben Hayat
Top achievements
Rank 2
answered on 26 Nov 2008, 02:44 PM
Hi Boryana;

I have followed your advice with changing the target when the user clicks on the links, so I'll make the appropriate target, however I still see a problem for the first time the target is switched and still does not respect  the new target.

I'm creating a support ticket with the title of "SL Navigation problem" and I'll address it to you with a test project to show the problem and I'll will provide steps to see the problem.

Please advise once you get it.
Thanks!
..Ben

[Update]
Send you a ticket. Your ticket ID is : 176606

0
Bobi
Telerik team
answered on 26 Nov 2008, 05:30 PM
Hi Ben,

I examined your test project and I have the following remarks:
  1. I noticed that you use UserControl instead of RadPage ( for example the Page class must be RadPage not UserControl).
  2. In order to have composite page navigation you have to set application RootVisual element to RadFrameContainer . For example you can write something like this:
        this.RootVisual = new RadFrameContainer();
                NavigationService service = NavigationService.GetNavigationService(this.RootVisual as RadFrameContainer);
            service.Navigate(new Page());
  3. If you want to set transition target you can use  for example:
        void hl_Home_Click(object sender, RoutedEventArgs e)
            {
                fadeTransition.Target = this.MainFrame;
                navService.Transition = fadeTransition;
                navService.Navigate(new Home());
            }
  4. In your test application I changed Page class to be RadPage and in all events I set for example fadeTransition.Target = this.MainFrame , remover navService.Transition.Target = this.MainFrame , then I made a test using the exact steps as you wrote in your letter. And now It seems to work as expected.

Please try my suggestions and if you still have a problem with page navigation I will send you the test project with the fixes.

All the best,

 

Boryana

 

the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ben Hayat
Top achievements
Rank 2
answered on 26 Nov 2008, 06:49 PM
Hi Boryana ;

I made the changes you suggested, however when I load the "Company" page that it's own sub frame with three links, and if do the same thing as previous page, I get the following error:
Object reference not set to an instance of an object.

In the test project, after you made the changes, did you try to load "About" or "Contact" to see what happens?
If everything worked fine, can you send me the modified project please?
Thanks!

[UPDATE]
I have uploaded the actual project with the changes you suggested as part of the support thicket. Please check!
0
Accepted
Valentin.Stoychev
Telerik team
answered on 26 Nov 2008, 08:57 PM
Hi ..Ben,

Lets continue the discusion of this issue in the support ticket only, so we can have all the info in sync.

Sincerely yours,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Navigation
Asked by
Ben Hayat
Top achievements
Rank 2
Answers by
Bobi
Telerik team
Ben Hayat
Top achievements
Rank 2
Valentin.Stoychev
Telerik team
Share this question
or