Class Style
Style class
Represents display style of excel document,such as font,color,alignment,border,etc.
Constructors
| Name | Description |
|---|
| Style(GridDesktop) | create a new Style for the control |
Properties
| Name | Description |
|---|
| BackgroundColor { get; set; } | Gets or sets the cell background color,if style pattern is not set to solid,then it will take affect |
| CellLocked { get; set; } | Gets or sets a value indicating whether a cell can be modified or not. |
| Color { get; set; } | Gets or sets the cell shading color. when pattern is none ,it return Color.Empty; when pattern is BackgroundType.Solid,it return ForegroundColor; others it return BackgroundColor |
| Custom { get; set; } | Represents the custom number format string of this style object. If the custom number format is not set(For example, the number format is builtin), "" will be returned. |
| Font { get; set; } | Gets a GridFont object. |
| ForegroundColor { get; set; } | Gets or sets a style’s foreground color. |
| HAlignment { get; set; } | Gets or sets horizontal alignment attribute. |
| Indent { get; set; } | Represents the m_IndentLevel level for the cell or range. Can only be an integer from 0 to 15. |
| NumberType { get; set; } | Gets or sets the display format of numbers and dates. The formatting patterns are different for different regions. |
| Pattern { get; set; } | Gets or sets the cell background pattern type. |
| Rotation { get; set; } | Represents text rotation angle. |
| Shrink { get; set; } | Represents if text automatically shrinks to fit in the available column width. |
| TextDirection { get; set; } | Gets or sets text direction attribute. |
| TextWrapped { get; set; } | Gets or sets a value indicating whether the text within a cell is wrapped. |
| VAlignment { get; set; } | Gets or sets vertical alignment attribute. |
Methods
| Name | Description |
|---|
| Clone() | Creates and returns a copy of this object. **NOTE:**If you clone a named style, name is not cloned becaule style name must be unique. Therefore, the cloned style will not “equals to” the original style. |
| SetBorderColor(BorderType, Color) | Sets the color of the specified border. |
| SetBorderLine(BorderType, BorderLineType) | Sets the border line type of the specified border. |
See Also