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,

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

3, ShowGridLines, Background, HorizontalAlignment, VerticalAlignment

,Grid.RowDefinitions, RowDefinition

,Grid.Row

,Orientation

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

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

<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Background="White">
<TextBox Text="A Button Stack"/>
<Button Content="Button A"/>
<Button Content="Button B"/>
<Button Content="Button C"/>
<Button Content="Button D"/>
</StackPanel>
</Grid>

3,<StackPanel/>

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

<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Orientation="Horizontal" Background="White">
<TextBox Text="A Button Stack"/>
<Button Content="Button A"/>
<Button Content="Button B"/>
<Button Content="Button C"/>
<Button Content="Button D"/>
</StackPanel>
</Grid>

3, Orientation

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

<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Background="White">
<TextBox Text="A Button Stack"/>
<Button HorizontalAlignment="Left" Content="Button A"/>
<Button HorizontalAlignment="Right" Content="Button B"/>
<Button Content="Button C"/>
<Button Content="Button D"/>
</StackPanel>
</Grid>

3, HorizontalAlignment[水平对齐方式]

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

<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Background="White">
<TextBox Text="A Button Stack" HorizontalAlignment="Center"/>
<Button HorizontalAlignment="Left" Content="Button A" Margin="5"/>
<Button HorizontalAlignment="Right" Content="Button B" Margin="0,0,0,10"/>
<Button Content="Button C"/>
<Button Content="Button D"/>
</StackPanel>
</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. javaweb通过接口来实现多个文件压缩和下载(包括单文件下载,多文件批量下载)

    原博客地址:https://blog.csdn.net/weixin_37766296/article/details/80044000 将多个文件压缩并下载下来:(绿色为修改原博客的位置) 注意:需 ...

  2. jubeeeeeat(网络流)

    jubeeeeeat 总时间限制:  1000ms 内存限制:  256000kB 描述 众所周知,LZF很喜欢打一个叫Jubeat的游戏.这是个音乐游戏,游戏界面是4×4的方阵,会根据音乐节奏要求玩 ...

  3. 64位程序调用32DLL解决方案

    最近做一个.NETCore项目,需要调用以前用VB6写的老程序,原本想重写,但由于其调用了大量32DLL,重写后还需要编译为32位才能运行,于是干脆把老代码整个封装为32DLL,然后准备在64位程序中 ...

  4. Selenium WebDriver-操作键盘事件

    # 注意: !!!操作操作系统的按键,需要先装pywin32,然后通过交互模式import win32api和import win32con判断是否安装成功,需要重启下cmd进入交互模式# 下载链接: ...

  5. 算法理论——PLA

    全称 perceptron learning algrithm 用武之地 二值分类问题,资料线性可分 算法核心(以二维平面为例) 找到一条直线WTX=0,一边全为+1,另一边全为-1.找到了这条线(即 ...

  6. install and config redis on ubuntu14.04

    1.installation: (1)download redis from http://redis.io/download (2)installation: $ tar -xvf redis-3. ...

  7. pat 1036

    1036. 跟奥巴马一起编程(15) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 美国总统奥巴马不仅呼吁所有人 ...

  8. poj1985&&第四次CCF软件认证第4题 求树的直径

    Cow Marathon Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 4216   Accepted: 2137 Case ...

  9. 筒子们,使用Protobuf优化你的协议

    Protocol buffers是google提供的一种将结构化数据进行序列化和反序列化的方法,其优点是语言中立,平台中立,可扩展性好,目前在google内部大量用于数据存储,通讯协议等方面.PB在功 ...

  10. BZOJ4517 [Sdoi2016]排列计数 【组合数 + dp】

    题目 求有多少种长度为 n 的序列 A,满足以下条件: 1 ~ n 这 n 个数在序列中各出现了一次 若第 i 个数 A[i] 的值为 i,则称 i 是稳定的.序列恰好有 m 个数是稳定的 满足条件的 ...