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.什么是爬虫 爬虫,即网络爬虫,大家可以理解为在网络上爬行的一直蜘蛛,互联网就比作一张大网,而爬虫便是在这张网上爬来爬去的蜘蛛咯,如果它遇到资源,那么它就会抓取下来.想抓取什么?这个由你来控制它咯. ...
随机推荐
- PatentTips - Heterogeneous Parallel Primitives Programming Model
BACKGROUND 1. Field of the Invention The present invention relates generally to a programming model ...
- KMP练习——KMP模式匹配 一(串)
Description 求子串的next值,用next数组存放,所有输出 Input 输入一个字符串 Output 输出全部next值 Sample Input abaabcac Sample Out ...
- C#基础readonly 与const
readonly 与 const readonly是运行时常量,const是编译期常量(在编译过程中已经把使用该值的都用值替代,不分配内存)readonly灵活性高,const效率高 readonly ...
- X Window 简单的新手教程
1.X Window 系统的窗体显示原理: http://www.ibm.com/developerworks/cn/linux/l-cn-xwin/ 2.X Window 程式设计入门--第二章 X ...
- Swagger 专题
随着互联网技术的发展,现在的网站架构基本都由原来的后端渲染,变成了:前端渲染.前后端分离的形态,而且前端和后端在各自的技术道路上越走越远. 前端和后端的唯一联系,变成了API接口:API文档成了前后端 ...
- 【38.46%】【codeforces 615E】Hexagons
time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...
- 报错:Unsupported major.minor version 52.0 (jar包对不同JDK版本的兼容性问题:)
Unsupported major.minor version 52.0 这类错误是因为Java版本不一致造成的,在高版本的JDK(1.8)环境中编译JAR包,然后JAR在低版本的JVM(1.6)中运 ...
- 【64.22%】【codefoces round 382A】Ostap and Grasshopper
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- 实现在 .net 中使用 HttpClient 下载文件时显示进度
在 .net framework 中,要实现下载文件并显示进度的话,最简单的做法是使用 WebClient 类.订阅 DownloadProgressChanged 事件就行了. 但是很可惜,WebC ...
- Exclusive access control to a processing resource
A data processing system is provided with multiple processors that share a main memory. Semaphore va ...