HighlightRegion Class
Definition
Represents a region of text to be highlighted.
public class HighlightRegion
Constructors
| Name | Description |
|---|---|
| HighlightRegion | Initializes a new instance of the Avalonia.Controls.Documents.Primitives.Highlighting.HighlightRegion class. |
HighlightRegion Constructor
Initializes a new instance of the Avalonia.Controls.Documents.Primitives.Highlighting.HighlightRegion class.
public HighlightRegion(Avalonia.Controls.Documents.TextModel.TextPointer start, Avalonia.Controls.Documents.TextModel.TextPointer end, Avalonia.Media.IBrush brush, double opacity, Avalonia.Controls.Documents.Primitives.Highlighting.HighlightStyle style)
Parameters
start Avalonia.Controls.Documents.TextModel.TextPointer
The start position of the highlight region.
end Avalonia.Controls.Documents.TextModel.TextPointer
The end position of the highlight region.
brush Avalonia.Media.IBrush
The brush to use for highlighting.
opacity double
The opacity of the highlight (0.0 to 1.0).
style Avalonia.Controls.Documents.Primitives.Highlighting.HighlightStyle
The style of highlight.
Properties
| Name | Description |
|---|---|
| Brush | Gets or sets the brush to use for highlighting. |
| End | Gets the end position of the highlight region. |
| Opacity | Gets or sets the opacity of the highlight (0.0 to 1.0). |
| Pen | Gets or sets the optional pen for underline/strikethrough. |
| Start | Gets the start position of the highlight region. |
| Style | Gets or sets the style of highlight (background, underline, etc.). |
| Tag | Gets or sets custom data associated with this region. |
Brush Property
Gets or sets the brush to use for highlighting.
public Avalonia.Media.IBrush Brush { get; set; }
End Property
Gets the end position of the highlight region.
public Avalonia.Controls.Documents.TextModel.TextPointer End { get; set; }
Opacity Property
Gets or sets the opacity of the highlight (0.0 to 1.0).
public double Opacity { get; set; }
Pen Property
Gets or sets the optional pen for underline/strikethrough.
public Avalonia.Media.IPen Pen { get; set; }
Start Property
Gets the start position of the highlight region.
public Avalonia.Controls.Documents.TextModel.TextPointer Start { get; set; }
Style Property
Gets or sets the style of highlight (background, underline, etc.).
public Avalonia.Controls.Documents.Primitives.Highlighting.HighlightStyle Style { get; set; }
Tag Property
Gets or sets custom data associated with this region.
public object Tag { get; set; }