Class Block
Represents block of flowing content.
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Editing
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public class Block : FixedContentEditorBase, IBlockElement, IDrawArrangedElement, IForbiddenZoneContainer
Constructors
Block()
Block(Block)
Initializes a new instance of the Block class.
Declaration
public Block(Block other)
Parameters
Block
other
The other block. |
Properties
ActualSize
Gets the actual size of the block after it is drawn.
Declaration
public Size ActualSize { get; }
Property Value
System.Windows.Size
The actual size. |
BackgroundColor
Gets or sets the background color.
Declaration
public ColorBase BackgroundColor { get; set; }
Property Value
ColorBase
The background color. |
Bullet
Gets or sets the bullet element.
Declaration
public PositionContentElement Bullet { get; set; }
Property Value
PositionContentElement
The bullet element. |
DesiredSize
Gets the desired size.
Declaration
public Size DesiredSize { get; }
Property Value
System.Windows.Size
The desired size. |
Implements
FirstLineIndent
Gets or sets the first line indent.
Declaration
public double FirstLineIndent { get; set; }
Property Value
System.Double
The first line indent. |
HasPendingContent
Gets if there is any pending content after the last measure.
Declaration
public bool HasPendingContent { get; }
Property Value
System.Boolean
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
HorizontalAlignment
The horizontal alignment. |
IndentAfterBullet
Gets or sets the indent after the bullet element.
Declaration
public double IndentAfterBullet { get; set; }
Property Value
System.Double
The indent after the bullet element. |
IsEmpty
Indicates if the block contains any elements.
Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean
True if the block does not contain any elements. |
LeftIndent
Gets or sets the left indent.
Declaration
public double LeftIndent { get; set; }
Property Value
System.Double
The left indent. |
LineSpacing
Gets or sets the line spacing.
Declaration
public double LineSpacing { get; set; }
Property Value
System.Double
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
HeightType
The type line spacing rule. |
PendingElements
Gets the pending elements.
Declaration
public IEnumerable<LayoutElementBase> PendingElements { get; }
Property Value
System.Collections.Generic.IEnumerable<LayoutElementBase>
The pending elements. |
RightIndent
Gets or sets the right indent.
Declaration
public double RightIndent { get; set; }
Property Value
System.Double
The right indent. |
SpacingAfter
Gets or sets the spacing after.
Declaration
public double SpacingAfter { get; set; }
Property Value
System.Double
The spacing after. |
SpacingBefore
Gets or sets the spacing before.
Declaration
public double SpacingBefore { get; set; }
Property Value
System.Double
The spacing before. |
VerticalAlignment
Gets or sets the vertical alignment.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
VerticalAlignment
The vertical alignment. |
Methods
Clear()
Clears the block children.
Declaration
public void Clear()
Draw(FixedContentEditor, Rect)
Draws the block element with the specified editor.
Declaration
public void Draw(FixedContentEditor editor, Rect boundingRect)
Parameters
FixedContentEditor
editor
The editor. |
System.Windows.Rect
boundingRect
The bounding rectangle. |
Implements
Insert(PositionContentElement)
Inserts the specified element.
Declaration
public void Insert(PositionContentElement element)
Parameters
PositionContentElement
element
The element. |
Insert(LayoutElementBase)
Inserts the specified layout element.
Declaration
public void Insert(LayoutElementBase element)
Parameters
LayoutElementBase
element
The element. |
InsertCircle(Point, Double)
Inserts a circle.
Declaration
public void InsertCircle(Point center, double radius)
Parameters
System.Windows.Point
center
The center. |
System.Double
radius
The radius. |
InsertEllipse(Point, Double, Double)
Inserts an ellipse.
Declaration
public void InsertEllipse(Point center, double radiusX, double radiusY)
Parameters
System.Windows.Point
center
The center. |
System.Double
radiusX
The radius X. |
System.Double
radiusY
The radius Y. |
InsertForm(FormSource)
Inserts a form.
Declaration
public void InsertForm(FormSource source)
Parameters
FormSource
source
The form source. |
InsertForm(FormSource, Double, Double)
Inserts a form.
Declaration
public void InsertForm(FormSource source, double width, double height)
Parameters
FormSource
source
The form source. |
System.Double
width
The width. |
System.Double
height
The height. |
InsertForm(FormSource, Size)
Inserts a form.
Declaration
public void InsertForm(FormSource source, Size size)
Parameters
FormSource
source
The form source. |
System.Windows.Size
size
The size. |
InsertHyperlinkEnd()
Inserts hyperlink end.
Declaration
public void InsertHyperlinkEnd()
InsertHyperlinkStart(Uri)
Inserts hyperlink start.
Declaration
public void InsertHyperlinkStart(Uri uri)
Parameters
System.Uri
uri
The URI. |
InsertHyperlinkStart(Destination)
InsertImage(Stream)
Inserts an image.
Declaration
public void InsertImage(Stream stream)
Parameters
System.IO.Stream
stream
The stream that contains image. |
InsertImage(Stream, Double, Double)
Inserts an image.
Declaration
public void InsertImage(Stream stream, double width, double height)
Parameters
System.IO.Stream
stream
The stream that contains image. |
System.Double
width
The width. |
System.Double
height
The height. |
InsertImage(Stream, Size)
Inserts an image.
Declaration
public void InsertImage(Stream stream, Size size)
Parameters
System.IO.Stream
stream
The stream that contains image. |
System.Windows.Size
size
The size. |
InsertImage(ImageSource)
Inserts an image.
Declaration
public void InsertImage(ImageSource source)
Parameters
ImageSource
source
The image source. |
InsertImage(ImageSource, Double, Double)
Inserts an image.
Declaration
public void InsertImage(ImageSource source, double width, double height)
Parameters
ImageSource
source
The image source. |
System.Double
width
The width. |
System.Double
height
The height. |
InsertImage(ImageSource, Size)
Inserts an image.
Declaration
public void InsertImage(ImageSource source, Size size)
Parameters
ImageSource
source
The image source. |
System.Windows.Size
size
The size. |
InsertLine(Point, Point)
Inserts a line.
Declaration
public void InsertLine(Point point1, Point point2)
Parameters
System.Windows.Point
point1
The point1. |
System.Windows.Point
point2
The point2. |
InsertLineBreak()
Inserts a line break.
Declaration
public void InsertLineBreak()
InsertPath(GeometryBase)
Inserts a path.
Declaration
public void InsertPath(GeometryBase geometry)
Parameters
GeometryBase
geometry
The geometry. |
InsertRange(IEnumerable<LayoutElementBase>)
Inserts the specified layout elements.
Declaration
public void InsertRange(IEnumerable<LayoutElementBase> elements)
Parameters
System.Collections.Generic.IEnumerable<LayoutElementBase>
elements
The elements. |
InsertRectangle(Rect)
Inserts a rectangle.
Declaration
public void InsertRectangle(Rect rectangle)
Parameters
System.Windows.Rect
rectangle
The rectangle. |
InsertText(String)
Inserts the text.
Declaration
public void InsertText(string text)
Parameters
System.String
text
The text. |
InsertText(FontFamily, String)
Inserts the text using the given font family.
Declaration
public void InsertText(FontFamily fontFamily, string text)
Parameters
System.Windows.Media.FontFamily
fontFamily
The font family. |
System.String
text
The text. |
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
System.Windows.Media.FontFamily
fontFamily
The font family. |
System.Windows.FontStyle
fontStyle
The font style. |
System.Windows.FontWeight
fontWeight
The font weight. |
System.String
text
The text. |
Measure()
Measures the block in the infinite size.
Declaration
public Size Measure()
Returns
System.Windows.Size
The block size. |
Measure(Size)
Measures the block element with specified available size.
Declaration
[Obsolete("The method is obsolete. Please use Measure(Size availableSize, CancellationToken cancellationToken) instead.")]
public Size Measure(Size availableSize)
Parameters
System.Windows.Size
availableSize
The available size. |
Returns
System.Windows.Size
The result size. |
Implements
Measure(Size, CancellationToken)
Measures the block element with specified available size.
Declaration
public Size Measure(Size availableSize, CancellationToken cancellationToken)
Parameters
System.Windows.Size
availableSize
The available size. |
System.Threading.CancellationToken
cancellationToken
The cancellation token used to cancel the operation. |
Returns
System.Windows.Size
The result size. |
Implements
SetBullet(List, Int32)
Sets the bullet from the corresponding list and list level.
Declaration
public void SetBullet(List list, int listLevel)
Parameters
List
list
The list. |
System.Int32
listLevel
The list level. |
Split()
ToString()
Returns a System.String that represents the current System.Object.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents the current System.Object. |
Overrides
Explicit Interface Implementations
IBlockElement.Split()
Splits this instance.
Declaration
IBlockElement IBlockElement.Split()
Returns
IBlockElement
The remaining block element. |