1.7 互聯網應用程序
在WPF中創建互聯網應用程序和創建桌面程序是一樣的。在桌面應用程序里,XAML的頂層元素為Window,在互聯網應用程序里,XAML的頂層元素為Page。例如下面的網頁:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Page1"> <Grid> <Label Height="28" Margin="80,108,100,0" Name="label1" VerticalAlignment="Top">Hello WPF!</Label> </Grid> </Page>
該網頁在IE 7中的顯示結果如圖1-5所示。

圖1-5 IE 7中顯示的WPF網頁
推薦閱讀
- 自動控制工程設計入門
- 西門子PLC與InTouch綜合應用
- Hands-On Machine Learning on Google Cloud Platform
- 大數據時代的數據挖掘
- 基于ARM 32位高速嵌入式微控制器
- 控制系統計算機仿真
- Statistics for Data Science
- 在實戰中成長:Windows Forms開發之路
- INSTANT Heat Maps in R:How-to
- 21天學通Linux嵌入式開發
- Mastering OpenStack(Second Edition)
- 數據要素:全球經濟社會發展的新動力
- 數字多媒體技術基礎
- Raspberry Pi Projects for Kids
- Moodle 2.0 Course Conversion(Second Edition)