Workaround:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.radRichTextEditor1.IsSpellCheckingEnabled = true;
this.radRichTextEditor1.Insert("SOooome wrrrrong wooooooooords.");
this.radRichTextEditor1.CommandExecuted += radRichTextEditor1_CommandExecuted;
}
bool shouldProcess = true;
private void radRichTextEditor1_CommandExecuted(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutedEventArgs e)
{
if (e.Command is DeleteCommand)
{
if (shouldProcess)
{
shouldProcess = false;
RichTextEditorInputBehavior behavior = this.radRichTextEditor1.InputHandler;
behavior.ProcessKeyDown(new KeyEventArgs(Keys.Back));
}
shouldProcess = true;
}
}
}
Workaround:
string styleSuffix = "_1";
foreach (var importedStyle in rtfDoc.StyleRepository)
{
importedStyle.Name = string.Concat(importedStyle.Name, styleSuffix);
}
To reproduce: - Add some misspelled words. - Enable the spell check - the layout is updated and the words are underlined. - Disable the spell check - the lines are not removed until one clicks in the RichTextEditor. Workaround: radRichTextEditor1.IsSpellCheckingEnabled = !radRichTextEditor1.IsSpellCheckingEnabled; radRichTextEditor1.Document.LayoutMode = DocumentLayoutMode.Paged; radRichTextEditor1.Document.LayoutMode = DocumentLayoutMode.Flow;
To reproduce: 1. Insert a table 2. Select all cells in it 3. Press the Backspace key => the table is removed but the table adorner is still visible The adorner disappears if clicked
To reproduce:
Please refer to the attached sample application and video demonstrating the experience issue.
Workaround:
Set RadRichTextEditor to null in Form`s Dispose method:
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Me.RadRichTextEditor1 = Nothing
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
To reproduce: - Set the layout to Paged. - Add a table - Switch the layout to Flow and try to resize it on the right most border. Workaround: Switch to paged layout and resize the table.
To reproduce:
1. Add a RichTextEditorRibbonBar on the form
2. Add a RadRichTextEditor on the form.
3. Set the RichTextEditorRibbonBar.AssociatedRichTextEditor property.
4. Run the application. You will notice that the caret for the RadRichTextEditor is displayed and the user expects to start entering text when pressing the keyboard. However, the focused control in this case is the font family drop-down and it accepts the input.
Workaround: focus the RadRichTextEditor in the Form.Shown event:
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
Me.RadRichTextEditor1.Focus()
End Sub
The attached video shows how you can reproduce this.
This field retrieves a character through a code value specified in the field-argument. Such documents are common and are created when symbols (e.g. with font Windings through Insert -> Symbol dialog) are inserted in RTF documents in MS Word.
InvalidOperationException is thrown in the IsInNonEditableRange() method of RadDocument when assigning a document to RadRichTextBox, which is created through the model and contains several read-only ranges. Workaround: Call MeasureAndArrangeInDefaulSize().
To reproduce:
- Click the InsertMergeFiled button before setting the data source.
- Set the data source.
- Click the button again.
- There are no items in it.
Workaround:
Friend Class MyRichTextEditorRibbonBar
Inherits RichTextEditorRibbonBar
Protected Overrides Sub dropDownButtonInsertMergeField_DropDownOpening(sender As Object, e As CancelEventArgs)
MyBase.dropDownButtonInsertMergeField_DropDownOpening(sender, e)
If Me.dropDownButtonInsertMergeField.Items.Count = 0 Then
Me.dropDownButtonInsertMergeField.Items.Add(New RadItem)
End If
End Sub
End Class
To reproduce: please refer to the attached gif file
Add a custom tab in the ribbon UI and a RadDropDownListElement bound to a list of strings. The first item is selected by default. Insert a table by using the ribbon UI and try to get programmatically the RadDropDownListElement.SelectedValue/Index. It is null/-1 although the text is correct.
Workaround:
public class CustomRichTextEditorRibbonBar : RichTextEditorRibbonBar
{
protected override void CreateChildItems(RadElement parent)
{
base.CreateChildItems(parent);
FieldInfo fi = typeof(RadRibbonBar).GetField("ribbonBarElement", BindingFlags.Instance | BindingFlags.NonPublic);
RadRibbonBarElement ribbonBarElement = fi.GetValue(this) as RadRibbonBarElement;
ribbonBarElement = new CustomRadRibbonBarElement();
fi.SetValue(this, ribbonBarElement);
this.RootElement.Children.Add(ribbonBarElement);
ribbonBarElement.CommandTabSelecting +=
delegate (object sender, CommandTabSelectingEventArgs args) { OnCommandTabSelecting(args); };
ribbonBarElement.CommandTabSelected +=
delegate (object sender, CommandTabEventArgs args) { OnCommandTabSelected(args); };
ribbonBarElement.ExpandedStateChanged += delegate (object sender, EventArgs args)
{
this.OnRibbonBarExpandedStateChanged(args);
};
}
}
public class CustomRadRibbonBarElement : RadRibbonBarElement
{
protected override float GetMaximumTabContentHeight()
{
return 104;
}
}
To reproduce: - Add a word, press tab the add another word. - Export the document using HtmlFormatProvider. - Import the same document. - The tab is interpreted like 7 spaces.
How to reproduce: check the attached video
Workaround:
public partial class Form1 : Form
{
private RadButtonElement buttonHeader;
private RadButtonElement buttonFooter;
public Form1()
{
InitializeComponent();
this.buttonHeader = (RadButtonElement)this.richTextEditorRibbonBar1.GetType().GetField("buttonHeader", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.richTextEditorRibbonBar1);
this.buttonFooter = (RadButtonElement)this.richTextEditorRibbonBar1.GetType().GetField("buttonFooter", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.richTextEditorRibbonBar1);
this.radRichTextEditor1.RichTextBoxElement.IsInHeaderFooterEditModeChanged += RichTextBoxElement_IsInHeaderFooterEditModeChanged;
}
private void RichTextBoxElement_IsInHeaderFooterEditModeChanged(object sender, EventArgs e)
{
if (!this.radRichTextEditor1.RichTextBoxElement.IsInHeaderFooterEditMode)
{
this.buttonHeader.Enabled = true;
this.buttonFooter.Enabled = true;
}
else
{
this.buttonHeader.Enabled = false;
this.buttonFooter.Enabled = false;
}
}
}
Workaround:
private void ClearDictionaries(RadRichTextEditor editor)
{
var dictionaries = typeof(DocumentSpellChecker).GetField("dictionaries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(editor.SpellChecker) as Dictionary<CultureInfo, Lazy<IWordDictionary>>;
dictionaries.Clear();
var customDictionaries = typeof(DocumentSpellChecker).GetField("customDictionaries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(editor.SpellChecker) as Dictionary<CultureInfo, ICustomWordDictionary>;
customDictionaries.Clear();
}