views:

32

answers:

1

Hi All,

I want to display the pages in the frame by using the hyperlink control. but it is not working.

Code:

<Window x:Class="WPFNavigation.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="400" Width="500">
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition></ColumnDefinition>
        <ColumnDefinition></ColumnDefinition>
    </Grid.ColumnDefinitions>

    <StackPanel Grid.Column="0">
        <TextBlock>
            <Hyperlink  NavigateUri="ImagePage.xaml">Image</Hyperlink>
            <LineBreak></LineBreak>
            <Hyperlink  NavigateUri="Layouts.xaml" TargetName="targetFrame">Layouts</Hyperlink>
        </TextBlock>
    </StackPanel>

    <Frame Name="targetFrame" Source="MainPage.xaml" Grid.Column="1"></Frame>
</Grid>
</Window>
A: 

Hi,

Apparently you will have to create a page instead of a window for that to work.

decyclone