zoukankan      html  css  js  c++  java
  • 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="Assetslackground1.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康

  • 相关阅读:
    杂七杂八的文档资料。
    图片(img标签)的onerror事件
    html的a标签的 href 和 onclick。
    【mysql】一次有意思的数据库查询分析。
    书籍:Building Secure PHP Apps
    js关闭当前页面/关闭当前窗口
    【汉字乱码】IE下GET形式传递汉字。
    弹出层展示插件。
    原型图设计工具。
    LeetCode(24): 两两交换链表中的节点
  • 原文地址:https://www.cnblogs.com/kangma/p/3935910.html
Copyright © 2011-2022 走看看