Wizard.CellSpacing 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置单元格间的空间量。
public:
virtual property int CellSpacing { int get(); void set(int value); };
public virtual int CellSpacing { get; set; }
member this.CellSpacing : int with get, set
Public Overridable Property CellSpacing As Integer
属性值
单元格之间的空间量(以像素为单位)。 默认值为 0。
示例
下面的代码示例演示如何使用 CellPadding 和 CellSpacing 属性以声明方式对控件的 Wizard 布局进行编程。
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Wizard ID="Wizard1"
CellSpacing="20"
CellPadding="20"
BorderColor="Blue"
BorderWidth="2"
Runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1"
Title="Step 1"
Runat="server">
You are currently on step 1.
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2"
Title="Step 2"
Runat="server">
You are currently on step 2.
</asp:WizardStep>
<asp:WizardStep ID="WizardStep3"
Runat="server"
Title="Step 3">
You are currently on step 3.
</asp:WizardStep>
</WizardSteps>
<HeaderTemplate>
<b>Wizard CellPadding and CellSpacing Example</b>
</HeaderTemplate>
</asp:Wizard>
</form>
</body>
</html>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Wizard ID="Wizard1"
CellSpacing="20"
CellPadding="20"
BorderColor="Blue"
BorderWidth="2"
Runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1"
Title="Step 1"
Runat="server">
You are currently on step 1.
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2"
Title="Step 2"
Runat="server">
You are currently on step 2.
</asp:WizardStep>
<asp:WizardStep ID="WizardStep3"
Runat="server"
Title="Step 3">
You are currently on step 3.
</asp:WizardStep>
</WizardSteps>
<HeaderTemplate>
<b>Wizard CellPadding and CellSpacing Example</b>
</HeaderTemplate>
</asp:Wizard>
</form>
</body>
</html>
注解
CellSpacing使用 属性可以控制 Wizard 控件中相邻单元格之间的间距。 此间距可垂直和水平应用。