原文:UWP入门(二) -- 基础笔记

不错的UWP入门视频,1092417123,欢迎交流

UWP-04 - What i XMAL?

XAML - XML Syntax(语法) ,create instance of Classes that define the UI by setting properties(属性).

UWP-05 - Understanding Type Converters

Type Converters - Convert literal(字面的) strings in XML into enumerations,instance of classes,etc

UWP-06 - Understanding Default Properties, Complex Properties and the Property Element Syntax

Default Property … Ex. setrs Content Property:Click Me(this property is Content)

Complex Properties - Break out a property into its own element syntax:

    <Button Name="ClickMeButton"
HorizontalAlignment="Left"
Content="Click Me"
Margin="20,20,0,0"
VerticalAlignment="Top"
Click="ClickMeButton_Click"
Width="200"
Height="100"
>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="Red" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
</Button>

UWP-07 - Understanding XAML Schemas and Namespace Declarations

Schema stuff(语法约束,最上面那一块),is part of XAML,the number is 6.

Schemas define rules for XAML,for UWP,for desinger support,etc.

Namespaces tell XML parser where to find the definition/rules for a given element in the XAML.

UWP-08 - XAML Layout with Grids

Layout controls don’t have a content property …

they hava a Children property of type UIElementCollection.

By embedding any control inside of a layout control,

you are implicitly calling the Add method of the Children collection property.

eg:Grid.Children.Add(MyButton);

<Grid Background="Black">
<Grid.RowDefinitions>
<RowDefinition Height="*" />//pertcentage,eg:android:layout_weight
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
</Grid>

Sizes expressed in terms of:

Explicit pixels - 100//use pixels

Auto - use the largest value of elements it contains to define the width / height

* (Star Sizing) - Utilize all the available space

1* - Of all available space, give me 1 “share”

2* - Of all available space, give me 2 “shares”

3* - Of all available space, give me 3 “shares”

6 total shares … 3* would be 50% of the available width / height.

Elements put themselves into rows and columns using attached property syntax:



  <Button Grid.Row="0" />
</Grid>
  • When referencing Rows and Columns … 0-based.
  • There’s always one default implicit cell: Row 0, Column 0
  • If not specified, element will be in the default cell

UWP-09 - XAML Layout with StackPanel

<StackPanel>
<TextBlock>Top</TextBlock>
<TextBlock>Bottom</TextBlock>
</StackPanel>
  • Vertical Orientation by default.
  • Left-to-right flow by default when Horizontal orientation.
  • Most layouts will combine multiple layout controls.
  • Grid will overlap controls. StackPanel will stack them.

