DocumentRulerElement
Hosts horizontal and vertical document rulers and routes marker drags to an IDocumentRulerController.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class DocumentRulerElement : ContentControl, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ISupportDrop
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElementFrameworkElementContentControlDocumentRulerElement...
Implements:
Inherited Members
Constructors
Initializes the ruler with visible rulers and a measurement unit based on the current region.
public DocumentRulerElement()
Fields
Identifies the Controller dependency property.
public static readonly RadProperty ControllerProperty
Identifies the IsReadOnly dependency property.
public static readonly RadProperty IsReadOnlyProperty
Identifies the MarkersBrush dependency property.
public static readonly RadProperty MarkersBrushProperty
Identifies the MeasurementUnit dependency property.
public static readonly RadProperty MeasurementUnitProperty
Properties
Gets or sets the associated RadRichTextBox. This is a dependency property.
public RadRichTextBox AssociatedRichTextBox { get; set; }
The associated rich text box.
Gets or sets the source of ruler geometry and the handler for marker changes.
public IDocumentRulerController Controller { get; set; }
Gets or sets whether the horizontal ruler is displayed.
public bool CreateHorizontalRuler { get; set; }
Gets or sets whether the vertical ruler is displayed.
public bool CreateVerticalRuler { get; set; }
Gets or sets the initial tab-stop type displayed by the ruler's tab-stop selector.
public RulerThumbType DefaultRulerThumbType { get; set; }
The value is Indent.
Gets or sets the height of the horizontal ruler and repositions its content when changed.
public int HorizontalRulerHeight { get; set; }
Gets or sets whether ruler markers can be dragged. When an editor is associated, this value is bound to its read-only state.
public bool IsReadOnly { get; set; }
Gets or sets the brush used to draw ruler graduations and labels.
public Brush MarkersBrush { get; set; }
Gets or sets the thickness of the ruler area that contains graduations and marker backgrounds.
public int MarkersContainerThickness { get; set; }
Gets or sets the units used for ruler graduations, labels, and drag snapping.
public UnitTypes MeasurementUnit { get; set; }
Gets or sets the width of the vertical ruler.
public int VerticalRulerWidth { get; set; }
Methods
Creates the ruler canvases, marker layers, and overlay elements.
public override void OnApplyTemplate()
Overrides:
Rebinds read-only state and ruler data when the associated editor changes.
protected virtual void OnAssociatedRichTextBoxChanged(RadRichTextBox oldRichTextBox, RadRichTextBox newRichTextBox)
The editor previously associated with the ruler.
newRichTextBoxRadRichTextBoxThe editor now associated with the ruler, or null.
Tracks the pointer within the horizontal ruler so a dragged tab-stop marker can be removed when moved outside it.
Updates marker enabled states before the ruler's read-only value changes.
protected override void OnPropertyChanging(RadPropertyChangingEventArgs args)
Overrides: