GridRow Class

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

Represents a grid row, a subcontainer element that is being used in Grid element to group cells together. It can only be added into Grid element and its styling is limited (only properties which can be inherited from plus background color value affect the appearance of the grid cells).

Links created using [!:CrossReference] or [!:LinkUri] and pointing to/from GridRow elements are also not supported. This behavior can be easily workarounded by adding a link to inner elements.

Each element added to grid row is being treated as a separate cell, so if you need multiple elements to be placed inside the singe cell you may use a Section to group them together. If you need the cell to be spanned vertically or horizontally you may use RowSpan or ColSpan properties respectively.

Inheritance Hierarchy

SystemObject
  Apitron.PDF.Kit.FlowLayoutContentElement
    Apitron.PDF.Kit.FlowLayoutContainerElementContentElement
      Apitron.PDF.Kit.FlowLayout.ContentGridRow

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

public sealed class GridRow : ContainerElement<ContentElement>

The GridRow type exposes the following members.

Constructors

  NameDescription
Public methodCode exampleGridRow
Creates an empty GridRow using auto row height.
Public methodCode exampleGridRow(ContentElement)
Creates a new instance of the GridRow using auto row height and a collection of elements for its columns.
Public methodCode exampleGridRow(Length)
Creates an empty GridRow using given row height.
Public methodCode exampleGridRow(Length, ContentElement)
Creates a new instance of the GridRow using given row height and a collection of elements for its columns.
Top
Properties

  NameDescription
Public propertyAlign
Gets or sets the text align.
(Inherited from ContentElement.)
Public propertyBackground
Gets or sets the background color.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyBackgroundPosition
Gets or sets the background position value for the element. The background position property sets the starting position of a background image.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyBookmark
Gets or sets the bookmark.
(Inherited from ContentElement.)
Public propertyBorder
Gets or sets the border around the element.
(Inherited from ContentElement.)
Public propertyBorderBottom
Gets or sets the bottom border.
(Inherited from ContentElement.)
Public propertyBorderColor
Gets or sets the color of the border.
(Inherited from ContentElement.)
Public propertyBorderLeft
Gets or sets the left border.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyBorderRight
Gets or sets the right border.
(Inherited from ContentElement.)
Public propertyBorderTop
Gets or sets the top border.
(Inherited from ContentElement.)
Public propertyCellPadding
Gets or sets the cell padding, affects only Grid elements.
(Inherited from ContentElement.)
Public propertyCharacterSpacing
Gets or sets the character spacing.
(Inherited from ContentElement.)
Public propertyCode exampleClass
Gets or sets classes list this element belongs to, so it will match selectors for this class. Use space to separate classes from each other.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyColor
Gets or sets the foreground color for the element.
(Inherited from ContentElement.)
Public propertyColSpan
Gets or sets the column span that this element takes. Affects element placed inside the Grid container.
(Inherited from ContentElement.)
Public propertyDisplay
Gets or sets the display setting for the element.
(Inherited from ContentElement.)
Public propertyFloat
Gets or sets the value indicating that element can float.
(Inherited from ContentElement.)
Public propertyFont
Gets or sets the font for the element.
(Inherited from ContentElement.)
Public propertyHeight
Gets or sets the height of the grid row element.
(Overrides ContentElementHeight.)
Public propertyId
Gets or sets Id.
(Inherited from ContentElement.)
Public propertyInnerBorder
Gets or sets the inner border, affects only Grid elements.
(Inherited from ContentElement.)
Public propertyInnerBorderColor
Gets or sets the color of the inner border affects only Grid elements.
(Inherited from ContentElement.)
Public propertyLineHeight
Gets or sets the height of the line.
(Inherited from ContentElement.)
Public propertyLink
Gets or sets the link.
(Inherited from ContentElement.)
Public propertyListCounter
Gets or sets the list counter.
(Inherited from ContentElement.)
Public propertyListMarker
Gets or sets the list marker appearance.
(Inherited from ContentElement.)
Public propertyListMarkerPadding
Gets or sets the list marker padding.
(Inherited from ContentElement.)
Public propertyListStyle
Gets or sets the list style.
(Inherited from ContentElement.)
Public propertyMargin
Gets or sets the margin around the element.
(Inherited from ContentElement.)
Public propertyPadding
Gets or sets the padding.
(Inherited from ContentElement.)
Public propertyRowSpan
Gets or sets the row span that this element takes. Affects element placed inside the Grid container.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyStructureType
Gets or sets the type of the logical structure.
(Inherited from ContentElement.)
Public propertyTag
Gets or sets the tag for this element. It can be any object and can be used for any user-defined purpose.
(Inherited from ContentElement.)
Public propertyTextDecoration
Gets or sets the text decoration.
(Inherited from ContentElement.)
Public propertyTextIndent
Gets or sets the text indent.
(Inherited from ContentElement.)
Public propertyTextRenderingMode
Gets or sets the text rendering mode used to draw textual elements. By default all text is being drawn using Fill setting.
(Inherited from ContentElement.)
Public propertyVerticalAlign
Gets or sets the vertical align.
(Inherited from ContentElement.)
Public propertyWidth
Gets or sets the width of the element.
(Inherited from ContentElement.)
Public propertyWordSpacing
Gets or sets the word spacing.
(Inherited from ContentElement.)
Top
Methods

  NameDescription
Public methodAdd
Adds the specified element to the container.
(Inherited from ContainerElementT.)
Public methodAddItems
Adds the specified elements to the container.
(Inherited from ContainerElementT.)
Public methodClear
Removes all elements from container.
(Inherited from ContainerElementT.)
Public methodContains (Inherited from ContainerElementT.)
Public methodCopyTo
Copies to.
(Inherited from ContainerElementT.)
Public methodRemove
Removes the specified item.
(Inherited from ContainerElementT.)
Top
Remarks

Examples

C#
// add 2 cells into the row
FlowDocument document = new FlowDocument();
Grid table = new Grid(Length.FromPercentage(8), Length.Auto);
table.Add(new GridRow(new TextBlock("Date"), new TextBlock("Description")));
document.Add(table);
See Also

Reference