windows phone应用开发尝试

这个应用,其实也算不上应用,是自己第一次真正尝试编写的程序,全程用XAML编写,由于之前学C#时过于急功近利,现在C#已经忘光了,废话不多说,下面开始介绍;

UI如下:

这个应用其实就是通过HyperlinkButtonl控件来调取一些微软常用应用的网页版,主要控件是Grid、HyerlinkButton还有Flyout,因此,这个应用基本不具有任何实用性,唯一的作用就是练练手。这一应用,有一模块为『尚未开发中....』,点击Setting也会弹出如下信息,显然应用并不完整

没办法,目前能力有限,只好如此。因为博主也是刚刚接触到WP开发,几乎什么都不会,深感windowsphone开发的教程稀缺。博主也经常在MSDN和博客园里找教程,自己摸索出来这一点东西,和大家分享交流,希望能共同进步。我微博账号@马and康,有兴趣的朋友可以互粉,一起交流。

代码如下:

XAML代码;

<Page
    x:Class="App1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid >
        <Grid.Background >
            <ImageBrush ImageSource="Assets\blackground1.jpg" AlignmentY="Bottom" AlignmentX="Left"/>
        </Grid.Background>
        <Grid Margin="0,150,0,200" >
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <HyperlinkButton Content="必应bing" Background="Red" Grid.Row="0" Margin="0,0,0,0" Width="190" Height="132" NavigateUri="http://cn.bing.com/"/>
            <HyperlinkButton Content="尚未开发中......" FontSize="25" Background="Red"  Grid.Row="1" Margin="0,0,0,0" Width="190" Height="132"/>
            <HyperlinkButton  Content="App store" Background="Red"  Grid.Column="1" Margin="0,0,0,0" Width="190" Height="132" NavigateUri="http://www.windowsphone.com/zh-cn/store"/>
            <Grid Grid.Row="1" Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions >
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <HyperlinkButton Content="onedrive" FontSize="20" Background="Blue"  Grid.Row="0" Margin="0,0,0,0" Width="95" Height="60" NavigateUri="https://skydrive.live.com/"/>
                <HyperlinkButton Content="Hotmail" FontSize="20" Background="Green"  Grid.Row="1" Height="60" Margin="0,0,0,0" Width="95" NavigateUri="http://www.hotmail.com "/>
                <HyperlinkButton Content="admin" FontSize="20" Background="Green"  Grid.Column="1" Height="60" Width="95" Margin="0,0,0,0" NavigateUri="http://login.live.com/"/>
                <Button Content="setting" FontSize="20"     Grid.Column="1" Background="Blue"   Grid.Row="1" Height="79" Width="27" Margin="0,-3.5,0,-3" BorderThickness="0">
                    <Button.Flyout >
                        <Flyout >
                            <StackPanel Margin="0,0,3,0" ManipulationMode="None" >
                                <TextBlock Text="此模块正在开发中....." FontSize="18"/>
                                <TextBlock Text="This section is under construction....." FontSize="15"/>
                            </StackPanel>
                        </Flyout>
                    </Button.Flyout>
                </Button>
            </Grid>
        </Grid>
    </Grid>
</Page>

至于C#代码就不提供了,因为这一应用没用到C#代码,

微博@马and康

posted @ 2014-08-25 21:37  马and康  阅读(969)  评论(9编辑  收藏  举报