How to reproduce:
public partial class Form1 : Form
{
RadRichTextBox tb1;
RadRichTextBox tb2;
private bool shouldFocus = false;
public Form1()
{
InitializeComponent();
tb1 = new RadRichTextBox();
this.Controls.Add(tb1);
tb2 = new RadRichTextBox();
tb2.Location = new Point(200, 0);
this.Controls.Add(tb2);
this.Load += Form1_Load;
}
private void Form1_Load(object sender, EventArgs e)
{
StyleDefinition style = new StyleDefinition();
tb1.IsReadOnly = true;
tb1.Document.Insert("text 1", style);
tb2.Document.Insert("text 2", style);
tb2.IsReadOnly = true;
}
private void radButton1_Click(object sender, EventArgs e)
{
tb1.IsReadOnly = false;
tb2.IsReadOnly = false;
tb1.Focus();
}
}
Workaround:
public partial class Form1 : Form
{
RadRichTextBox tb1;
RadRichTextBox tb2;
private bool shouldFocus = false;
public Form1()
{
InitializeComponent();
tb1 = new RadRichTextBox();
tb1.GotFocus += tb1_GotFocus;
tb1.LostFocus += tb1_LostFocus;
this.Controls.Add(tb1);
tb2 = new RadRichTextBox();
tb2.Location = new Point(200, 0);
tb2.GotFocus += tb2_GotFocus;
tb2.LostFocus += tb2_LostFocus;
this.Controls.Add(tb2);
this.Load += Form1_Load;
}
private void tb2_LostFocus(object sender, EventArgs e)
{
shouldFocus = false;
tb2.IsReadOnly = true;
}
private void tb2_GotFocus(object sender, EventArgs e)
{
if (shouldFocus)
{
tb2.IsReadOnly = false;
}
}
private void tb1_LostFocus(object sender, EventArgs e)
{
tb1.IsReadOnly = true;
}
private void tb1_GotFocus(object sender, EventArgs e)
{
if (shouldFocus)
{
tb1.IsReadOnly = false;
}
}
private void Form1_Load(object sender, EventArgs e)
{
StyleDefinition style = new StyleDefinition();
tb1.IsReadOnly = true;
tb1.Document.Insert("text 1", style);
tb2.Document.Insert("text 2", style);
tb2.IsReadOnly = true;
}
private void radButton1_Click(object sender, EventArgs e)
{
if (shouldFocus)
{
tb2.Focus();
}
else
{
shouldFocus = true;
tb1.Focus();
}
}
}
To reproduce: - Add some text so the scrollbars appear. - Scroll up and down with the mouse wheel. - When you scroll to the bottom you will notice that there is extra space after the document end. Workaround: http://www.telerik.com/forums/backspace-key-does-not-properly-invalidate-editor#sP5qkJX4b0S8jwZ3MUGTmQ
To reproduce:
Use the following code and then select some text:
private void radButton1_Click(object sender, EventArgs e)
{
TxtFormatProvider txtProvider = new TxtFormatProvider();
RichTextEditor.Document = txtProvider.Import(sampleText);
RichTextEditor.Document.LineSpacingType = LineSpacingType.Exact;
RichTextEditor.Document.LineSpacing =10;
DocumentPosition startPosition = RichTextEditor.Document.CaretPosition;
DocumentPosition endPosition = new DocumentPosition(startPosition);
startPosition.MoveToStartOfDocumentElement(RichTextEditor.Document);
endPosition.MoveToEndOfDocumentElement(RichTextEditor.Document);
RichTextEditor.Document.Selection.Clear();
RichTextEditor.Document.Selection.AddSelectionStart(startPosition);
RichTextEditor.Document.Selection.AddSelectionEnd(endPosition);
RichTextEditor.RichTextBoxElement.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Segoe UI"));
RichTextEditor.RichTextBoxElement.ChangeFontSize(Unit.PointToDip(10));
RichTextEditor.Document.Selection.Clear();
}
Workaround:
RichTextEditor.Document.LineSpacingType = LineSpacingType.Auto;
RichTextEditor.Document.LineSpacing =.5;
To reproduce: 1. Install a font that is not part of the default ones. 2. Enter some text in RadRichTextEditor and use the installed font. 3. Export to pdf. 4. Uninstall the font. 5. Try to open the exported pdf. You will notice that the font is not embedded into the file and can not render the text correctly. Please refer to the attached sample pdf file with custom font.
Trying to export a document which contains hyperlink pasted from Outlook throws KeyNotFoundException. The color of the span is not registered.
Workaround:
Telerik.WinForms.Documents.Model.Styles.StyleDefinition style = new Telerik.WinForms.Documents.Model.Styles.StyleDefinition("test", Telerik.WinForms.Documents.Model.Styles.StyleType.Character);
style.SpanProperties.ForeColor = Color.FromArgb(5,99,193);
this.radRichTextEditor1.Document.StyleRepository.Add(style);
If I drag&drop a RadRichTextEditor i want a wizard like the RichTextBox-WPF-Control. I don't like the ribbon style, because I need a compact editor. So I like the CommandBarStrip look of the "command bar ui"-demo or the ASP.NET Editor.
Merge all assemblies exept Telerik.WinControls.UI.Design.dll. Use the merged assembly in an application with RichTextEditorRibbonBar. The icons are missing.
- There should be a formatting symbol for the character - Pressing Ctrl+Shift+Space should insert the character (standard MS Word shortcut) - Import from docx should be implemented - The symbol should be treated as a separator between words when spell-checking
How to reproduce:
private void radButton1_Click(object sender, EventArgs e)
{
RadPrintDocument doc = new RadPrintDocument();
doc.Margins = new Margins(0, 0, 10, 10);
doc.AssociatedObject = this.radRichTextEditor1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog();
dialog.Document = doc;
dialog.ShowDialog();
}
Workaround: apply the margins on the document loaded in the editor
private void radButton1_Click(object sender, EventArgs e)
{
RadPrintDocument doc = new RadPrintDocument();
this.radRichTextEditor1.Document.SectionDefaultPageMargin = new Telerik.WinForms.Documents.Layout.Padding(0, 0, 10, 10);
doc.AssociatedObject = this.radRichTextEditor1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog();
dialog.Document = doc;
dialog.ShowDialog();
}
"http://" prefix is automatically added by the Insert Hyperlink Dialog when the provided URI is to local path or mapped drive, e.g. "Z:\temp". Workaround 1: Set HyperlinkPattern to something that matches file paths, e.g.: (this.radRichTextEditor1.RichTextBoxElement.InsertHyperlinkDialog as InsertHyperlinkDialog).HyperlinkPattern = ".*"; Workaround 2: Insert such paths with the "file://" prefix.
Se the attached video to reproduce.
How to reproduce: simply configure Polish keyboard and press [ALT GR] + [C], the added text is "©ć". The expected behavior would be to only add "ć"
Workaround: Handle the CommandExecuting event:
private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if (e.Command is InsertTextCommand && e.CommandParameter.ToString() == "©")
{
e.Cancel = true;
}
}
How to reproduce: check the attached project and video
Workaround: create a custom RichTextEditorRibbonBar
Public Class CustomRichTextEditorRibbonBar
Inherits RichTextEditorRibbonBar
Protected Overrides Sub HandleFontStylePropertiesOnCurrentEditingStyleChanged()
If Me.dropDownListFont.BindingContext Is Nothing Then
Me.dropDownListFont.BindingContext = Me.BindingContext
End If
If Me.dropDownListFontSize.BindingContext Is Nothing Then
Me.dropDownListFontSize.BindingContext = Me.BindingContext
End If
MyBase.HandleFontStylePropertiesOnCurrentEditingStyleChanged()
End Sub
End Class