To reproduce: RadSpellChecker radSpellChecker1 = new RadSpellChecker(); public Form1() { InitializeComponent(); RadTextBox radTextBox1 = new RadTextBox(); radTextBox1.Location = new Point(10, 10); this.Controls.Add(radTextBox1); this.radSpellChecker1.AutoSpellCheckControl = radTextBox1; } 1. Enter some valid text. 2. Select the content and right click with the mouse in order to copy the text by using the default context menu. However, the menu does not show. Note: if the control is not spellchecked, it shows default context menu associated with MS TextBox. Workaround: display your own menu with copy/paste options when no misspelled words are available. RadContextMenu menu = new RadContextMenu(); public TestSpellchecker() { InitializeComponent(); RadMenuItem copyItem = new RadMenuItem("Copy"); copyItem.Click += copyItem_Click; menu.Items.Add(copyItem); RadMenuItem pasteItem = new RadMenuItem("Paste"); pasteItem.Click += pasteItem_Click; menu.Items.Add(pasteItem); this.radTextBox1.TextBoxElement.TextBoxItem.TextBoxControl.MouseDown += TextBoxControl_MouseDown; } private void pasteItem_Click(object sender, EventArgs e) { this.radTextBox1.Paste(); } private void copyItem_Click(object sender, EventArgs e) { this.radTextBox1.Copy(); } static Regex wordParser = new Regex(@"[\p{L}\p{N}\p{M}]+(?:[-.'ยด_@][\p{L}|\p{N}|\p{M}]+)*", RegexOptions.Compiled); private void TextBoxControl_MouseDown(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { TextBoxSpellChecker tbSpellChecker = this.radSpellChecker1.GetControlSpellChecker(typeof(RadTextBoxControl)) as TextBoxSpellChecker; MatchCollection words = wordParser.Matches(this.radTextBox1.Text); bool containsError = false; foreach (Match word in words) { string text = word.Captures[0].Value; if (!tbSpellChecker.SpellChecker.CheckWordIsCorrect(text, System.Threading.Thread.CurrentThread.CurrentCulture)) { containsError = true; break; } } if (!containsError) { menu.Show(this.radTextBox1, new Point(0,0)); } } }
Using UI for WinForms R3 2017 (version 2017.3.912) Strange behavior while selecting text with the mouse, while TextAlign is set to Right and there is more text then visible. To reproduce try selecting all the text in the control from the attached file (once to the left, once to the right). If the ShowClear button is visible and RihtToLeft is true, it won't select to the left (while there is more text than visible). RadTextBoxControl radTextBoxControl1 = new Telerik.WinControls.UI.RadTextBoxControl(); this.radTextBoxControl1.Location = new System.Drawing.Point(239, 186); this.radTextBoxControl1.Name = "radTextBoxControl1"; this.radTextBoxControl1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.radTextBoxControl1.ShowClearButton = true; this.radTextBoxControl1.Size = new System.Drawing.Size(64, 20); this.radTextBoxControl1.TabIndex = 6; this.radTextBoxControl1.Text = "123456789123456789"; this.radTextBoxControl1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
This behavior can be observed in the Office2010 theme. In the following image, the button's width in RadCalculatorDropDown and RadSpinEditor is less by 1 px compared to the buttons in the other editor controls.
To reproduce: Create a Windows Forms project - Add a RadDock. - Add 1 DocumentWindow and 1 ToolWindow to the RadDock control. - Add a RadTextBoxControl to the DocumentWindow. Give it a height that will allow you to easily scroll. - Run the application and enter enough text into the text box to make the scrollbar appear. - Scroll to the bottom of the textbox. - Minimize the application. Workaround: public class MyScroller : TextBoxScroller { public MyScroller(RadScrollBarElement scrollbar) : base(scrollbar) { } public override int Value { get { return base.Value; } set { if (value < this.MaxValue) { base.Value = value; } } } } Change it as follows: radTextBoxControl1.TextBoxElement.ViewElement.VScroller = new MyScroller(radTextBoxControl1.TextBoxElement.VScrollBar);
The issue can be reproduced with custom regional settings and the following mask: dd/MM/yyyy Workaround: if possible please reset the DateTime region settings
Set the property to the hosted textbox instead: Me.RadSpinEditor1..SpinElement.TextBoxItem.TabStop = False or create a custom control: Public Class MyRadSpinEditor Inherits RadSpinEditor <DefaultValue(True)> Public Overloads Property TabStop As Boolean Get If Me.SpinElement.TextBoxItem IsNot Nothing Then Return Me.SpinElement.TextBoxItem.TabStop End If Return MyBase.TabStop End Get Set(ByVal value As Boolean) If Me.SpinElement.TextBoxItem IsNot Nothing Then MyBase.TabStop = False Me.SpinElement.TextBoxItem.TabStop = value Return End If MyBase.TabStop = value End Set End Property End Class
To reproduce: this.radDateTimePicker1.Format = DateTimePickerFormat.Custom; this.radDateTimePicker1.CustomFormat = "MM/yyyy"; this.radDateTimePicker1.Value = new DateTime(2016, 01, 31); Select the month part and try to change it to 02. Workaround: initialize with the first day of the month.
Workaround: this.radSpinEditor1.CausesValidation = false; ((TextBox)this.radSpinEditor1.SpinElement.TextBoxItem.HostedControl).CausesValidation = false;
RadSpellChecker is also using MEF to load the default dictionary: https://docs.microsoft.com/en-us/dotnet/framework/mef/attributed-programming-model-overview-mef If MEF fails the dictionary will not load and the control will not spell check.
To reproduce: - Set the mask to regex and paste with Ctrl + V. Workaround: private void RadmaskedEditBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\x16') { radmaskedEditBox1.MaskedEditBoxElement.TextBoxItem.Paste(); } }
How to reproduce: public Form1() { InitializeComponent(); this.radMaskedEditBox1.Culture = new CultureInfo("ar-EG"); this.radMaskedEditBox1.Mask = "c"; this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Numeric; } Workaround: handle the KeyDown event private void radMaskedEditBox1_KeyDown(object sender, KeyEventArgs e) { if (this.radMaskedEditBox1.SelectionLength == this.radMaskedEditBox1.Text.Length) { this.radMaskedEditBox1.SelectionLength = 0; } }
The suggestion must popup after every word. There should be an option for positioning the drop down inside the textbox.
Steps to reproduce: public Form1() { InitializeComponent(); this.Text = Telerik.WinControls.VersionNumber.Number; this.radMaskedEditBox1.Culture = new System.Globalization.CultureInfo("nl-BE"); this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Numeric; this.radMaskedEditBox1.Mask = "C"; this.radMaskedEditBox1.Value = 570.00; } private void radButton2_Click(object sender, EventArgs e) { this.radMaskedEditBox1.Culture = new System.Globalization.CultureInfo("en-US"); } private void radButton1_Click(object sender, EventArgs e) { this.radMaskedEditBox1.Culture = new System.Globalization.CultureInfo("nl-BE"); } Run the application and change the culture between Dutch and English, you will see that the value is reset instead keep it. Workaround: CultureInfo providerDutch = new CultureInfo("nl-BE"); CultureInfo providerEnglish = new CultureInfo("en-US"); public Form1() { InitializeComponent(); this.Text = Telerik.WinControls.VersionNumber.Number; this.radMaskedEditBox1.Culture = providerDutch; this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Numeric; this.radMaskedEditBox1.Mask = "C"; this.radMaskedEditBox1.Value = 570.00; } private void radButton1_Click(object sender, EventArgs e) { double tempValue = double.Parse(this.radMaskedEditBox1.Value.ToString(), NumberStyles.Currency | NumberStyles.AllowThousands | NumberStyles.AllowDecimalPoint, providerEnglish); this.radMaskedEditBox1.Culture = new System.Globalization.CultureInfo("nl-BE"); this.radMaskedEditBox1.Value = tempValue; } private void radButton2_Click(object sender, EventArgs e) { double tempValue = double.Parse(this.radMaskedEditBox1.Value.ToString(), NumberStyles.Currency | NumberStyles.AllowThousands | NumberStyles.AllowDecimalPoint, providerDutch); this.radMaskedEditBox1.Culture = new System.Globalization.CultureInfo("en-US"); this.radMaskedEditBox1.Value = tempValue; }
To reproduce: Using the below code, type something in the text box and execute the button shortcut => the caret remains where it was protected override void OnLoad(EventArgs e) { base.OnLoad(e); AddTextBoxControl(); radButton1.ButtonElement.Shortcuts.Add(new RadShortcut(Keys.Alt, new Keys[] { Keys.R })); } private void radButton1_Click(object sender, EventArgs e) { radTextBoxControl1.Text = ""; } Workaround: Instead of setting the Text to empty string, use the control Clear method.
How to reproduce: Set the AutoSpellCheckControl property of the spell checker and use it in a DPI-aware application on a system with an increased scaling. Type an incorrect and notice that the context menu will not be scaled. Workaround: Public Class RadForm1 Sub New() InitializeComponent() 'TextBox Me.RadSpellChecker1.AutoSpellCheckControl = Me.TextBox1 Dim dpi = NativeMethods.GetSystemDpi() Dim checker = TryCast(Me.RadSpellChecker1.GetControlSpellChecker(GetType(TextBox)), TextBoxSpellChecker) checker.DropDownMenu.PopupElement.DpiScaleChanged(New SizeF(dpi.X / 96, dpi.Y / 96)) 'RadTextBox 'Me.RadSpellChecker1.AutoSpellCheckControl = Me.RadTextBox1 'Dim dpi = NativeMethods.GetSystemDpi() 'Dim checker = TryCast(Me.RadSpellChecker1.GetControlSpellChecker(GetType(RadTextBox)), TextBoxSpellChecker) 'checker.DropDownMenu.PopupElement.DpiScaleChanged(New SizeF(dpi.X / 96, dpi.Y / 96)) End Sub End Class
Workaround: increase the height: this.radTimePicker1.MinimumSize = new Size(0, 28);
To reproduce: please refer to the attached gif file. The error is applicable for all controls that use RadColorDialog while editing, e.g. RadGridView, RadPropertyGrid. Workaround: disable the spineditors: private void RadPropertyGrid1_EditorInitialized(object sender, Telerik.WinControls.UI.PropertyGridItemEditorInitializedEventArgs e) { PropertyGridColorEditor colorEditor = e.Editor as PropertyGridColorEditor; if (colorEditor !=null) { RadColorBoxElement el = colorEditor.EditorElement as RadColorBoxElement; ((RadForm)el.ColorDialog.ColorDialogForm).Load += ColorDialogForm_Load1; } } private void ColorDialogForm_Load1(object sender, EventArgs e) { RadColorDialogForm form = sender as RadColorDialogForm; RadPageView pageView = form.RadColorSelector.Controls["radPageView1"] as RadPageView; Telerik.WinControls.UI.RadColorPicker.ProfessionalColors professionalColors = pageView.Pages[3].Controls["professionalColorsControl"] as Telerik.WinControls.UI.RadColorPicker.ProfessionalColors; foreach (Control c in professionalColors.Controls ) { RadSpinEditor spinEditor = c as RadSpinEditor; if (spinEditor!=null) { spinEditor.SpinElement.TextBoxItem.Enabled = false; } } }
To reproduce: - Add RadMaskedEditBox to a form. - Set AutoSize to false. - Set the height of the control to 30. Workaround: radMaskedEditBox1.AutoSize = false; radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.MinSize = new Size(0, 30);
To reproduce: public Form1() { InitializeComponent(); this.radDateTimePicker1.Culture = new System.Globalization.CultureInfo("en-GB"); RadTimePickerLocalizationProvider.CurrentProvider = new MyTimePickerLocalizationProvider(); this.radDateTimePicker1.DateTimePickerElement.ShowTimePicker = true; } class MyTimePickerLocalizationProvider : RadTimePickerLocalizationProvider { public override string GetLocalizedString(string id) { switch (id) { case RadTimePickerStringId.HourHeaderText: return "TEST Hours"; case RadTimePickerStringId.MinutesHeaderText: return "TEST Minutes"; case RadTimePickerStringId.CloseButtonText: return "TEST CLOSE"; default: return string.Empty; } } } Workaround: RadDateTimePickerCalendar calendarBehaviorFrom = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar; calendarBehaviorFrom.Calendar.ShowFooter = true; calendarBehaviorFrom.PopupControl.Opened += PopupControl_PopupOpened; private void PopupControl_PopupOpened(object sender, EventArgs args) { RadDateTimePickerDropDown dd = sender as RadDateTimePickerDropDown; TimePickerDoneButtonContent buttonContent = ((RadPanel)dd.HostedControl).Controls[2] as TimePickerDoneButtonContent; var doneButton = ((Telerik.WinControls.UI.TimePickerDoneButtonElement)(buttonContent.RootElement.Children[0])); doneButton.ButtonElement.Text = RadTimePickerLocalizationProvider.CurrentProvider.GetLocalizedString(RadTimePickerStringId.CloseButtonText); }