SelectionHighlightLayer Class
Definition
Highlight layer for text selection.
public class SelectionHighlightLayer
Constructors
| Name | Description |
|---|---|
| SelectionHighlightLayer | Initializes a new instance of the Avalonia.Controls.Documents.Primitives.Highlighting.SelectionHighlightLayer class. |
SelectionHighlightLayer Constructor
Initializes a new instance of the Avalonia.Controls.Documents.Primitives.Highlighting.SelectionHighlightLayer class.
public SelectionHighlightLayer()
Methods
| Name | Description |
|---|---|
| GetRegions | Gets all highlight regions in this layer. Inherited from HighlightLayerBase. |
| GetRegionsInRange | Gets highlight regions that intersect with the specified range. Inherited from HighlightLayerBase. |
| Render | Renders this layer. Inherited from HighlightLayerBase. |
| UpdateSelection | Updates the selection highlight. |
UpdateSelection Method
Updates the selection highlight.
public void UpdateSelection(Avalonia.Controls.Documents.TextModel.TextPointer start, Avalonia.Controls.Documents.TextModel.TextPointer end)
Parameters
start Avalonia.Controls.Documents.TextModel.TextPointer
The start position of the selection, or null to clear.
end Avalonia.Controls.Documents.TextModel.TextPointer
The end position of the selection, or null to clear.
Properties
| Name | Description |
|---|---|
| IsVisible | Gets or sets a value indicating whether this layer is currently visible. Inherited from HighlightLayerBase. |
| 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. Inherited from HighlightLayerBase. |
| SelectionBrush | Gets or sets the brush used for selection highlighting. |
| ZIndex | Gets the Z-index for rendering order (higher = on top). Inherited from HighlightLayerBase. |
SelectionBrush Property
Gets or sets the brush used for selection highlighting.
public Avalonia.Media.IBrush SelectionBrush { get; set; }
Events
| Name | Description |
|---|---|
| RegionsChanged | Event raised when regions change. Inherited from HighlightLayerBase. |