Navigation issues. Need help.

10 posts, 0 answers
  1. arobadol
    arobadol avatar
    10 posts
    Member since:
    Jun 2006

    Posted 22 Apr 2009 Link to this post

    Dear all,

    I'm trying to have the RadNavigation working but unfortunatelly I cannot. I'm running the Silverlight Beta3 with telerik's latest build.

    Here is the description of my problem.

    On my App.xaml and code behind I have almost the same as the Books sample. I have commented out the different url history events.

    I manage to have the MainPage.xaml loaded by using the navigationservice.Navigate(new MainPage()) method.

    by the way It loads the MainPage by default even if I do not call this method. I tried renaming the page DummyPage and to load it then it worked...

    My problem start here.

    On the MainPage.xaml I have a RadFrameContainer and a RadFrame

    <StackPanel>
    <Button x:Name="btnTest" Click="btnTest_Click" Content="Test"/>
    <Controls:RadFrameContainer x:Name="MainFrameContainer">
    <Controls:RadFrame x:Name="MainFrame"/>
    </Controls:RadFrameContainer>
    </StackPanel>

    On the btnTest_click event method I have the following code

    private void btnTest_Click(object sender, System.Windows.RoutedEventArgs e)
    {
         this.MainFrame.Navigate(new Page1());
    }

    Page1 is a simple usercontrol inheriting from RadPage with just a Red Background and a text block.

    No matter what I do. the event is called when I click on the button. The this.mainframe.Navigate is called as well, but my MainFrame stay sadly blank. Nothing get's displayed!!! i do not get any error or nothing. It just stay blank...

    Any idea where I should start from?

    Any help will be apreciated :)

  2. arobadol
    arobadol avatar
    10 posts
    Member since:
    Jun 2006

    Posted 22 Apr 2009 Link to this post

    I found the source of the problem.

    The RadFrameContainer is included in other controls. Like this for exemple:

    <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="50"/>
                </Grid.RowDefinitions>
                <Border Grid.Row="1">
                    <StackPanel>
                        <Button x:Name="btnPage1" Click="btnPage1_Click" Content="Page1"/>
                        <Button x:Name="btnPage2" Click="btnPage2_Click" Content="Page2"/>
                        <Controls:RadFrameContainer>
                            <Controls:RadFrame x:Name="frame"/>
                        </Controls:RadFrameContainer>
                    </StackPanel>
                </Border>
            </Grid>

    and then nothing work anymore...

    Is there any limitation on encapsulating the RadFrameContainer?
  3. DevCraft banner
  4. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 23 Apr 2009 Link to this post

    Hi Alexandre,

    The only limitation connected with RadFrameContainer is that you can use only one RadFrameContainer per page. If this does not solve your problem please send me sample code or explain in more details the structure of your application so that I can investigate.

    All the best,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. arobadol
    arobadol avatar
    10 posts
    Member since:
    Jun 2006

    Posted 23 Apr 2009 Link to this post

    Thanks for your reply,

    I manage to have it working on a sample web site by reducing at maximum the number of Grid Deep.

    I had on my Mainpage 4 <Grid> included in each others and the Frame container was on the grand child of the root grid.

    Nothing was displaying.

    After changing to one Grid with a complex Column and row definition I manage to have it working... there must me something wrong there.

    Hope this help for identifying the problem. I can send a sample that fail and one work if needed.

    Alex.
  6. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 24 Apr 2009 Link to this post

    Hello arobadol,

    Try to use NavigationService instead of RadFrame and make sure that the target property is set correctly.
    If this still does not solve your problem can ypu please send some sample code?

    Sincerely yours,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. arobadol
    arobadol avatar
    10 posts
    Member since:
    Jun 2006

    Posted 26 Apr 2009 Link to this post

    Thanks for the response.

    I did not manage to have it working with a complex heirarchy on my XAML.
    There is no error but the frame just does not display anything.

    If I move the Framecontainer to a higher level in the XAML Hierarchy then it shows properly.

    I'm wondering if it is not something linked to size and visibility... But It is strange...

    Thanks for your help anyway.

    I'm now facing another issue but I will start a new thread for this.
  8. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 27 Apr 2009 Link to this post

    Hello arobadol,

    I am glad that now RadNavigation is working properly in your application.We will continue to investigate the issue and try to find the best way to resolve it.

    Kind regards,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Dean
    Dean avatar
    15 posts
    Member since:
    Mar 2009

    Posted 29 Apr 2009 Link to this post

    Having the same problems

    RadFrame (inside a RadFrameContainer) doesnt work when inside a RabTabItem (no navigation errors, and doesnt show up + constructor on target navigation page is never called)

    Also, when promoted to the only child of LayoutRoot, it only works when the Source parameter is set in XAML, but not when you use the following syntax in code-behind

    frame.Navigate(new Page2()) 

    Dean
  10. Dean
    Dean avatar
    15 posts
    Member since:
    Mar 2009

    Posted 29 Apr 2009 Link to this post

    I've managed to find a workaround

    If I set the NavigationService instance's 'RootPanel' property to my RadFrameContainer, and then exclusively use the NavigationService.Navigate method, it works.

    It seem that the Navigate method in the actual RadFrame is very flaky

    Dean
  11. Alan Shaw
    Alan Shaw avatar
    2 posts
    Member since:
    Apr 2007

    Posted 06 May 2009 Link to this post

    The RootPanel property fixed it for me as well.
Back to Top
DevCraft banner