Style Class

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET

Represents style information container, if one of the style properties is not set then it doesn't affect the element matched. The value for the setting will be inferred from other matching style or from directly set value (can be set via the element's property).

If there are no matching values for the setting and it's not set directly on the element instance then it will have the default value that depends on the element type.

Some of the style properties can be inherited while others affect only the directly matched element, each property has the description of this behavior.

Inheritance Hierarchy

SystemObject
  Apitron.PDF.Kit.StylesStyle

Namespace:  Apitron.PDF.Kit.Styles
Assembly:  Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Syntax

public sealed class Style

The Style type exposes the following members.

Constructors

  NameDescription
Public methodStyle
Initializes a new instance of the Style class.

Style - is a set of properties that define ContentElement’s appearance, very similar to CSS they help to tune the look of the element by employing internal styling system based on selectors.

Selector – is a rule that defines which elements should be styled with the given set of properties, it consists of a rule itself that looks very similar to CSS notation and a property set. See StyleManager help for more information on supported selectors.

All content elements have the same set of properties forming style, that can be set either directly or by using style selectors. A direct setting affects implicit style for the element and while selectors can affect multiple elements at once making it feasible to lessen the work needed to design a document.

Top
Properties

  NameDescription
Public propertyAlign
Gets or sets the horizontal alignment of the element’s content, it can be Left, Right, Center aligned or Justified. Only acceptable for block elements, this property will be ignored if the element used is not a block. Left, Right, Center values are supported by all elements. In case of Justify is used – only text elements will be affected. All elements inherit value from their block containers, only block elements can override parent’s Align setting.
Public propertyBackground
Gets or sets the background color. Not inheritable.
Public propertyBackgroundImage
Gets or sets the background image for the element. The background of an element is the total size of the element, including padding (but not the margin and border). By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally. Not inheritable.
Public propertyBackgroundPosition
Gets or sets the background position value for the element. The background position property sets the starting position of a background image. Not inheritable.
Public propertyBackgroundRepeat
Gets or sets the background repeat value for the element. The background repeat property sets if/how a background image will be repeated. By default, a background image is repeated both vertically and horizontally. Not inheritable.
Public propertyBorder
Gets or sets the border around the element. Not inheritable.
Public propertyBorderBottom
Gets or sets the bottom border. Not inheritable.
Public propertyBorderColor
Gets or sets the color of the border. Not inheritable.
Public propertyBorderLeft
Gets or sets the left border. Not inheritable.
Public propertyBorderRadius
Gets or sets the border radius. Can be set using percentage value, in this case it's calculated using content width including padding as a base. If BorderRadius is being set to a non-null value, all other border values set except Border are ignored. Not inheritable.
Public propertyBorderRight
Gets or sets the right border. Not inheritable.
Public propertyBorderTop
Gets or sets the top border. Not inheritable.
Public propertyCellPadding
Gets or sets the cell padding, affects only Grid elements. Not inheritable.
Public propertyCharacterSpacing
Gets or sets the character spacing. Inheritable.
Public propertyClear
Gets or sets the clear flag for the element indicating whether it should ignore floating elements (if any) and start a new line. Not inheritable.
Public propertyColor
Gets or sets the foreground color for the element. Inheritable.
Public propertyDisplay
Gets or sets the display setting for the element. Not inheritable.
Public propertyFloat
Gets or sets the value indicating that element can float. Not inheritable.
Public propertyFont
Gets or sets the font for the element. Inheritable.
Public propertyHeight
Gets or sets the height of the element. Not inheritable.
Public propertyInnerBorder
Gets or sets the inner border, affects only Grid elements. Not inheritable.
Public propertyInnerBorderColor
Gets or sets the color of the inner border affects only Grid elements. Not inheritable.
Public propertyLineHeight
Gets or sets the height of the line. On a block container element whose content is composed of inline-level elements, 'line-height' specifies the minimal height of line boxes within the element. On a non-inline element, 'line-height' specifies the height that is used in the calculation of the line box height. Inheritable.
Public propertyListCounter
Gets or sets the list counter. Not inheritable.
Public propertyListMarker
Gets or sets the list marker appearance. Inheritable.
Public propertyListMarkerPadding
Gets or sets the list marker padding. Inheritable.
Public propertyListStyle
Gets or sets the list style. Not inheritable.
Public propertyMargin
Gets or sets the margin around the element. Not inheritable.
Public propertyPadding
Gets or sets the padding. Not inheritable.
Public propertyScriptLevel
Gets or sets the value used to create subscripting or superscripting effect. It defines the level of effect, zero can be used for normal scripting, positive values are for superscripting, negative for subscripting. Affects textual elements. Not inheritable.
Public propertyStructureType
Gets or sets the type of the logical structure.
Public propertyTextDecoration
Gets or sets the text decoration. Inheritable.
Public propertyTextIndent
Gets or sets the text indent. Inheritable.
Public propertyTextRenderingMode
Gets or sets the text rendering mode used to draw textual elements. By default all text is being drawn using Fill setting. Inheritable.
Public propertyVerticalAlign
Gets or sets the vertical align. Not inheritable.
Public propertyWidth
Gets or sets the width of the element. Not inheritable.
Public propertyWordSpacing
Gets or sets the word spacing. Inheritable.
Top
See Also

Reference