0

I have to create wpf browser application.It have 2 frames:

<DockPanel>
        <Frame Name ="MenuFrame" Source="Menu1.xaml" Height="Auto" Width="150" NavigationUIVisibility="Hidden" BorderBrush="#35000000" BorderThickness="1">
        </Frame>
        <ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
            <Frame Name ="ContentFrame" Source="Content.xaml"  HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" NavigationUIVisibility="Hidden" BorderBrush="#35000000" BorderThickness="2" VerticalAlignment="Stretch">
            </Frame>
        </ScrollViewer>
</DockPanel>

I succeeded to navigate from Page to page in Content Frame through pushing on button in Content Frame.

NavigationService nav = NavigationService.GetNavigationService(this);
nav.Navigate(new Uri("/Controls/Page1.xaml", UriKind.RelativeOrAbsolute));)

How can I do the same behavior but from outside frame, Menu Frame. I want to have a hyperlink in first frame, Menu Frame, and to navigate pages in second frame (Content Frame).

stsur
  • 206
  • 2
  • 9
stefan
  • 1
  • 2

1 Answers1

0

You can simply call the navigate on the frame itself, like so:

ContentFrame.Navigate(new Uri("/Controls/Page1.xaml", UriKind.RelativeOrAbsolute));)
Wouter Schut
  • 907
  • 2
  • 10
  • 22