UWP入门(二) -- 基础笔记的更多相关文章

  1. git 入门二 (基础)

     1.创建新仓库      git init    touch  test.txt  git add --a  git commit -m "fist commit"    初始化 ...

  2. C#线程学习笔记九:async & await入门二

    一.异步方法返回类型 只能返回3种类型(void.Task和Task<T>). 1.1.void返回类型:调用方法执行异步方法,但又不需要做进一步的交互. class Program { ...

  3. CG基础教程-陈惟老师十二讲笔记

    转自 麽洋TinyOcean:http://www.douban.com/people/Tinyocean/notes?start=50&type=note 因为看了陈惟十二讲视频没有课件,边 ...

  4. JavaScript基础笔记二

    一.函数返回值1.什么是函数返回值    函数的执行结果2. 可以没有return // 没有return或者return后面为空则会返回undefined3.一个函数应该只返回一种类型的值 二.可变 ...

  5. Swift语法基础入门二(数组, 字典, 字符串)

    Swift语法基础入门二(数组, 字典, 字符串) 数组(有序数据的集) *格式 : [] / Int / Array() let 不可变数组 var 可变数组 注意: 不需要改变集合的时候创建不可变 ...

  6. Qt入门之基础篇 ( 二 ) :Qt项目建立、编译、运行和发布过程解析

    转载请注明出处:CN_Simo. 题解: 本篇内容主讲Qt应用从创建到发布的整个过程,旨在帮助读者能够快速走进Qt的世界. 本来计划是讲解Qt源码静态编译,如此的话读者可能并不能清楚地知道为何要静态编 ...

  7. IM开发者的零基础通信技术入门(二):通信交换技术的百年发展史(下)

    1.系列文章引言 1.1 适合谁来阅读? 本系列文章尽量使用最浅显易懂的文字.图片来组织内容,力求通信技术零基础的人群也能看懂.但个人建议,至少稍微了解过网络通信方面的知识后再看,会更有收获.如果您大 ...

  8. 2.Python爬虫入门二之爬虫基础了解

    1.什么是爬虫 爬虫,即网络爬虫,大家可以理解为在网络上爬行的一直蜘蛛,互联网就比作一张大网,而爬虫便是在这张网上爬来爬去的蜘蛛咯,如果它遇到资源,那么它就会抓取下来.想抓取什么?这个由你来控制它咯. ...

  9. Python爬虫入门二之爬虫基础了解

    1.什么是爬虫 爬虫,即网络爬虫,大家可以理解为在网络上爬行的一直蜘蛛,互联网就比作一张大网,而爬虫便是在这张网上爬来爬去的蜘蛛咯,如果它遇到资源,那么它就会抓取下来.想抓取什么?这个由你来控制它咯. ...

随机推荐

  1. Ubuntu-Docker[1]安装Docker,通过Docker部署net core代码,需要结合[.NET Core 18]发布、ASP.NET Core Docker部署

    1)通过系统自带包安装 通过自带包安装,可能Docker版本较旧 $ sudo apt-get update Reading package lists... Done $ sudo apt-get ...

  2. 支付宝开发之手机网站支付(H5支付)

    其实官方的文档中:https://docs.open.alipay.com/203 介绍的已经很详细了,我就实地的看文档操作了一遍,具体步骤如下: 一.创建应用 流程如下: 首先要有支付宝开放平台: ...

  3. Eclipse 一直不停 building workspace... 完美解决总结

    Eclipse 一直不停 building workspace... 一.产生这个问题的原因多种 1.自动升级 2.未正确关闭  3.maven下载lib挂起 等..二.解决总结 (1).解决方法  ...

  4. SharePoint Permission Analyzer 权限分析仪

    SharePoint Permission Analyzer 权限分析仪         这是一个很好的应用,为了分析SharePoint权限.它会扫描整个网站集,建一个站点的权限架构.       ...

  5. 【hdu2457】ac自动机 + dp

    传送门 题目大意: 给你一个字符主串和很多病毒串,要求更改最少的字符使得没有一个病毒串是主串的子串. 题解: ac自动机 + dp,用病毒串建好ac自动机,有毒的末尾flag置为true 构建fail ...

  6. 【BZOJ 1033】 [ZJOI2008]杀蚂蚁antbuster(判断线段是否和圆相交)

    [题目链接]:http://www.lydsy.com/JudgeOnline/problem.php?id=1033 [题意] https://www.zybuluo.com/Jerusalem/n ...

  7. 【codeforces 791B】Bear and Friendship Condition

    [题目链接]:http://codeforces.com/contest/791/problem/B [题意] 给你m对朋友关系; 如果x-y是朋友,y-z是朋友 要求x-z也是朋友. 问你所给的图是 ...

  8. scala map的常用操作

    package cn.scala_base /** * map常用操作 */ object Map { def main(args: Array[String]): Unit = { //1.不可变m ...

  9. R 语言文件读写

    1. working directory:工作目录 > getwd() > setwd("C:/data") # 设定当前工作目录 2. 读取格式化的 table &g ...

  10. Linux经常使用的命令(两) - cd

    Linux cd 命令能够说是Linux中最主要的命令语句,其它的命令语句要进行操作,都是建立在使用 cd 命令上的.所以,学习Linux 经常使用命令.首先就要学好 cd 命令的用法技巧. 1. 命 ...