Represents an inline anchor for a floating block. The anchor occupies one document position, while its content is measured and arranged separately from the text line.
Definition
Namespace:Telerik.WinForms.Documents.Layout
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class FloatingBlockLayoutBox : AnnotationMarkerLayoutBox, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectLayoutElementLayoutBoxInlineLayoutBoxAnnotationMarkerLayoutBoxFloatingBlockLayoutBox...
Implements:
Inherited Members
Constructors
Creates a floating-block layout box for a document element.
public FloatingBlockLayoutBox(DocumentElement parentElement, DocumentStructureCollection collection)
The floating block represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
Properties
Gets or sets the floating-block model element anchored by this box.
public FloatingBlock AssociatedFloatingBlock { get; set; }
Gets the measured content height used as the floating anchor's baseline offset.
public override float BaselineOffset { get; }
Overrides:
Gets whether child layout boxes can be generated from the floating block. The content box is supplied by the associated floating-block model element.
protected override bool CanCreateLayoutBoxesFromContent { get; }
Overrides:
Gets whether this box reports a visual representation. It returns true even when there is no content box to measure.
public override bool HasVisualRepresentation { get; }
Overrides:
Gets whether the anchor contributes width at the end of a line. Floating content is positioned by the containing block layout instead.
public override bool HasWidthAtTheEndOfLine { get; }
Overrides:
Gets whether the floating-block anchor is read-only as inline text.
public override bool IsReadonly { get; }
Overrides:
Gets whether the floating-block anchor can be split into line fragments; floating blocks are indivisible anchors.
public override bool IsSplittable { get; }
Overrides:
Gets the single document position occupied by the floating-block anchor.
public override int PositionsCountInBox { get; }
Overrides:
Methods
A floating-block box cannot be duplicated as a layout element.
public override LayoutElement CreateLayoutElement()
This method does not return.
Exceptions: NotSupportedExceptionA layout element is requested from a floating-block box.
Overrides:
A floating block is positioned by its container and cannot be split into an inline fragment.
public override LayoutBox CreateNewFragment(float availableWidth, bool isFirstBoxInLine)
The width available for the attempted fragment.
isFirstBoxInLinebooltrue when this anchor is first in its line.
Returns:This method does not return.
Exceptions: InvalidOperationExceptionA floating block cannot be split.
Overrides:
Measures the floating block's content and sets the anchor baseline to the measured content height. If the floating block has no content box, returns an empty size.
Invalidates the containing layout's measurement when the floating block's document structure is about to change.
protected override void OnElementStructureChanging()
Overrides:
Reparents the model's content layout box when this floating box changes parent, except for cloned boxes.
protected override void OnParentChanged()
Overrides:
Returns the associated floating block's string representation in quotation marks for diagnostics.