A New problem/behavior

6 posts, 1 answers
  1. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 24 Nov 2008 Link to this post

    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
  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 26 Nov 2008 Link to this post

    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.
  3. DevCraft banner
  4. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 26 Nov 2008 Link to this post

    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

  5. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 26 Nov 2008 Link to this post

    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.
  6. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 26 Nov 2008 Link to this post

    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!
  7. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 26 Nov 2008 Link to this post

    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.
Back to Top
DevCraft banner