Walkthrough: Arranging Controls on Windows Forms Using Snaplines
https://msdn.microsoft.com/en-us/library/t5b5kc41(v=vs.110).aspx
Spacing and Aligning Controls Using Snaplines
Snaplines give you an accurate and intuitive way to align controls on your form.
They appear when you are moving a selected control or controls near a position that would align with another control or set of controls.
Your selection will "snap" to the suggested position as you move it past the other controls.
To arrange controls using snaplines
1.Drag a Button control from the Toolbox onto your form.
2.Move the Button control to the lower-right corner of the form. Note the snaplines that appear as the Button control approaches the bottom and right borders of the form. These snaplines display the recommended distance between the borders of the control and the form.
3.Move the Button control around the borders of the form and note where the snaplines appear. When you are finished, move the Button control near the center of the form.
snapline在你拖动到form边界的时候,会出现。
Aligning to Form and Container Margins
Snaplines help you to align your controls to form and container margins in a consistent manner.
To align controls to form and container margins
1.Change the value of the Button control's Margin property by expanding the Margin entry in the Properties window and setting the Allproperty to 0.
For details, see Walkthrough: Laying Out Windows Forms Controls with Padding, Margins, and the AutoSize Property.
2.Move the Button control close to the right border of the form until a snapline appears. This distance is now given by the value of the form's Padding property.
3.Drag a GroupBox control from the Toolbox onto your form.
4.Change the value of the GroupBox control's Padding property by expanding the Padding entry in the Properties window and setting the Allproperty to 10.
5.Drag a Button control from the Toolbox into the GroupBox control.
6.Move the Button control close to the right border of the GroupBox control until a snapline appears. Move the Button control within theGroupBox control and note where the snaplines appear.
Walkthrough: Arranging Controls on Windows Forms Using Snaplines的更多相关文章
- Margin and Padding in Windows Forms Controls
https://msdn.microsoft.com/en-us/library/ms229627.aspx Margin and Padding Precise placement of contr ...
- WPF中实例化Com组件,调用组件的方法时报System.Windows.Forms.AxHost+InvalidActiveXStateException的异常
WPF中实例化Com组件,调用组件的方法时报System.Windows.Forms.AxHost+InvalidActiveXStateException的异常 在wpf中封装Com组件时,调用组件 ...
- Double Buffering Windows Forms
Double Buffering Windows Forms As much as we would like it not to be the case, graphics can be slow ...
- .net chart(图表)控件的使用-System.Windows.Forms.DataVisualization.dll
这个案例指在介绍微软这套免费又功能强大的图表控件Microsoft Chart Controls for Microsoft .NET Framework 3.5,通过它,可让您的项目及报表,轻松套用 ...
- Windows Forms(二)
导读 1.用VS创建一个Windows Forms程序 2.分析上面的程序 3.Mediator pattern(中介者模式) 4.卡UI怎么办——BackgroundWorker组件 用VS创建一个 ...
- C# Vista Command Link Control with Windows Forms
using System; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; u ...
- ystem.Windows.Forms.SplitContainer : ContainerControl, ISupportInitialize
#region 程序集 System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ...
- System.Windows.Forms.Control : Component, IOleControl, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject....
#region 程序集 System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ...
- Windows Forms编程实战学习:第三章 菜单
第三章 菜单 1,控件和容器 所有的Windows Forms控件都是从System.Windows.Forms.Control类继承的,相关类的层次结构如下图所示: MarshalByRefObje ...
随机推荐
- linux中启动与终止lnmp的脚本
说是lnmp, 其实暂时只是 lnp, 因为还没有安装 mysql 这是脚本: #!/bin/bash function lnmpstart() { nginx /usr/local/php/bin/ ...
- C语言初学者代码中的常见错误与瑕疵(15)
见:http://www.cpfn.org/bbs/viewtopic.php?f=85&t=5946&sid=0252f08a6d697fbf5a684ec5f6faf1f2 相关链 ...
- 解决Android SDK Manager更新下载速度慢
1.在Host文件加上 203.208.46.146 www.google.com 74.125.113.121 developer.android.com 203.208.46.146 dl.goo ...
- SlidingMenu实现app侧滑功能
很多APP都有侧滑菜单的功能,部分APP左右都是侧滑菜单~SlidingMenu 这个开源项目可以很好帮助我们实现侧滑功能,如果对SlidingMenu 还不是很了解的童鞋,可以参考下本篇博客. 本片 ...
- java对象的序列化与反序列化使用
1.Java序列化与反序列化 Java序列化是指把Java对象转换为字节序列的过程:而Java反序列化是指把字节序列恢复为Java对象的过程. 2.为什么需要序列化与反序列化 我们知道,当两个进程进 ...
- ectouch第十一讲 之 ECTouch 菜单里如何添加文章链接
1.首先在 ectouch 后台添加好文章分类和文章内容(具体添加方法很简单,这里就不再赘述),然后在菜单管理里添加导航如下(链接地址的获取方法参考步骤 2):2.文章分类列表 域名/mobile/i ...
- Integer Inquiry -TJU1112
作为最简单的高精度加法,要注意的是如下几点, 第一,因为是数位达到上百位的大数,所以只能用字符串数组来存贮. 第二,为了方便之后的相加操作,应该把字符串数组逆序转化为一个整型数组. 第三,在控制进位的 ...
- 【转】MYSQL入门学习之十二:存储过程的基本操作
转载地址:http://www.2cto.com/database/201212/177380.html 存储过程简单来说,就是为以后的使用而保存的一条或多条MySQL语句的集合.可将其视为批文件,虽 ...
- WPF中viewmodel层怎样得到view层的TabControl控件对象?
View层: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: ...
- c# 客户端
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...