System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.WebControls.Style

The class represents the style properties for an element of a control that renders as a or . You can control the vertical and horizontal alignment of the contents in an item of the table by setting the and properties, respectively. You can also specify whether the contents of the cell automatically continue on the next line when the end of the cell is reached by setting the property.

This class provides methods that are useful for creating a style for an item in the control. You can use the and methods to copy or merge the style properties of another with the instance of the that the method is called from.

Represents the style properties for an element of a control that renders as a or .

- Constructor

  Use this constructor to create and initialize a new instance of the class.

  Creates a new instance of the class using default values.

  1.0.5000.0
  2.0.0.0
- Constructor

  Use this constructor to create and initialize a new instance of the class using the specified .

  Creates a new instance of the class with the specified state bag.

  A that represents the state bag in which to store style information.
  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` ``

  The method is used primarily by control developers to insert additional attributes and styles in the output stream for the . The method overrides the method.

  Adds information about horizontal alignment, vertical alignment, and wrap to the list of attributes to render.

  The output stream that renders HTML content to the client. The control that the style refers to. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to duplicate the non-empty style properties of the specified into the instance of the class that this method is called from.

  All properties in the current instance of the class are replaced by the associated property in the parameter.

  Duplicates the non-empty style properties of the specified into the instance of the class that this method is called from.

  A that represents the style to copy. 1.0.5000.0 2.0.0.0
- Property
  System.Web.UI.WebControls.HorizontalAlign To be added: an object of type 'HorizontalAlign'

  Use the property to specify the horizontal alignment of the data list control within its container. This property is set with one of the enumeration values. The following table lists the possible values.

  Value

  Description

  The horizontal alignment is not set.

  The contents of a cell are left justified within the cell.

  The contents of a cell are centered within the cell.

  The contents of a cell are right justified within the cell.

  The value of this property is stored in view state.

  Gets or sets the horizontal alignment of the contents in a cell.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.HorizontalAlign.NotSet)
- Method
  System.Void ``

  Use the method to combine the style properties of the specified into the instance of the class that this method is called from.

  This method joins the properties of the object and the current instance of the class. This is accomplished by setting each property that is not set in the current instance of the class with the value in the corresponding property of the parameter. Only properties that have not been set are replaced. If a property in the parameter is not set, it does not replace the corresponding property in the current instance of the class.

  Combines the style properties of the specified into the instance of the class that this method is called from.

  A that represents the style to combine. 1.0.5000.0 2.0.0.0
- Method
  System.Void

  Use this method to remove any defined style elements from the style, leaving the style in its default configuration.

  Removes any defined style elements from the style.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.WebControls.VerticalAlign To be added: an object of type 'VerticalAlign'

  Use the property to specify the vertical alignment of the contents of the cell. The following table lists the possible values.

  Vertical Alignment

  Description

  The vertical alignment is not set.

  The contents of the cell are aligned with the upper edge of the cell.

  The contents of the cell are aligned with the center of the cell.

  The contents of the cell are aligned with the lower edge of the cell.

  The value of this property is stored in view state.

  Gets or sets the vertical alignment of the contents in a cell.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.VerticalAlign.NotSet)
- Property
  System.Boolean To be added: an object of type 'bool'

  Use the property to specify or determine whether the contents of the cell wrap.

  The value of this property is stored in view state.

  Gets or sets a value indicating whether the contents of a cell wrap in the cell.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DefaultValue(true)