在我的 TextAdornment1 类中,我定义了以下内容:
' <summary>'
' On layout change add the adornment to any reformatted lines'
' </summary>'
Private Sub OnLayoutChanged(ByVal sender As Object, ByVal e As TextViewLayoutChangedEventArgs) Handles _view.LayoutChanged
For Each line In e.NewOrReformattedLines
Me.CreateVisuals(line)
Next line
End Sub
一个实例ITextViewLine
被传递给我的CreateVisuals
方法。如何更改该特定行上文本的颜色,以及如何使其变为粗体?我看到很多绘制图像以突出显示文本的示例,但到目前为止还没有改变实际文本的格式。我怎样才能做到这一点?