1:页面的扩展名为:.xaml文件类似于ASPX一样可以编写客户端显示内容和后台处理内容

一般的前台页面的形式为:

<Page
x:Class="MyFirstApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyFirstApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
<!-- 引用命名空间-->
xmlns:TabCtl="using:CustomControl"
<!-- 调用后台pageSizeChanged方法-->
SizeChanged="pageSizeChanged"
<!-- 设置页面背景颜色为白色-->
Background="White"> <!-- 上面工具栏-->
<Page.TopAppBar>
<AppBar x:Name="topBar" IsSticky="True" Style="{StaticResource TopBar}" Closed="ModeToolBar_Closed" Opened="topBar_Opened" >
<Grid x:Name="MenuGrid" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="71"/>
<ColumnDefinition MinWidth="615" Width="*" />
<ColumnDefinition Width="105>
</Grid.ColumnDefinitions>
<AppBarButton x:Name="tooltest1" Label="test1" Click="btntest_Click"></AppBarButton>
<AppBarButton x:Name="tooltest2" Grid.Column="2" Label="test2" IsEnabled="False"></AppBarButton>
</Grid>
</AppBar>
</Page.TopAppBar> <!-- 下面工具栏-->
<Page.BottomAppBar>
<AppBar x:Name="ModeToolBar" IsSticky="True" Style="{StaticResource BottomAppBar}" >
<Grid x:Name="EditGrid" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="53" />
<ColumnDefinition Width="105" />
</Grid.ColumnDefinitions>
<AppBarButton x:Name="tooltest3" Grid.Column="1" HorizontalAlignment="Center" Label="test3" ></AppBarButton>
<AppBarButton x:Name="tooltest4" Grid.Column="2" HorizontalAlignment="Center" Label="test4" ></AppBarButton>
</Grid>
</AppBar>
</Page.BottomAppBar>
</Page>

2:利用StaticResource引用样式的一般步骤
创建Styles文件夹,并在文件夹中创建Styles.xaml文件

删除Styles.xaml.cs文件

打开Styles.xaml文件,写入样式代码如下

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyFirstAppStyles">
<Style x:Key="TopBar" TargetType="AppBar">
<Setter Property="Height" Value="85"/>
<Setter Property="Background" Value="#CC222846"/>
</Style>

</ResourceDictionary>

在App.xaml配置关联文件

<Application
x:Class="MyFirstApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyFirstApp"> <!--关联Resources文件-->
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources> </Application>

windows PHONE 开发-入门程序构筑的更多相关文章

  1. Kinect for Windows SDK开发入门(一):开发环境配置

    [译]Kinect for Windows SDK开发入门(一):开发环境配置 前几天无意中看到微软发布了Kinect for windows sensor,进去看了一下Kinect应用的例子,发现K ...

  2. Kinect for Windows SDK开发入门(15):进阶指引 下

    Kinect for Windows SDK开发入门(十五):进阶指引 下 上一篇文章介绍了Kinect for Windows SDK进阶开发需要了解的一些内容,包括影像处理Coding4Fun K ...

  3. [MapReduce_add_1] Windows 下开发 MapReduce 程序部署到集群

    0. 说明  Windows 下开发 MapReduce 程序部署到集群 1. 前提 在本地开发的时候保证 resource 中包含以下配置文件,从集群的配置文件中拷贝 在 resource 中新建  ...

  4. gcc和MinGW的异同(在cygwin/gcc做的东西可以无缝的用在linux下,没有任何问题,是在windows下开发linux程序的一个很好的选择)

    cygwin/gcc和MinGW都是gcc在windows下的编译环境,但是它们有什么区别,在实际工作中如何选择这两种编译器. cygwin/gcc完全可以和在linux下的gcc化做等号,这个可以从 ...

  5. windows 驱动开发入门——驱动中的数据结构

    最近在学习驱动编程方面的内容,在这将自己的一些心得分享出来,供大家参考,与大家共同进步,本人学习驱动主要是通过两本书--<独钓寒江 windows安全编程> 和 <windows驱动 ...

  6. Windows驱动开发入门指引

       1.  前言 因工作上项目的需要,笔者需要做驱动相关的开发,之前并没有接触过相关的知识,折腾一段时间下来,功能如需实现了,也积累了一些经验和看法,所以在此做番总结. 对于驱动开发的开发指引,微软 ...

  7. [译]Kinect for Windows SDK开发入门(十八):Kinect Interaction交互控件

    本文译自 http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getti ...

  8. ESP-EYE V2.1 开发板 WINDOWS 10 开发入门

    准备工作 1 × ESP-EYE V2.1 开发板 1 × Micro USB B 电缆 1 × PC(Windows10) 简介 ESP-EYE 是一款面向人脸识别和语音识别市场的开发板,搭载 ES ...

  9. Windows平台开发Mapreduce程序远程调用运行在Hadoop集群—Yarn调度引擎异常

    共享原因:虽然用一篇博文写问题感觉有点奢侈,但是搜索百度,相关文章太少了,苦苦探寻日志才找到解决方案. 遇到问题:在windows平台上开发的mapreduce程序,运行迟迟没有结果. Mapredu ...

随机推荐

  1. Model Validation in ASP.NET Web API By Mike Wasson|July 20, 2012 268 of 294 people found this helpful

    using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using ...

  2. 【皇甫】☀初识AOP

    新知识,新起点,下面介绍一下aop所要准备架包和各个层 特点: 创建好的各个层: 所需架包: 具体步骤: No.1  搭建分层架构 entity 1 public class User impleme ...

  3. python staticmethod and classmethod方法

    静态方法无绑定,和普通函数使用方法一样,只是需要通过类或者实例来调用.没有隐性参数. 实例方法针对的是实例,类方法针对的是类,他们都可以继承和重新定义,而静态方法则不能继承,可以认为是全局函数. #h ...

  4. CentOS7安装MariaDB10.1.14

    1.下载MariaDB 下载地址:https://downloads.mariadb.org/mariadb/10.1.14/ 这里选择mariadb-10.1.14-linux-x86_64.tar ...

  5. linux下使用远程图形界面

    1. 用xrdp的方式(客户端就是windows下的远程桌面程序) http://jingyan.baidu.com/article/d3b74d64bdab5d1f76e60951.html 2. ...

  6. GridView的高度自适应

    接着上面一篇文章. 当GridView不知道parent高度的时候,也就是MeasureSpec是UNSPECIFIED,这个时候,GridView高度为第一个child的高度,并显示滚动条. mIt ...

  7. JVM内存管理

    前几天公司的郑大晔校上,XXX同事做了JVM的Session,于是趁端午节放假的功夫,研究了一些JVM相关的知识. 在Java生态系统中,JVM占据至关重要的作用,就像一个适配器,它向编程语言(主要是 ...

  8. DragRow-GYF

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DragRowDemo.as ...

  9. 简单介绍MR21和MR22

    MR21和MR22都可以用来调整价格,MR21是更改的单个物料的价格,MR22更改的是库存总价值,所以MR21可以更改移动平均价(V)或标准价(S)的物料价格.MR22只能更改移动平均价(V)的物料价 ...

  10. mysql 日志表rename 备份

    1. 按照原历史表新增一个新表(空表): mysql> create table history_log_new ...; 2. 给历史表重命名,并将新表重命名为历史表: mysql> R ...