码迷,mamicode.com
首页 > Windows程序 > 详细

WPF视频教程系列笔记

时间:2014-10-10 15:06:40      阅读:274      评论:0      收藏:0      [点我收藏+]

标签:color   io   ar   sp   on   ad   line   bs   as   

 

视频二:XAML基础

                        1.顶级元素 <Window></Window>,<Page></Page>,<Application></Application>

                        2. 名称空间 很重要。 默认名称空间:xmlns="" ;   另外名称空间:  xmlns:x=""   ; x是名称空间前缀 

                            x:Class="WpfApplication1.MainWindow" 是继续自Window类。

                        3. 简单属性:

                             实例1:简单属性

                             <Grid Name="Grid1"></Grid>

                             this.Title=this.Grid1.Name;

                             实例2:复杂属性,属性元素的方法

                             <Grid >

                             <Grid.Name>Grid1</Grid.Name>

                             <Button></Button>

                              </Grid>

                         4. 渐变的颜色

                              <Grid  Name="Grid1">

                                      <Grid.BackGround>

                                            <LinearGradientBrush>

                                              <LinearGradientBrush.GradientStops>

                                                 <GradientStop Offset="0.00" Color="Red"/>                                             

                                                 <GradientStop Offset="0.50" Color="Indigo"/>

                                                 <GradientStop Offset="1.00" Color="Violet"/>                                            

                                              </LinearGradientBrush.GradientStops>

                                              </LinearGradientBrush>

                                      </Grid.BackGround>

                             <Button></Button>

                              </Grid>

WPF视频教程系列笔记

标签:color   io   ar   sp   on   ad   line   bs   as   

原文地址:http://www.cnblogs.com/Andrew2014/p/4015716.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!