コード例 #1
0
        /// <summary>
        ///     Replace the internal list of rich text runs.
        /// </summary>
        /// <param name="Runs">The new list of rich text runs for replacing.</param>
        public void ReplaceRuns(List <SLRun> Runs)
        {
            var sText = string.Empty;

            if (istrReal.Text != null)
            {
                sText = istrReal.Text.Text;
            }

            istrReal.RemoveAllChildren <Text>();
            istrReal.RemoveAllChildren <Run>();

            int i;

            // start from the end because we're prepending to the front
            for (i = Runs.Count - 1; i >= 0; --i)
            {
                istrReal.PrependChild(Runs[i].ToRun());
            }

            SetText(sText);
        }