ylbtech-SilverLight-Layout: 布局(3)StackPanel 对象
  • A, Nesting Layout Containers(内嵌布局容器)
  • B, StackPanel(队列面板)对象
  • C, StackPanel(队列面板)对象 Orientation="Horizontal"
  • D, StackPanel(队列面板)对象之 Alignment
  • E, StackPanel(队列面板)对象之 Margins
1.A, Nesting Layout Containers(内嵌布局容器)返回顶部
1,
2,

  1. <Grid ShowGridLines="True" Background="SteelBlue" HorizontalAlignment="Center" VerticalAlignment="Center">
  2. <Grid.RowDefinitions>
  3. <RowDefinition Height="*"></RowDefinition>
  4. <RowDefinition Height="Auto"></RowDefinition>
  5. </Grid.RowDefinitions>
  6. <TextBlock Margin="10" Grid.Row="0" Foreground="White"
  7. Text="This a simply test of the nested containers."></TextBlock>
  8. <StackPanel Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
  9. <Button Margin="10,10,2,10" Padding="3" Content="Ok"></Button>
  10. <Button Margin="2,10,10,10" Padding="3" Content="Cancel"></Button>
  11. </StackPanel>
  12. </Grid>

3, ShowGridLines, Background, HorizontalAlignment, VerticalAlignment

,Grid.RowDefinitions, RowDefinition

,Grid.Row

,Orientation

,<StackPanel/>[队列面板 对象]

4,
1.B, StackPanel(队列面板)对象返回顶部
1,
2,

  1. <Grid x:Name="LayoutRoot" Background="White">
  2. <StackPanel Background="White">
  3. <TextBox Text="A Button Stack"/>
  4. <Button Content="Button A"/>
  5. <Button Content="Button B"/>
  6. <Button Content="Button C"/>
  7. <Button Content="Button D"/>
  8. </StackPanel>
  9. </Grid>

3,<StackPanel/>

4,
4
1.C, StackPanel(队列面板)对象 Orientation="Horizontal"返回顶部
1,
2,

  1. <Grid x:Name="LayoutRoot" Background="White">
  2. <StackPanel Orientation="Horizontal" Background="White">
  3. <TextBox Text="A Button Stack"/>
  4. <Button Content="Button A"/>
  5. <Button Content="Button B"/>
  6. <Button Content="Button C"/>
  7. <Button Content="Button D"/>
  8. </StackPanel>
  9. </Grid>

3, Orientation

4,
1.D, StackPanel(队列面板)对象之 Alignment返回顶部
1,
2,

  1. <Grid x:Name="LayoutRoot" Background="White">
  2. <StackPanel Background="White">
  3. <TextBox Text="A Button Stack"/>
  4. <Button HorizontalAlignment="Left" Content="Button A"/>
  5. <Button HorizontalAlignment="Right" Content="Button B"/>
  6. <Button Content="Button C"/>
  7. <Button Content="Button D"/>
  8. </StackPanel>
  9. </Grid>

3, HorizontalAlignment[水平对齐方式]

4,
1.E, StackPanel(队列面板)对象之 Margins返回顶部
1,
2,

  1. <Grid x:Name="LayoutRoot" Background="White">
  2. <StackPanel Background="White">
  3. <TextBox Text="A Button Stack" HorizontalAlignment="Center"/>
  4. <Button HorizontalAlignment="Left" Content="Button A" Margin="5"/>
  5. <Button HorizontalAlignment="Right" Content="Button B" Margin="0,0,0,10"/>
  6. <Button Content="Button C"/>
  7. <Button Content="Button D"/>
  8. </StackPanel>
  9. </Grid>

3, Margin[外间距]

4,
1.F,返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

