abstract private InsertAfter ( int index, char c ) : void | ||
index | int | |
c | char | |
return | void |
public void AddCharacter(char c) { if (CurrentLine.IsBlankLine) { //1. new EditableRun t = new EditableTextRun(this.Root, c, this.CurrentSpanStyle); var owner = this.FlowLayer.OwnerRenderElement; CurrentLine.AddLast(t); SetCurrentTextRun(t); } else { EditableRun cRun = CurrentTextRun; if (cRun != null) { if (cRun.IsInsertable) { cRun.InsertAfter(CurrentTextRunCharIndex, c); } else { AddTextSpan(new EditableTextRun(this.Root, c, this.CurrentSpanStyle)); return; } } else { throw new NotSupportedException(); } } CurrentLine.TextLineReCalculateActualLineSize(); CurrentLine.RefreshInlineArrange(); CharIndex++; }