/// <summary> /// This method is implementation-specific and not intended to be used from third-party /// code. /// </summary> /// <param name="item">This argument is implementation-specific and not intended to be used /// from third-party code.</param> /// <returns>The return value is implementation-specific and not intended to be used from /// third-party code.</returns> protected internal override Int32 AddInternal(Object item) { if (item is String s) { /* * XAML will coalesce all whitespace into a single space. If * there are no non-whitespace characters, ignore this part. */ if (s == " ") { return(-1); } // if there _is_ a non-whitespace character, create a new Run. item = new TaskDialogRun(s); } return(base.AddInternal(item)); }
/// <summary> /// Adds a <see cref="TaskDialogRun"/> instance to this /// <see cref="TaskDialogTextElementCollection"/>. /// </summary> /// <param name="item">The <see cref="TaskDialogRun"/> to be added.</param> public void AddRun(TaskDialogRun item) { Add(item); }