UWP入门(二) -- 基础笔记
原文: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.

posted on 2017-09-21 08:33 NET未来之路 阅读(...) 评论(...) 编辑 收藏

转载于:https://www.cnblogs.com/lonelyxmas/p/7566659.html

UWP入门(二) -- 基础笔记相关推荐

  1. JavaSE入门0基础笔记 第二章Java基础语法

    JavaSE入门0基础笔记 第二章Java基础语法 1.运算符 1.1算术运算符 1.1.1运算符和表达式 1.1.2 算术运算符 1.1.3字符的"+"操作 1.1.4 字符串中 ...

  2. python语言入门z-python3基础笔记(一)

    1.就单个 python 文件来说在 python 中 python 的后缀可以是任意的.但如果这个 python 文件需要导入的时候如果不是 .py 会出错.所以一般情况下 python 文件的后缀 ...

  3. 黑马教程python入门之基础笔记day1/2

    程序错误排查:- 手误 理解欠缺 每行代码负责完成一个动作,一行不要出现多条语句 缩进错误 python2.0默认不支持中文,3.0版本支持中文 python3.0没有考虑向下兼容 注释 行注释:&q ...

  4. 小甲鱼python入门_python基础笔记(非系统/自用/参考小甲鱼的零基础入门学习python)上...

    ---恢复内容开始--- 1.原始字符串的使用,在字符串前加r就行(用于对\进行自动转译) >>>str = r'C:\now\wifr' 'C:\\now\\wifr' 但在字符串 ...

  5. AI Studio 飞桨 零基础入门深度学习笔记6.3-手写数字识别之数据处理

    AI Studio 飞桨 零基础入门深度学习笔记6.3-手写数字识别之数据处理) 概述 前提条件 读入数据并划分数据集 扩展阅读:为什么学术界的模型总在不断精进呢? 训练样本乱序.生成批次数据 校验数 ...

  6. AI Studio 飞桨 零基础入门深度学习笔记4-飞桨开源深度学习平台介绍

    AI Studio 飞桨 零基础入门深度学习笔记4-飞桨开源深度学习平台介绍 深度学习框架 深度学习框架优势 深度学习框架设计思路 飞桨开源深度学习平台 飞桨开源深度学习平台全景 框架和全流程工具 模 ...

  7. 前端-Vue.js从入门到精通基础笔记(理论+实操+知识点速查)

    #[2022.3]尚硅谷Vue.js从入门到精通基础笔记(理论+实操+知识点速查) 前言 本文完全基于 参考资料:加工整理而成,包括其代码,案例,资源等.前置知识是学习尚硅谷的视频教程,本文配合其教程 ...

  8. (Python入门)学习笔记二,Python学习路线图

    (Python入门)学习笔记二,Python学习路线图 千里之行始于足下,谋定而后动,冰冻三尺非一日之寒.之所以说这三句话,就是对于下面整理的路线图,即不让自己感觉路途的遥远而感到达到巅峰神界的遥遥无 ...

  9. AI Studio 飞桨 零基础入门深度学习笔记2-基于Python编写完成房价预测任务的神经网络模型

    AI Studio 飞桨 零基础入门深度学习笔记2-基于Python编写完成房价预测任务的神经网络模型 波士顿房价预测任务 线性回归模型 线性回归模型的神经网络结构 构建波士顿房价预测任务的神经网络模 ...

最新文章

  1. Nanopore sequencing technology and tools for genome assembly: computational analysis of the current
  2. Spring应用注解配置实现IOC
  3. cdr放大后内容消失了_放大镜+定时器+画笔,582KB软件就能做到,上网课的你一定能用上...
  4. 王者服务器维修2019年四月份,2019王者荣耀4周年庆版本更新时间介绍[图]
  5. hadoop2.4.1+hbase0.98.3实现的分布式网盘系统初步(已开源)
  6. Spring AOP 的proxy详解
  7. Apache Log4j2 RCE 命令执行漏洞预警及修复方案
  8. go语言连接redis(已测试)
  9. 前端学习(2326):angular之用户输入数据
  10. 改革以来计算机应用发展总结,计算机应用基础总结论文
  11. linux删除磁盘后刷新,linux – 短暂的文件是否刷新到磁盘?
  12. python协同过滤调用包_简单的python协同过滤程序实例代码
  13. Golang的演化历程
  14. win10需要开启系统打印机服务器,Win10系统开启和关闭打印机服务技巧
  15. cad卸载工具_装不上也卸不掉,我的CAD仿佛已没救!...(CAD/MAX完美安装工具)...
  16. qq实验报告c语言,C语言实现QQ密码大盗(没试验过,下回验证一下)
  17. qq等级计算机在线,I'M QQ - QQ官方网站
  18. Arduino 串口数据读写
  19. 个人防骗大全精选(1)
  20. 安卓和苹果对于https域名下的引用http域的文件

热门文章

  1. 76.数据库操纵语言DML 定义语言 DDL 控制语言DCL
  2. Labview 串口通信之——PC控制云台方向
  3. 代码注释规范-google版本
  4. android简单歌词,Yuan-LrcView
  5. Property ‘configuration‘ and ‘configLocation‘ can not specified with together
  6. 012_Spring Data Redis
  7. 076_html5事件属性
  8. 002_html发展史
  9. java json修改_java – 如何编辑,修改嵌套的JSONObject
  10. ios找不到信任证书_ios信任苹果企业级应用