HighlightLayerBase Class
Definition
Base class for highlight layer implementations. Provides common functionality for managing and rendering highlight regions.
public class HighlightLayerBase
Methods
| Name | Description |
|---|---|
| GetRegions | Gets all highlight regions in this layer. |
| GetRegionsInRange | Gets highlight regions that intersect with the specified range. |
| Render | Renders this layer. |
GetRegions Method
Gets all highlight regions in this layer.
public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Documents.Primitives.Highlighting.HighlightRegion> GetRegions()
Returns
System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Documents.Primitives.Highlighting.HighlightRegion>
A read-only list of highlight regions.
GetRegionsInRange Method
Gets highlight regions that intersect with the specified range.
public System.Collections.Generic.IEnumerable<Avalonia.Controls.Documents.Primitives.Highlighting.HighlightRegion> GetRegionsInRange(Avalonia.Controls.Documents.TextModel.TextPointer start, Avalonia.Controls.Documents.TextModel.TextPointer end)
Parameters
start Avalonia.Controls.Documents.TextModel.TextPointer
The start position of the range.
end Avalonia.Controls.Documents.TextModel.TextPointer
The end position of the range.
Returns
System.Collections.Generic.IEnumerable<Avalonia.Controls.Documents.Primitives.Highlighting.HighlightRegion>
An enumerable of regions that intersect with the range.
Render Method
Renders this layer.
public void Render(Avalonia.Media.DrawingContext context, Avalonia.Controls.Documents.Primitives.ITextView textView)
Parameters
context Avalonia.Media.DrawingContext
The drawing context.
textView Avalonia.Controls.Documents.Primitives.ITextView
The text view for coordinate mapping.
Properties
| Name | Description |
|---|---|
| IsVisible | Gets or sets a value indicating whether this layer is currently visible. |
| Name | Gets the name that identifies this layer within a Avalonia.Controls.Documents.Primitives.Highlighting.HighlightLayerCollection, which rejects a second layer carrying the same one and looks layers up by it. |
| ZIndex | Gets the Z-index for rendering order (higher = on top). |
IsVisible Property
Gets or sets a value indicating whether this layer is currently visible.
public bool IsVisible { get; set; }
Name Property
Gets the name that identifies this layer within a Avalonia.Controls.Documents.Primitives.Highlighting.HighlightLayerCollection, which rejects a second layer carrying the same one and looks layers up by it.
public string Name { get; set; }
ZIndex Property
Gets the Z-index for rendering order (higher = on top).
public int ZIndex { get; set; }
Events
| Name | Description |
|---|---|
| RegionsChanged | Event raised when regions change. |
RegionsChanged Event
Event raised when regions change.
public event EventHandler RegionsChanged