Inheritance: EditableRun
Esempio n. 1
0
        public EditableRun CreateFreezeTextRun(char[] charBuffer)
        {
            var span = new SolidTextRun(this.Root, charBuffer, this.currentSpanStyle);

            span.UpdateRunWidth();
            return(span);
        }
Esempio n. 2
0
 EditableRun MakeTextRun(int sourceIndex, int length)
 {
     if (length > 0)
     {
         sourceIndex = 0;
         length      = mybuffer.Length;
         EditableRun newTextRun = null;
         char[]      newContent = new char[length];
         Array.Copy(this.mybuffer, sourceIndex, newContent, 0, length);
         newTextRun             = new SolidTextRun(this.Root, newContent, this.SpanStyle);
         newTextRun.IsLineBreak = this.IsLineBreak;
         newTextRun.UpdateRunWidth();
         return(newTextRun);
     }
     else
     {
         throw new Exception("string must be null or zero length");
     }
 }
Esempio n. 3
0
 EditableRun MakeTextRun(int sourceIndex, int length)
 {
     if (length > 0)
     {
         sourceIndex = 0;
         length = mybuffer.Length;
         EditableRun newTextRun = null;
         char[] newContent = new char[length];
         Array.Copy(this.mybuffer, sourceIndex, newContent, 0, length);
         newTextRun = new SolidTextRun(this.Root, newContent, this.SpanStyle);
         newTextRun.IsLineBreak = this.IsLineBreak;
         newTextRun.UpdateRunWidth();
         return newTextRun;
     }
     else
     {
         throw new Exception("string must be null or zero length");
     }
 }
 public EditableRun CreateFreezeTextRun(char[] charBuffer)
 {
     var span = new SolidTextRun(this.Root, charBuffer, this.currentSpanStyle);
     span.UpdateRunWidth();
     return span;
 }