ClassBlock
Flowing-content container that lays out inline elements, images, and forms with indentation, spacing, alignment, and background for pagination. Use it to accumulate and arrange runs and inline content before measuring and drawing onto the document.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model.Editing
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public class Block : FixedContentEditorBase, IBlockElement
Inheritance: objectFixedContentEditorBaseBlock
Implements:
Inherited Members
Constructors
Block(Block)
Initializes a new instance of the Block class.
Properties
ActualSize
Gets the actual size of the block after it is drawn.
BackgroundColor
Gets or sets the background color.
Declaration
public ColorBase BackgroundColor { get; set; }
Property Value
The background color.
Bullet
Gets or sets the bullet element.
Declaration
public PositionContentElement Bullet { get; set; }
Property Value
The bullet element.
DesiredSize
Gets the desired size.
Declaration
public Size DesiredSize { get; }
Property Value
The desired size.
Implements
FirstLineIndent
Gets or sets the first line indent.
Declaration
public double FirstLineIndent { get; set; }
Property Value
The first line indent.
HasOpenMarkedContent
Gets a value indicating whether this block has any open marked content segments that haven't been closed. Marked content is used to identify specific content within a PDF for various purposes such as accessibility, structure, or logical organization.
Declaration
public bool HasOpenMarkedContent { get; }
Property Value
true if this block has open marked content segments; otherwise, false.
Implements
HasPendingContent
Gets if there is any pending content after the last measure.
Declaration
public bool HasPendingContent { get; }
Property Value
Boolean value indicating whether there is any pending content after the last measure.
Implements
HorizontalAlignment
Gets or sets the horizontal alignment.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
The horizontal alignment.
IndentAfterBullet
Gets or sets the indent after the bullet element.
Declaration
public double IndentAfterBullet { get; set; }
Property Value
The indent after the bullet element.
IsEmpty
Indicates if the block contains any elements.
Declaration
public bool IsEmpty { get; }
Property Value
True if the block does not contain any elements.
LeftIndent
Gets or sets the left indent.
Declaration
public double LeftIndent { get; set; }
Property Value
The left indent.
LineSpacing
Gets or sets the line spacing.
Declaration
public double LineSpacing { get; set; }
Property Value
The line spacing.
LineSpacingType
Gets or sets the value indicating how the spacing between lines is calculated.
Declaration
public HeightType LineSpacingType { get; set; }
Property Value
The type line spacing rule.
PendingElements
Gets the pending elements.
Declaration
public IEnumerable<LayoutElementBase> PendingElements { get; }
Property Value
IEnumerable<LayoutElementBase>
The pending elements.
RightIndent
Gets or sets the right indent.
Declaration
public double RightIndent { get; set; }
Property Value
The right indent.
SpacingAfter
Gets or sets the spacing after.
Declaration
public double SpacingAfter { get; set; }
Property Value
The spacing after.
SpacingBefore
Gets or sets the spacing before.
Declaration
public double SpacingBefore { get; set; }
Property Value
The spacing before.
VerticalAlignment
Gets or sets the vertical alignment.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
The vertical alignment.
Methods
Draw(FixedContentEditor, Rect)
Draws the block element with the specified editor.
Declaration
public void Draw(FixedContentEditor editor, Rect boundingRect)
Parameters
editor
The editor.
boundingRect
The bounding rectangle.
Implements
Insert(LayoutElementBase)
Inserts the specified layout element.
Declaration
public void Insert(LayoutElementBase element)
Parameters
element
The element.
Insert(PositionContentElement)
Inserts the specified element.
Declaration
public void Insert(PositionContentElement element)
Parameters
element
The element.
InsertCircle(Point, double)
Inserts a circle.
InsertEllipse(Point, double, double)
Inserts an ellipse.
InsertForm(FormSource)
Inserts a form.
Declaration
public void InsertForm(FormSource source)
Parameters
source
The form source.
InsertForm(FormSource, Size)
Inserts a form.
Declaration
public void InsertForm(FormSource source, Size size)
Parameters
source
The form source.
size
The size.
InsertForm(FormSource, double, double)
Inserts a form.
Declaration
public void InsertForm(FormSource source, double width, double height)
Parameters
source
The form source.
width
The width.
height
The height.
InsertHyperlinkEnd()
Inserts hyperlink end.
Declaration
public void InsertHyperlinkEnd()
InsertHyperlinkStart(Destination)
Inserts hyperlink start.
Declaration
public void InsertHyperlinkStart(Destination destination)
Parameters
destination
The destination.
InsertHyperlinkStart(Uri)
Inserts hyperlink start.
InsertImage(ImageSource)
Inserts an image represented by an existing ImageSource at its intrinsic size.
Declaration
public void InsertImage(ImageSource source)
Parameters
source
The image source.
InsertImage(ImageSource, Size)
Inserts an ImageSource scaled to the specified size.
Declaration
public void InsertImage(ImageSource source, Size size)
Parameters
source
The image source.
size
Target size.
InsertImage(ImageSource, double, double)
Inserts an ImageSource scaled to the specified width and height.
Declaration
public void InsertImage(ImageSource source, double width, double height)
Parameters
source
The image source.
width
Target width.
height
Target height.
InsertImage(Stream)
Inserts an image from a stream at its intrinsic size at the current inline position in the block.
Declaration
public void InsertImage(Stream stream)
Parameters
stream
The stream containing the encoded image data.
InsertImage(Stream, Size)
Inserts an image from a stream scaled to the specified size.
InsertImage(Stream, double, double)
Inserts an image from a stream scaled to the specified width and height.
InsertLine(Point, Point)
Inserts a line.
InsertMarkedContentEnd()
Inserts marked content end.
Declaration
public void InsertMarkedContentEnd()
InsertMarkedContentStart(StructureElement)
Inserts marked content start. If no structureTag is provided, the marked content will be tagged as an Artifact.
Declaration
public void InsertMarkedContentStart(StructureElement structureTag = null)
Parameters
structureTag
The structure element tag that relates the marked content with the document's structure tree. If null, the content is tagged as an artifact.
InsertPath(GeometryBase)
Inserts a path.
Declaration
public void InsertPath(GeometryBase geometry)
Parameters
geometry
The geometry.
InsertRange(IEnumerable<LayoutElementBase>)
Inserts the specified layout elements.
Declaration
public void InsertRange(IEnumerable<LayoutElementBase> elements)
Parameters
elements
IEnumerable<LayoutElementBase>
The elements.
InsertRectangle(Rect)
Inserts a rectangle.
Declaration
public void InsertRectangle(Rect rectangle)
Parameters
rectangle
The rectangle.
InsertText(FontFamily, FontStyle, FontWeight, string)
Inserts the text using the given font family, font style and font weight.
Declaration
public void InsertText(FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight, string text)
Parameters
fontFamily
The font family.
fontStyle
The font style.
fontWeight
The font weight.
text
The text.
InsertText(FontFamily, string)
Inserts the text using the given font family.
Declaration
public void InsertText(FontFamily fontFamily, string text)
Parameters
fontFamily
The font family.
text
The text.
InsertText(string)
Inserts the text.
Measure()
Measures the block in the infinite size.
Measure(Size)
Measures the block element with specified available size.
Measure(Size, CancellationToken)
Measures the block element with specified available size.
Declaration
public Size Measure(Size availableSize, CancellationToken cancellationToken)
Parameters
availableSize
The available size.
cancellationToken
The cancellation token used to cancel the operation.
Returns
The result size.
Implements
SetBullet(List, int)
Sets the bullet from the corresponding list and list level.
Split()
Splits this instance.