■ Hyperlink 엘리먼트의 TargetName 속성을 사용하는 방법을 보여준다.
▶ BookList.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" FontFamily="나눔고딕코딩" FontSize="16"> <WrapPanel> <TextBlock Margin="12"> <Hyperlink NavigateUri="AliceInWonderland.xaml" TargetName="contentFrame"> <Italic>Alice's Adventures in Wonderland</Italic> by Lewis Carroll </Hyperlink> </TextBlock> <TextBlock Margin="12"> <Hyperlink NavigateUri="ThroughTheLookingGlass.xaml" TargetName="contentFrame"> <Italic>Through the Looking-Glass</Italic> by Lewis Carroll </Hyperlink> </TextBlock> </WrapPanel> </Page> |
▶ MainPage.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
<Page x:Class="TestProject.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="메인 페이지" FontFamily="나눔고딕코딩" FontSize="16"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="10*" /> <RowDefinition Height="Auto" /> <RowDefinition Height="90*" /> </Grid.RowDefinitions> <Frame Grid.Row="0" Source="DOCUMENT/BookList.xaml" /> <GridSplitter Grid.Row="1" Height="6" HorizontalAlignment="Stretch" VerticalAlignment="Center" /> <Grid Grid.Row="2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="25*" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="75*" /> </Grid.ColumnDefinitions> <Frame Name="contentFrame" Grid.Column="0" /> <GridSplitter Grid.Column="1" Width="6" HorizontalAlignment="Center" VerticalAlignment="Stretch" /> <Frame Name="chapterFrame" Grid.Column="2" /> </Grid> </Grid> </Page> |