To reproduce:
Me.RadDateTimePicker1.Format = DateTimePickerFormat.Custom
Me.RadDateTimePicker1.CustomFormat = "MM/dd/yyyy"
Dim provider As MaskDateTimeProvider = TryCast(Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider)
provider.AutoSelectNextPart = True
If you type in 01/01/50, RadDateTimePicker displays 01/01/1950 which is correct. If you type in 01/01/2050, the system is again changing the century and display 01/01/1950 which is incorrect.
Workaround: use a custom mask provider to customize how the autocompletion work:
Public Class CustomMaskDateTimeProvider
Inherits Telerik.WinControls.UI.MaskDateTimeProvider
Public Sub New(mask As String, culture As CultureInfo, owner As RadMaskedEditBoxElement)
MyBase.New(mask, culture, owner)
End Sub
Protected Overrides Function HandleKeyPress(part As MaskPart, e As KeyPressEventArgs) As Boolean
Dim value As Integer = 0
If Not Integer.TryParse(e.KeyChar.ToString(), value) Then
Return True
End If
Dim stringValue As String = String.Empty
If part.type = PartTypes.MiliSeconds Then
Dim newValue As Integer = CInt((part.value / Math.Pow(10, (3 - part.len)))) * 10 + value
part.value = newValue Mod CInt(Math.Pow(10, part.len))
Else
stringValue = part.value.ToString()
If stringValue.Length = part.len AndAlso stringValue.Length >= part.maskPart.Length Then
stringValue = stringValue.Substring(1)
End If
If Me.AutoCompleteYear AndAlso stringValue.Length = 1 Then
stringValue = String.Empty
End If
part.value = Integer.Parse(stringValue & e.KeyChar)
End If
If part.type = PartTypes.Year AndAlso part.maskPart.Length = 2 Then
Dim len As Integer = part.value.ToString().Length
part.value = Integer.Parse(String.Format("{0}{1}", DateTime.Now.Year.ToString().Substring(0, 2), part.value.ToString().Substring(len - 2, 2)))
End If
If Me.AutoCompleteYear AndAlso part.type = PartTypes.Year Then
Dim len As Integer = part.value.ToString().Length
If len >= 2 Then
part.value = Integer.Parse(part.value.ToString().Substring(len - 2, 2))
End If
'If part.value >= 50 AndAlso part.value <= 99 Then
' part.value += 1900
'ElseIf part.value >= 500 AndAlso part.value <= 999 Then
' part.value += 1000
'ElseIf part.value < 50 OrElse (part.value > 99 AndAlso part.value < 500) Then
part.value += 2000
' End If
End If
If part.value > part.max OrElse part.value < part.min Then
part.value = value
End If
Return True
End Function
End Class
Me.RadDateTimePicker1.Format = DateTimePickerFormat.Custom
Me.RadDateTimePicker1.CustomFormat = "MM/dd/yyyy"
Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider = New CustomMaskDateTimeProvider(Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Mask, Me.RadDateTimePicker1.Culture, Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement)
Dim provider As MaskDateTimeProvider = TryCast(Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider)
provider.MaxDate = Me.RadDateTimePicker1.DateTimePickerElement.MaxDate
provider.AutoSelectNextPart = True
provider.AutoCompleteYear = True
Thus, the year always be 2000+.
To reproduce: please refer to the attached sample project and gif file. Workaround: this.radTextBox1.MinimumSize = new System.Drawing.Size(0, 25); or Use RadTextBoxControl
To reproduce:
this.radTextBox1.NullText = "text";
this.radTextBox1.TextBoxElement.TextBoxItem.NullTextColor = Color.Red;
Workaround: this.radTextBox1.TextBoxElement.NullTextColor = Color.Red;
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.
RadDataLayout.LayoutControl has Text property and it is not relevant to show RadMarkupEditor when changing the text.
To reproduce: radMaskedEditBox1.MaskType = MaskType.Numeric; radMaskedEditBox1.Mask = "G"; Then enter 123.45 Workaround: Use "N" mask with fixed decimal places.
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;
The suggestion must popup after every word. There should be an option for positioning the drop down inside the textbox.
Windows TextBox - OSK perfect Telerik RadTextBox - OSK perfect Telerik RadTextBoxControl - OSK doesn't work Telerik RadDropDownList - OSK doesn't work Telerik AutoCompleteBox - OSK doesn't work This should work for all controls that have text input.
Workaround:
public RadForm1()
{
InitializeComponent();
this.radSpinEditor1.SpinElement.TextChanging += SpinElement_TextChanging;
this.radSpinEditor1.TextChanged += radSpinEditor1_TextChanged;
}
private void SpinElement_TextChanging(object sender, Telerik.WinControls.TextChangingEventArgs e)
{
int numericValue = 0;
if (!int.TryParse(e.NewValue, out numericValue))
{
this.radSpinEditor1.Tag = e.OldValue;
e.Cancel = false;
}
}
private void radSpinEditor1_TextChanged(object sender, EventArgs e)
{
if (this.radSpinEditor1.Tag != null)
{
this.radSpinEditor1.SpinElement.Text = this.radSpinEditor1.Tag.ToString();
this.radSpinEditor1.Tag = null;
}
}
The Free Form Date Time Parsing of a RadTimePicker is not able to recognize "hhmm" as an legit value (ex. 1030 for half pas ten). This improvement could be nice, as it is a common way to write an time. It is working in Outlook Appointement Form.
How to reproduce: run the attached project on a system with an increased scaling - 200%
Workaround: the null text needs to be set at run-time and after subscribe the control to the CreateTextBlock event
public class MyTextBlock : TextBlockElement
{
public override void DpiScaleChanged(SizeF scaleFactor)
{
base.DpiScaleChanged(scaleFactor);
this.ResetLayoutCore();
}
}
this.radTextBoxControl1.TextBoxElement.CreateTextBlock += this.RadTextBoxControl1_CreateTextBlock;
private void RadTextBoxControl1_CreateTextBlock(object sender, CreateTextBlockEventArgs e)
{
e.TextBlock = new MyTextBlock();
}
To reproduce: run the attached project, enter some text in the upper RichTextBox and use the buttons to style parts of the text. Click the Save button and you will notice that after correcting the words, the style is not preserved. Workaround: use RadRichTextEditor which has a built-in spell checking functionality: http://docs.telerik.com/devtools/winforms/richtexteditor/features/spellcheck
How to reproduce: add a spellchecker to the form and configure it to spellcheck a multi line text box with a very long text. Workaround: use RadTextBoxControl
How to reproduce: check the attached project and video
Workaround: set a minimum size to the control
public partial class RadForm1 : RadForm
{
public RadForm1()
{
InitializeComponent();
this.radTextBox1.MinimumSize = new Size(0, 20);
}
}
To reproduce: please refer to the attached sample screenshots and project.
Note: this issue is relevant for RadDropDownList as well.
Workaround:
this.radDropDownList2.DropDownListElement.TextBox.TextBoxItem.Multiline = true;
this.radDropDownList2.DropDownListElement.TextBox.TextBoxItem.MinSize = new Size(30, 15);
How to reproduce: radDateTimePicker1.DateTimePickerElement.ShowTimePicker = true; radDateTimePicker1.Format = DateTimePickerFormat.Custom; radDateTimePicker1.DateTimePickerElement.CalendarSize = new Size(330, 250); radDateTimePicker1.ReadOnly = true; Workaround: this.radDateTimePicker1.DateTimePickerElement.ShowTimePicker = true; this.radDateTimePicker1.Format = DateTimePickerFormat.Custom; this.radDateTimePicker1.DateTimePickerElement.CalendarSize = new Size(330, 250); this.radDateTimePicker1.ReadOnly = true; RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar; calendarBehavior.TimePicker.TimePickerElement.ReadOnly = true;
1. Provide the 'Ignore' button above the 'Ignore All' button 2. If no text is entered in the 'Change To' text field and the 'Change' button is clicked, the highlighted suggestion should be used instead. 3. After the 'Change' button is clicked, the 'Change To' text box should be cleared so that users don't have to delete the text string before entering something else.