EditorLineNumberMargin Class
Represents a default implementation of a line number margin for an IEditorView.
public class EditorLineNumberMargin : EditorViewMarginBase, IEditorViewMargin, ITextViewMargin, IOrderable, IKeyedObject
- Inheritance:
- object Visual UIElement FrameworkElement Control EditorViewMarginBase object
- Implements:
- IEditorViewMargin ITextViewMargin IOrderable IKeyedObject
Constructors
EditorLineNumberMargin(IEditorView)
Initializes an instance of the EditorLineNumberMargin
class.
public EditorLineNumberMargin(IEditorView view)
Parameter | Type | Description |
---|---|---|
view | IEditorView | The IEditorView that will host the margin. |
Methods
Draw(TextViewDrawContext)
Draws the margin and its content.
public override void Draw(TextViewDrawContext context)
Parameter | Type | Description |
---|---|---|
context | TextViewDrawContext | The TextViewDrawContext to use for rendering. |
MeasureOverride(Size)
Measures the size required for the element and its child elements.
protected override Size MeasureOverride(Size availableSize)
Parameter | Type | Description |
---|---|---|
availableSize | Size | The available size. |
Returns
- Size:
The desired size.
OnCreateAutomationPeer()
Returns an AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
An AutomationPeer instance.
UpdateVisibility()
Updates the visibility of the margin.
public override void UpdateVisibility()