
Hi
I would like to make the first and last lines in a document read only, such that the user can edit between the first and last lines but not on those lines and not after the last line.
The only way I have found that comes close is using ReadOnlySpanIndicators. Unfortunately this doesn't go far enough, as the user can still add text after the end of the line.
I can't use the Header/FooterText properties as they are not displayed in the editor(and I have another use for them), I would rather not use 3 controls to achieve this.
Ideally I'd like to be able to do something like :
//set the first line to read only
_document.Lines[0].IsReadOnly = true;
//set the last line as read only and absolute last line!
DocumentLine line = _document.Lines[_document.Lines.Count - 1];
line.IsReadOnly = true;
line.IsLastLine = true; //no further lines may be added after this line!
Any suggestions?
Thanks
Vincent.
I would like to make the first and last lines in a document read only, such that the user can edit between the first and last lines but not on those lines and not after the last line.
The only way I have found that comes close is using ReadOnlySpanIndicators. Unfortunately this doesn't go far enough, as the user can still add text after the end of the line.
I can't use the Header/FooterText properties as they are not displayed in the editor(and I have another use for them), I would rather not use 3 controls to achieve this.
Ideally I'd like to be able to do something like :
//set the first line to read only
_document.Lines[0].IsReadOnly = true;
//set the last line as read only and absolute last line!
DocumentLine line = _document.Lines[_document.Lines.Count - 1];
line.IsReadOnly = true;
line.IsLastLine = true; //no further lines may be added after this line!
Any suggestions?
Thanks
Vincent.