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

Navigation issues. Need help.

9 Answers 115 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 2
Alexandre asked on 22 Apr 2009, 06:14 PM
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 :)

9 Answers, 1 is accepted

Sort by
0
Alexandre
Top achievements
Rank 2
answered on 22 Apr 2009, 06:57 PM
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?
0
Bobi
Telerik team
answered on 23 Apr 2009, 01:46 PM
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.
0
Alexandre
Top achievements
Rank 2
answered on 23 Apr 2009, 05:46 PM
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.
0
Bobi
Telerik team
answered on 24 Apr 2009, 12:14 PM
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.
0
Alexandre
Top achievements
Rank 2
answered on 26 Apr 2009, 07:26 AM
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.
0
Bobi
Telerik team
answered on 27 Apr 2009, 07:30 AM
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.
0
Dean
Top achievements
Rank 1
answered on 29 Apr 2009, 02:52 PM
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
0
Dean
Top achievements
Rank 1
answered on 29 Apr 2009, 03:17 PM
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
0
Alan Shaw
Top achievements
Rank 1
answered on 06 May 2009, 10:05 PM
The RootPanel property fixed it for me as well.
Tags
Navigation
Asked by
Alexandre
Top achievements
Rank 2
Answers by
Alexandre
Top achievements
Rank 2
Bobi
Telerik team
Dean
Top achievements
Rank 1
Alan Shaw
Top achievements
Rank 1
Share this question
or