New to Telerik UI for WinForms? Start a free 30-day trial

Supplies the ruler with document geometry and applies changes made by dragging ruler markers.

Definition

Namespace:Telerik.WinControls.RichTextEditor.UI

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public interface IDocumentRulerController

Methods

Adds a tab stop to the current paragraph.

C#
void AddTabStop(TabStopInfo tabStop)
Parameters:tabStopTabStopInfo

The alignment and position of the new tab stop.

Moves an existing tab stop in the current paragraph.

C#
void ChangeTabStopPosition(TabStopInfo tabStop, double offset)
Parameters:tabStopTabStopInfo

The tab stop returned by GetTabStops().

offsetdouble

The new position of the tab stop.

Gets the default tab-stop positions that fall within the specified paragraph width.

C#
IEnumerable<double> GetDefaultTabStopsByWidth(double width)
Parameters:widthdouble

The paragraph width available to the ruler.

Returns:

IEnumerable<double>

The positions of default tab stops within that width.

Gets the text flow direction, using the containing table's direction when the caret is inside a table.

C#
FlowDirection GetFlowDirection()
Returns:

FlowDirection

The active text flow direction.

Gets the margin, table-column, or section-column separators for the current editing position.

C#
IEnumerable<SeparatorInfo> GetHorizontalSeparators()
Returns:

IEnumerable<SeparatorInfo>

The horizontal separators to display.

Gets the current paragraph's indent values and the separators that bound its text area.

C#
void GetIndents(out FlowDirection textFlowDirection, out SeparatorInfo leftSeparator, out SeparatorInfo rightSeparator, out double firstLineIndent, out double hangingIndent, out double rightIndent, out double columnLeftOffset, out double columnRightOffset)
Parameters:textFlowDirectionFlowDirection

Receives the current paragraph's text direction.

leftSeparatorSeparatorInfo

Receives the separator on the paragraph's leading side, or null when no paragraph is active.

rightSeparatorSeparatorInfo

Receives the separator on the paragraph's trailing side, or null when no paragraph is active.

firstLineIndentdouble

Receives the first-line indent including the active column offset, or -1 when no paragraph is active.

hangingIndentdouble

Receives the left indent including the active column offset, or -1 when no paragraph is active.

rightIndentdouble

Receives the right indent including the active column offset, or -1 when no paragraph is active.

columnLeftOffsetdouble

Receives the left offset of the active section column, or 0 when not in a section column.

columnRightOffsetdouble

Receives the right offset of the active section column, or 0 when not in a section column.

Gets the flow direction used to lay out ruler markers for the current paragraph or table.

C#
FlowDirection GetMarkersFlowDirection()
Returns:

FlowDirection

The marker flow direction.

Gets the current section's bounds in the editor view.

C#
Rect GetPageSizeAndPosition()
Returns:

Rect

The section rectangle, or an empty rectangle when bounds are unavailable.

Gets the editor's horizontal and vertical scale factors for converting document geometry to ruler coordinates.

C#
Size GetScaleFactor()
Returns:

Size

The scale factors, with horizontal and vertical values in the width and height components.

Gets the tab stops active for the current paragraph, including stops merged from its style.

C#
IEnumerable<TabStopInfo> GetTabStops()
Returns:

IEnumerable<TabStopInfo>

The tab stops represented by ruler markers.

Gets the margin and, when editing inside a table, row separators for the current editing position.

C#
IEnumerable<SeparatorInfo> GetVerticalSeparators()
Returns:

IEnumerable<SeparatorInfo>

The vertical separators to display.

Determines whether dragging a section-column separator would leave a valid equal-column spacing.

C#
bool IsValidColumnSeparatorChange(SeparatorInfo separatorInfo, double currentPosition, double horizontalChange)
Parameters:separatorInfoSeparatorInfo

The section-column separator being dragged.

currentPositiondouble

The current separator position in document coordinates.

horizontalChangedouble

The proposed horizontal movement.

Returns:

bool

true when equal-column spacing remains above the minimum and below the calculated maximum; otherwise, false.

Removes a tab stop from the current paragraph.

C#
void RemoveTabStop(TabStopInfo tabStop)
Parameters:tabStopTabStopInfo

The tab stop returned by GetTabStops().

Sets the first-line indent for the current paragraph.

C#
void SetSeparatorFirstLineIndent(double indent)
Parameters:indentdouble

The first-line indent position shown by the ruler.

Applies the supplied first-line and hanging-indent values to the current paragraph.

C#
void SetSeparatorFirstLineIndentAndHangingIndent(double firstLineIndent, double hangingIndent)
Parameters:firstLineIndentdouble

The first-line indent value supplied by the ruler.

hangingIndentdouble

The hanging-indent value supplied by the ruler.

The built-in controller currently applies hangingIndent and does not use firstLineIndent.

Sets the paragraph's left indent while preserving the previous first-line position.

C#
void SetSeparatorHangingIndent(double indent)
Parameters:indentdouble

The hanging-indent position shown by the ruler.

Applies a dragged separator value to the corresponding page margin, table size, or section-column spacing.

C#
void SetSeparatorOffset(SeparatorInfo separator, double offset)
Parameters:separatorSeparatorInfo

The separator being moved.

offsetdouble

The new value interpreted according to Type. For section-column separators, the built-in controller instead reads Offset.

Sets the paragraph's right indent, clamping negative values to zero.

C#
void SetSeparatorRightIndent(double indent)
Parameters:indentdouble

The right-indent position shown by the ruler.

Events

Occurs when the current section bounds or scale changes and the ruler must update its geometry.

C#
event EventHandler<EventArgs> PageChanged

Occurs when paragraph, table, or section formatting changes the ruler separators or markers.

C#
event EventHandler<EventArgs> SeparatorsChanged