TableStyle 类

表示 Table 控件的样式和一些 Web 部件。

**命名空间:**System.Web.UI.WebControls
**程序集:**System.Web(在 system.web.dll 中)

语法

声明
Public Class TableStyle
    Inherits Style
用法
Dim instance As TableStyle
public class TableStyle : Style
public ref class TableStyle : public Style
public class TableStyle extends Style
public class TableStyle extends Style

备注

TableStyle 类用于表示表控件的样式。它封装控制表外观的属性,并可应用于多个表控件以提供通用外观。

通过设置 BackImageUrl 属性,可以指定在表的背景中显示的图像。表的单元格之间的间距量由 CellSpacing 属性控制。单元格内容和单元格边框之间的间距用 CellPadding 属性来指定。通过设置 GridLines 属性,可以指定是否显示单元格边框。表相对于 Web 窗体页上其他元素的水平对齐方式由 HorizontalAlign 属性指示。

提示

此类主要由控件开发人员使用。

.NET Framework 安全性

继承层次结构

System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       System.Web.UI.WebControls.Style
        System.Web.UI.WebControls.TableStyle
           System.Web.UI.WebControls.WebParts.WebPartMenuStyle

线程安全

此类型的任何公共静态(Visual Basic 中的 Shared)成员都是线程安全的,但不保证所有实例成员都是线程安全的。

平台

Windows 98、Windows 2000 SP4、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

TableStyle 成员
System.Web.UI.WebControls 命名空间
BackImageUrl
CellSpacing
CellPadding
GridLines
HorizontalAlign