검색결과 리스트
글
XBAPs는 XAML Browser Applications를 말한다. 이것은 웹 App와 윈도우 App 의 장점을 조합하여 새로운 App 구현을 하게 만든 것이다.
프로젝트를 만들 때 먼저 WPF 브라우저 응용 프로그램을 선택하여 프로젝트를 생성합니다.
다음으로 프로젝트에서 페이지를 추가하여 기본 작업을 구성 해 둡니다.
그리고 Image 폴더를 생성하여 임의의 그림 파일 3장을 설정 합니다.
다음에 각각 아래와 같은 코드들을 작성합니다. 코드를 작성하기 앞서 간단히 이야기 하자면
Window가 아닌 Page 로 작성되어 화면이 전환 되는 것을 확인 할 수가 있습니다.
Page1.XAML
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="Test1" FontSize="20" HorizontalAlignment="Center" Grid.Row="0"/>
<Image Grid.Row="1" Name="img1" Stretch="Fill" Source = "/WpfBrowserApplication1;component/Image/Tulips.jpg"/>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center">
<Hyperlink NavigateUri="Page2.xaml"><TextBlock Text="Next->>"/></Hyperlink>
</TextBlock>
Page2.XAML
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="Test2" FontSize="20" HorizontalAlignment="Center" Grid.Row="0"/>
<Image Grid.Row="1" Name="img2" Stretch="Fill" Source = "/WpfBrowserApplication1;component/Image/Lighthouse.jpg"/>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center">
<Hyperlink NavigateUri="Page1.xaml"><TextBlock Text="<Back"/></Hyperlink>
<Hyperlink NavigateUri="Page3.xaml"><TextBlock Text="Next>"/></Hyperlink>
</TextBlock>
Page3.XAML
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="Test3" FontSize="20" HorizontalAlignment="Center" Grid.Row="0"/>
<Image Grid.Row="1" Name="img3" Stretch="Fill" Source = "/WpfBrowserApplication1;component/Image/Hydrangeas.jpg"/>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center">
<Hyperlink NavigateUri="Page2.xaml"><TextBlock Text="<Back"/></Hyperlink>
</TextBlock>
프로젝트를 만들 때 먼저 WPF 브라우저 응용 프로그램을 선택하여 프로젝트를 생성합니다.
다음으로 프로젝트에서 페이지를 추가하여 기본 작업을 구성 해 둡니다.
그리고 Image 폴더를 생성하여 임의의 그림 파일 3장을 설정 합니다.
다음에 각각 아래와 같은 코드들을 작성합니다. 코드를 작성하기 앞서 간단히 이야기 하자면
Window가 아닌 Page 로 작성되어 화면이 전환 되는 것을 확인 할 수가 있습니다.
Page1.XAML
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="Test1" FontSize="20" HorizontalAlignment="Center" Grid.Row="0"/>
<Image Grid.Row="1" Name="img1" Stretch="Fill" Source = "/WpfBrowserApplication1;component/Image/Tulips.jpg"/>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center">
<Hyperlink NavigateUri="Page2.xaml"><TextBlock Text="Next->>"/></Hyperlink>
</TextBlock>
Page2.XAML
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="Test2" FontSize="20" HorizontalAlignment="Center" Grid.Row="0"/>
<Image Grid.Row="1" Name="img2" Stretch="Fill" Source = "/WpfBrowserApplication1;component/Image/Lighthouse.jpg"/>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center">
<Hyperlink NavigateUri="Page1.xaml"><TextBlock Text="<Back"/></Hyperlink>
<Hyperlink NavigateUri="Page3.xaml"><TextBlock Text="Next>"/></Hyperlink>
</TextBlock>
Page3.XAML
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="Test3" FontSize="20" HorizontalAlignment="Center" Grid.Row="0"/>
<Image Grid.Row="1" Name="img3" Stretch="Fill" Source = "/WpfBrowserApplication1;component/Image/Hydrangeas.jpg"/>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center">
<Hyperlink NavigateUri="Page2.xaml"><TextBlock Text="<Back"/></Hyperlink>
</TextBlock>
RECENT COMMENT