Ejemplo n.º 1
0
        /// <summary> Inserts the given content into this instance. </summary>
        /// <param name="caret"> The caret which represents the point at which the content should be
        ///  inserted. </param>
        /// <param name="newContent"> The content to insert. </param>
        /// <param name="autoMerge"> (Optional) True to automatically merge similar fragments together. </param>
        public TextCaret Insert(TextCaret caret, TextBlockContent newContent, bool autoMerge = true)
        {
            if (newContent == this)
            {
                throw new ArgumentException("Content cannot be inserted into itself", nameof(newContent));
            }

            return(Insert(caret, newContent.GetText()));
        }
Ejemplo n.º 2
0
 /// <summary> TextBlockContent constructor. </summary>
 internal TextBlockContent(TextBlockContent content)
     : this(content.GetText())
 {
 }