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入门(二) -- 基础笔记的更多相关文章
- git 入门二 (基础)
1.创建新仓库 git init touch test.txt git add --a git commit -m "fist commit" 初始化 ...
- C#线程学习笔记九:async & await入门二
一.异步方法返回类型 只能返回3种类型(void.Task和Task<T>). 1.1.void返回类型:调用方法执行异步方法,但又不需要做进一步的交互. class Program { ...
- CG基础教程-陈惟老师十二讲笔记
转自 麽洋TinyOcean:http://www.douban.com/people/Tinyocean/notes?start=50&type=note 因为看了陈惟十二讲视频没有课件,边 ...
- JavaScript基础笔记二
一.函数返回值1.什么是函数返回值 函数的执行结果2. 可以没有return // 没有return或者return后面为空则会返回undefined3.一个函数应该只返回一种类型的值 二.可变 ...
- Swift语法基础入门二(数组, 字典, 字符串)
Swift语法基础入门二(数组, 字典, 字符串) 数组(有序数据的集) *格式 : [] / Int / Array() let 不可变数组 var 可变数组 注意: 不需要改变集合的时候创建不可变 ...
- Qt入门之基础篇 ( 二 ) :Qt项目建立、编译、运行和发布过程解析
转载请注明出处:CN_Simo. 题解: 本篇内容主讲Qt应用从创建到发布的整个过程,旨在帮助读者能够快速走进Qt的世界. 本来计划是讲解Qt源码静态编译,如此的话读者可能并不能清楚地知道为何要静态编 ...
- IM开发者的零基础通信技术入门(二):通信交换技术的百年发展史(下)
1.系列文章引言 1.1 适合谁来阅读? 本系列文章尽量使用最浅显易懂的文字.图片来组织内容,力求通信技术零基础的人群也能看懂.但个人建议,至少稍微了解过网络通信方面的知识后再看,会更有收获.如果您大 ...
- 2.Python爬虫入门二之爬虫基础了解
1.什么是爬虫 爬虫,即网络爬虫,大家可以理解为在网络上爬行的一直蜘蛛,互联网就比作一张大网,而爬虫便是在这张网上爬来爬去的蜘蛛咯,如果它遇到资源,那么它就会抓取下来.想抓取什么?这个由你来控制它咯. ...
- Python爬虫入门二之爬虫基础了解
1.什么是爬虫 爬虫,即网络爬虫,大家可以理解为在网络上爬行的一直蜘蛛,互联网就比作一张大网,而爬虫便是在这张网上爬来爬去的蜘蛛咯,如果它遇到资源,那么它就会抓取下来.想抓取什么?这个由你来控制它咯. ...
随机推荐
- WPF中自动增加行(动画)的TextBox
原文:WPF中自动增加行(动画)的TextBox WPF中自动增加行(动画)的TextBox WPF中的Textbox控件是可以自动换行的,只要设置TextWrapping属性为"Wrap& ...
- 【codeforces 782B】The Meeting Place Cannot Be Changed
[题目链接]:http://codeforces.com/contest/782/problem/B [题意] 每个人都有一个速度,只能往上走或往下走; 然后让你找一个地方,所有人都能够在t时间内到达 ...
- python io操作
一次性读取 # 读取文件 # 默认打开文件的方式是只读 file = None try: file = open("f:/test.sql") print(file.name) # ...
- PHP基本的文件和文件夹操作常用的汇总
资源:http://www.ido321.com/835.html 一.基本文件的操作 文件的基本操作有:文件推断.文件夹推断.文件大小.读写性推断.存在性推断及文件时间等 1: <?php 2 ...
- CentOS下Apache的停止和卸载
昨晚搞到一台全球性价比最高的服务器,折腾一晚上,好不容易把node服务开启了,结果访问不了我的网站!!! 访问我的网站,显示的是一个Apache欢迎页面.我想,是不是像之前那样,80端口没有开放,然后 ...
- Android 它们的定义View
安卓开发过程,安卓官方控制有时来自往往不能满足我们的需求.这一次,我必须定义自己.下面我们就来看看他们的定义View: package com.example.myview; import andro ...
- Android真机调试不打印日志解决
1.在拨号界面输入:*#*#2846579#*#* 进入测试菜单界面. 2.Project Menu–后台设置–LOG设置 3.LOG开关–LOG打开 LOG级别设置–VERBOSE 4.Dump&a ...
- 允许Android对于飞行模拟器
Android模拟器是公认的慢,并且不是一般的慢,即使在高性能的PC上,跟开发环境没关系,由于它就是慢.可是我们又必须使用模拟器,比方在測试Android不同版本号的兼容性时,或者在測试不同屏幕尺寸的 ...
- Scala & IntelliJ IDEA:环境搭建、helloworld
--------------------- 前言 --------------------- 项目关系,希望用Spark GraphX做数据分析及图像展示,但前提是得回spark:spark是基于 ...
- Qt控件焦点切换
们日常切换控件,例如QQ登陆的账号和密码输入框就可以通过Tab键切换焦点. 图1 qq切换焦点 Qt中QWidget提供了一个静态方式实现该效果 其中也包含介绍使用 [static] void QW ...