Sometimes when copying from word is duplicating some parts of the text.
1 - Open the Telerik WinForms Demo Application;
2 - Go to RichTextEditor;
3 - Click on First Look;
4 - Delete All the text (Ctrl + A then Delete);
5 - Open the word document Attached;
6 - Select Everything (Ctrl + A) and copy;
7 - Paste on the RichTextEditor;
8 - The end of the second paragraph is duplicated;
Use attached to reproduce:
- click on the second tab
- collapse the first group
- click the first tab
- click the second tab, both grids are visible
Workaround:
public RadForm1()
Environment: Telerik WinForms 2018.3.1016.40, VS 2013 Pro U5, Win 10 Ent 64 1809 17763.195
Steps:
Create a new WinForm project with default settings
Add a RadForm with default settings
Add a RadScrollablePanel to the RadForm with default settings
Add a RadPanel inside the RadScrollablePanel with default settings
Add a 3 RadRadioButtons to the RadScrollablePanel with default settings
Select all 3
Press Ctrl+X to cut the radio buttons.
Actual Result: Visual Studio will immediately hang and any unsaved project work will be lost.
Actual Desire: To be able cut and paste the 3 radio buttons into the RadPanel, just like normal MS WinForm controls in design-time.
To reproduce:
- Open the Excel-like filtering example in the demo application and sort the second column.
- The sort icon is over the text.
Workaround:
private void RadGridView1_SortChanged(object sender, Telerik.WinControls.UI.GridViewCollectionChangedEventArgs e)
To reproduce:
- Set the MaxDropDownItems and the DefaultItemsCountInDropDown and open the popup on HDPI.
Until released the text can be cleared this way:
GridSearchCellElement searchCell = this.radGridView1.TableElement.FindDescendant<GridSearchCellElement>();
How to reproduce: create the following custom cell and notice that the collapsed elements would still occupy space inside the cell. Check the attached screenshot public class PNUDFCellElement : GridDataCellElement { public PNUDFCellElement(GridViewColumn column, GridRowElement row) : base(column, row) { } private CustomStackLayoutElement stack; private RadDropDownListElement radDropDownListElement; private RadDateTimeEditorElement radDateTimeEditorElement; private RadTextBoxControlElement radTextBoxElement; protected override void CreateChildElements() { base.CreateChildElements(); stack = new CustomStackLayoutElement(); stack.StretchHorizontally = true; stack.Orientation = Orientation.Horizontal; radDropDownListElement = new RadDropDownListElement(); radDropDownListElement.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; radDropDownListElement.StretchHorizontally = true; radDateTimeEditorElement = new RadDateTimeEditorElement(); radDateTimeEditorElement.StretchHorizontally = true; radTextBoxElement = new RadTextBoxControlElement(); radTextBoxElement.StretchHorizontally = true; stack.Children.Add(radDropDownListElement); stack.Children.Add(radDateTimeEditorElement); stack.Children.Add(radTextBoxElement); this.Children.Add(stack); } protected override void SetContentCore(object value) { this.radDropDownListElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; this.radTextBoxElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; this.radDateTimeEditorElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; this.DrawText = false; if (this.RowIndex % 3 == 0) { this.radDropDownListElement.Visibility = Telerik.WinControls.ElementVisibility.Visible; this.radDropDownListElement.Text = this.Value + ""; } else if (this.RowIndex % 3 == 1) { this.radTextBoxElement.Visibility = Telerik.WinControls.ElementVisibility.Visible; this.radTextBoxElement.Text = this.Value + ""; } else { this.radDateTimeEditorElement.Visibility = Telerik.WinControls.ElementVisibility.Visible; } base.SetContentCore(value); } } public class CustomDataColumn : GridViewDataColumn { public CustomDataColumn(string fieldName) : base(fieldName) { } public override Type GetCellType(GridViewRowInfo row) { if (row is GridViewDataRowInfo) { return typeof(PNUDFCellElement); } return base.GetCellType(row); } } Workaround: use a custom StackLayoutElemetn public class CustomStackLayoutElement : StackLayoutElement { protected override void ArrangeHorizontally(SizeF finalSize) { RectangleF clientRect = this.GetClientRectangle(finalSize); float stretchableWidth = 0; int stretchableCount = 0; int nonStretchableItems = 0; foreach (RadElement element in this.Children) { if (element.Visibility == ElementVisibility.Collapsed) { continue; } if (element.StretchHorizontally) { stretchableCount++; } else { stretchableWidth += element.DesiredSize.Width; nonStretchableItems++; } } if (nonStretchableItems > 0) { stretchableWidth += ElementSpacing * (nonStretchableItems - 1); } int spacing = this.ElementSpacing; if (stretchableCount > 0) { stretchableWidth = (clientRect.Width - stretchableWidth) / stretchableCount; stretchableWidth -= spacing * stretchableCount; } ArrangeItemsHorizontaly(clientRect, finalSize, stretchableWidth, spacing); } protected override void ArrangeItemsHorizontaly(RectangleF clientRect, SizeF finalSize, float stretchableWidth, float spacing) { float x = clientRect.X; float y = clientRect.Y; List<RadElement> children = new List<RadElement>(this.Children); if (this.Comparer != null) { children.Sort(this.Comparer); } for (int i = 0; i < children.Count; i++) { RadElement element = null; if (this.RightToLeft && this.RightToLeftMode == RightToLeftModes.ReverseItems) { element = children[children.Count - i - 1]; } else { element = children[i]; } if (element.Visibility == ElementVisibility.Collapsed) { continue; } RectangleF proposedRect = new RectangleF(x, y, stretchableWidth, clientRect.Height); RectangleF finalRect = AlignRect(element, proposedRect); if (this.RightToLeft && this.RightToLeftMode == RightToLeftModes.ReverseOffset) { finalRect.X = finalSize.Width - x - finalRect.Width; } this.ArrangeElement(element, clientRect, finalRect, finalSize); x += finalRect.Width + spacing; } } }
To reproduce: run the sample project, open the test.rtf file and start scrolling with the mouse. As a result, you will encounter the following error: ************** Exception Text ************** System.ArgumentException: Parameter is not valid. at System.Drawing.Image.get_RawFormat() at System.Drawing.Graphics.IgnoreMetafileErrors(Image image, Int32& errorStatus) at System.Drawing.Graphics.DrawImage(Image image, Single x, Single y, Single width, Single height) at System.Drawing.Graphics.DrawImage(Image image, RectangleF rect) at Telerik.WinControls.RichTextEditor.UI.GDIPaintingContext.DrawImage(Image image, RectangleF rectangle, Double opacity) at Telerik.WinControls.RichTextEditor.UI.Image.PaintCore(IPaintingContext context) at Telerik.WinControls.RichTextEditor.UI.UIElement.Paint(IPaintingContext context) at Telerik.WinControls.RichTextEditor.UI.FrameworkElement.PaintElement(IGraphics graphics, Single angle, SizeF scale) at Telerik.WinControls.RadElement.DoOwnPaint(IGraphics graphics, Single angle, SizeF scale) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation) at Telerik.WinControls.RadControl.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at Telerik.WinControls.RadControl.WndProc(Message& m) at Telerik.WinControls.UI.RadRichTextEditor.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Workaround: this.radChat1.ChatElement.InputTextBox.TextBoxItem.TextBoxControl.Multiline = true; this.radChat1.ChatElement.InputTextBox.ButtonsStack.Children.Remove(this.radChat1.ChatElement.ShowToolbarButtonElement); this.radChat1.ChatElement.InputTextBox.ButtonsStack.Children.Remove(this.radChat1.ChatElement.SendButtonElement); StackLayoutElement stack = new StackLayoutElement(); stack.MinSize = new Size(0, 60); this.radChat1.ChatElement.InputTextBox.Parent.Children.Add(stack); this.radChat1.ChatElement.InputTextBox.Parent.Children.Remove(this.radChat1.ChatElement.InputTextBox); stack.StretchHorizontally = true; stack.Orientation = Orientation.Horizontal; stack.Children.Add(this.radChat1.ChatElement.InputTextBox); stack.Children.Add(this.radChat1.ChatElement.ShowToolbarButtonElement); stack.Children.Add(this.radChat1.ChatElement.SendButtonElement); this.radChat1.ChatElement.ShowToolbarButtonElement.StretchHorizontally = false; this.radChat1.ChatElement.SendButtonElement.StretchHorizontally = false;
Added in the R3 2018 release: https://docs.telerik.com/devtools/winforms/forms-and-dialogs/form-converter
Note: other operations that affect the image's size should also handle large images. No Workaround. It is possible to create a custom resize dialog as follows: public class MyRadImageEditor : RadImageEditor { protected override RadImageEditorElement CreateImageEditorElement() { return new MyRadImageEditorElement(); } } public class MyRadImageEditorElement : RadImageEditorElement { public override void ShowResizeDialog() { this.ShowDialog(typeof(MyResizeDialog)); } } public class MyResizeDialog : RadForm { public MyResizeDialog(RadImageEditorElement imageEditorElement) { } //TODO custom dialog }
To reproduce: public RadForm1() { InitializeComponent(); var a = new Author(null, "John"); for (int i = 0; i < 20; i++) { radChat1.AddMessage(new ChatTextMessage("Item" + i, a, DateTime.Now.AddDays(-(20 - i)))); } new Telerik.WinControls.RadControlSpy.RadControlSpyForm().Show(); this.radChat1.ChatElement.MessagesViewElement.TimeSeparatorInterval = TimeSpan.FromDays(1); } You will notice that there is today in several places. Workaround: this.radChat1.ChatElement.MessagesViewElement.TimeSeparatorInterval = TimeSpan.Zero; var a = new Author(null, "Forest Gump"); for (int i = 0; i < 20; i++) { radChat1.AddMessage(new ChatTextMessage("Item" + i, a, DateTime.Now.AddDays(-(20 - i)))); ChatTimeSeparatorDataItem separator = new ChatTimeSeparatorDataItem(new ChatTimeSeparatorMessage(DateTime.Now.AddDays(-(20 - i)))); radChat1.ChatElement.MessagesViewElement.Items.Add(separator); }