In a basic RichTextBox it is possible to add tag properties.
I was looking to use the syntax editor in a lightweight way and need to add hidden information around a span like context which I don't think is avaliable in the syntax editor.
I want to indicate to a user that the text span under the cursor is not edittable.
In a rich text box you can do things like see below ... is there anything similair?
My use model maybe more richtextbox like but the syntax editor has so much more to offer that a basic editor.
I was looking to use the syntax editor in a lightweight way and need to add hidden information around a span like context which I don't think is avaliable in the syntax editor.
I want to indicate to a user that the text span under the cursor is not edittable.
In a rich text box you can do things like see below ... is there anything similair?
My use model maybe more richtextbox like but the syntax editor has so much more to offer that a basic editor.
if (IsPositionContainedBetween(rtb.CaretPosition, startP, endP))
{
...
}
// This method first checks for compatible text container scope, and then checks whether
// a specified position is between two other specified positions.
bool IsPositionContainedBetween(TextPointer positionToTest, TextPointer start, TextPointer end)
{
// Note that without this check, an exception will be raised by CompareTo if positionToTest
// does not point to a position that is in the same text container used by start and end.
//
// This test also implicitely indicates whether start and end share a common text container.
if (!positionToTest.IsInSameDocument(start) || !positionToTest.IsInSameDocument(end))
return false;
return start.CompareTo(positionToTest) <= 0 && positionToTest.CompareTo(end) <= 0;
}