SilverLight:布局(3)StackPanel 对象的更多相关文章

  1. silverlight Canvas、StackPanel、Grid三者之间的关系

    学习 silverlight   首先Canvas.StackPanel.Grid 博客园里看到jailu的这篇文章整理得很好 贴下来: Silverlight提供了非常灵活的布局管理系统,让程序员和 ...

  2. WPF之旅(三)- 布局之StackPanel

    说到WPF的界面布局,相信很多朋友都写过Html代码.在WPF中,大多数程序都使用类似Web的(flow)流布局.在使用流布局模型时,各种控件可以按特定的要求来排列,在窗口内容发生变化时,比如窗口大小 ...

  3. WPF 界面布局DockPanel stackPanel WrapPanel 元素内容以及位置控制

    1 DockPanel 1) 默认充满整个窗口. 2) 最后一个出现的部分,默认充满剩余空间. 3) 非最后一个出现的部分,根据其中内容,进行分配空间s 2 StackPanel 实现居左,居右,居中 ...

  4. WPF教程二:布局之StackPanel面板

    应用程序界面设计中,合理的元素布局至关重要,它可以方便用户使用,并将信息清晰合理地展现给用户.WPF提供了一套功能强大的工具-面板(Panel),来控制用户界面的布局.你可以使用这些面板控件来排布元素 ...

  5. c# 布局(stackpanel)

    <Grid> <StackPanel> <Button Content="asas"> </Button> <Button C ...

  6. 12.Quick QML-QML 布局(Row、Column、Grid、Flow和嵌套布局) 、Repeater对象

    1.Row布局 Row中的item可以不需要使用anchors布局,就能通过行的形式进行布局. 并且item可以使用Positioner附加属性来访问有关其在Row中的位置及其他信息. 示例如下所示, ...

  7. [Swift通天遁地]六、智能布局-(2)视图对象的尺寸和位置相对约束

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...

  8. silverlight中鼠标放在对象的提示事件

    1.xaml 中实现 <Rectangle x:Name="toolTip" Grid.Column="0" Grid.Row="1" ...

  9. Silverlight项目笔记1:UI控件与布局、MVVM、数据绑定、await/async、Linq查询、WCF RIA Services、序列化、委托与事件

    最近从技术支持转到开发岗,做Silverlight部分的开发,用的Prism+MVVM,框架由同事搭好,目前做的主要是功能实现,用到了一些东西,侧重于如何使用,总结如下 1.UI控件与布局 常用的主要 ...

随机推荐

  1. 1512 Monkey King

    Monkey King Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tota ...

  2. socket中send和recv函数

    Socket一次Recv接受的字节有限制么? 从套接字接收数据. 返回值是表示接收数据的字符串. 一次接收的最大数据量由bufsize指定.它默认为零. 注意为了最好地匹配硬件和网络现实,bufsiz ...

  3. python - work5 - 类与对象 - 拓展题

    ''' 5:购物车类,包含的功能如下,请自行设计这个类以及类里面的方法:1)用户输入工资后,打印商品列表(商品列表自行设计展示模式)2)允许用户根据商品编号去选择商品3)用户选择商品后,检查余额是否足 ...

  4. verilog写的LCD1602 显示

    在读本文之前,请先阅读 LCD1602 的 datasheet(百度到处都是) ,熟悉有关的11条指令集. LCD1602的11个指令集链接 http://www.cnblogs.com/aslmer ...

  5. Tensorflow 笔记 -- tensorboard 的使用

    Tensorflow 笔记 -- tensorboard 的使用 TensorFlow提供非常方便的可视化命令Tensorboard,先上代码 import tensorflow as tf a = ...

  6. 九度oj 题目1470:调整方阵

    题目描述: 输入一个N(N<=10)阶方阵,按照如下方式调整方阵:1.将第一列中最大数所在的行与第一行对调.2.将第二列中从第二行到第N行最大数所在的行与第二行对调. 依此类推...N-1.将第 ...

  7. Dropbox面向第三方开发者推出全新的Datastore API

    Dropbox今天推出了全新的高级的同步API,开发者可以使用Dropbox的技术同步跨设备app的数据. Datastore API在现有的Dropbox Sync API基础上进行了扩展,允许开发 ...

  8. 【bzoj3251】树上三角形 朴素LCA+暴力

    题目描述 给定一大小为n的有点权树,每次询问一对点(u,v),问是否能在u到v的简单路径上取三个点权,以这三个权值为边长构成一个三角形.同时还支持单点修改. 输入 第一行两个整数n.q表示树的点数和操 ...

  9. FZU Problem 2200 cleaning dp

    Problem Description N个人围成一圈在讨论大扫除的事情,需要选出K个人.但是每个人与他距离为2的人存在矛盾,所以这K个人中任意两个人的距离不能为2,他们想知道共有多少种方法. Inp ...

  10. 学习 WebService 第二步:知识准备——WSDL文件解析

    原文地址:https://www.cnblogs.com/yzw23333/p/7245104.html Web service中一个 WSDL 对应一个 web service地址. 可以想象成一个 ...