To reproduce:
Change the scaling to 200% or larger.
Set the animation:
this.commandBarToggleButton1.UseDefaultDisabledPaint = true;
Please refer to the attached sample project and follow the steps illustrated in the attached gif file.
Workaround: initialize a new RadDateTimePicker every time you toggle the checkbox:
Dim location As Point
To reproduce the issue:
1. Add a RadDateTimePicker control to a Windows Forms application.
2. Use the "ar-SA" culture.
3. Attempt to manually enter a date in the RadDateTimePicker control using letters or special characters.
Dim hijriCulture As New CultureInfo("ar-SA")
hijriCulture.DateTimeFormat.Calendar = New HijriCalendar()
RadDateTimePicker1.Format = DateTimePickerFormat.Custom
RadDateTimePicker1.Culture = hijriCulture
Please use the following code snippet. The user should be allowed to resize the drop down within the specified range as it is illustrated in the gif file:
RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
calBehavior.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
calBehavior.DropDownMinSize = new Size(400, 400);
calBehavior.DropDownMaxSize = new Size(600, 600);
Currently, the user is allowed to shrink the width, but not the height.
Workaround:
public RadForm1()
{
InitializeComponent();
//this.radDateTimePicker1.CalendarSize = new Size(500, 500);
RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
calBehavior.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
calBehavior.DropDownMinSize = new Size(400, 400);
calBehavior.DropDownMaxSize = new Size(600, 600);
this.radDateTimePicker1.Opened+=radDateTimePicker1_Opened;
}
private void radDateTimePicker1_Opened(object sender, EventArgs e)
{
RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
calBehavior.PopupControl.MinimumSize= calBehavior.DropDownMinSize;
}
NOTE: This is my second attempt to get a response from the support team. I am paying for Priority Support, but the ticket below has gone unanswered:
https://feedback.telerik.com/winforms/1487329-popup-calendar-in-raddatetimepicker-does-not-scale-correctly-on-high-dpi-display
See attached screenshot. The popup calendar looks wrong when running on a display with 250% scaling. Surely, that's not correct. The calendar should not be so large and the fonts so small. Am I missing something? I have done all the other steps to enable High DPI support, and as you can see, the textbox area seems to scale fine.
Any ideas? And thanks for your help.
David
After the installation of the latest update (Version 2021.1.122.40) for "Telerik UI for WinForms", our Formulardesigner throws a NullReferenceException during instanciating a Telerik.WinControls.UI.RadDateTimePicker.
Stacktrace:
bei Telerik.WinControls.UI.Design.DesignTimeThemeSettingsService.GetActiveProject(_DTE dte)
bei Telerik.WinControls.UI.Design.DesignTimeThemeSettingsService.get_ActiveProject()
bei Telerik.WinControls.UI.Design.DesignTimeThemeSettingsService.get_Configuration()
bei Telerik.WinControls.UI.Design.DesignTimeThemeSettingsService.Start()
bei Telerik.WinControls.UI.Design.RadControlDesignerLite.Initialize(IComponent component)
bei System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
bei System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
bei System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
bei Formulardesigner.Loader.FormularDesignerLoader.CreateDesignerControl(IDesignerLoaderHost host, Control controlDefinition, PersistedSettings persistedSettings)
What is changed and how can we solve that?
Add a RadDateTimePicker to the form and use the following code snippet:
public RadForm1() { InitializeComponent(); RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar; calendarBehavior.ShowTimePicker = true; calendarBehavior.PopupControl.PopupOpening += PopupControl_PopupOpening; this.radDateTimePicker1.Opening+=radDateTimePicker1_Opening; } //It is fired private void PopupControl_PopupOpening(object sender, CancelEventArgs args) { Console.WriteLine("PopupControl_PopupOpening"); } //It is not fired is ShowTimePicker=true private void radDateTimePicker1_Opening(object sender, CancelEventArgs e) { Console.WriteLine("radDateTimePicker1_Opening"); }
You will notice that the RadDateTimePicker.Opening event is not fired if the ShowTimePicker property is enabled.
Workaround: feel free to use the PopupControl.PopupOpening event.
Here is how it looks at 200 % DPI:
The selected date is 2024 Feb 29. A custom date format is applied to the control:
this.radDateTimePicker1.Format = DateTimePickerFormat.Custom;
this.radDateTimePicker1.CustomFormat = "yyyy";
When trying to change the date, an ArgumentOutOfRangeException exception is thrown.