This is a migrated thread and some comments may be shown as answers.

Time Format While Manually Resizing an Appointment

3 Answers 96 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 12 Sep 2011, 09:13 PM
Hi,
I have successfully changed the date/time formats used throughout my app (including Telerik controls) by using the following lines:

Thread.CurrentThread.CurrentCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd";
Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongDatePattern = "yyyy-MM-dd";
Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortTimePattern = "HH:mm";
Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern = "HH:mm:ss";

However, there is still one instance where the ScheduleView stubbornly refuses to use my formats: when I click on an appoinment's edge and hold the mouse button to resize the appointment, previews are shown for both the start time and end time, but those previews use the AM/PM format. Is there a way to change that ?

Thanks,
Sebastien

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 14 Sep 2011, 01:16 PM
Hello Sébastien,

You should set DragDropHighlightStyle property of the ScheduleView and change the string format in its template.

You can get the source code of DragDropHighlightStyle  from the RadControls installation folder on your computer (usually it is C:\Program Files\Telerik\RadControls for WPF Q2 2011 ) - go to Themes folder and select the theme that you use in your application. Drill down to find the ScheduleView.xaml file in that directory. From this resource dictionary you can extract the DragDropHighlightStyle and any needed resources that it uses.

Hope this helps.

Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Sébastien
Top achievements
Rank 1
answered on 14 Sep 2011, 03:06 PM
Hi !
Thanks for the hint, however I also had to set the ResizeHighlightStyle for my case.
You should consider fixing this though, it should follow the system's regional settings (that is, the current thread's).
0
Yana
Telerik team
answered on 14 Sep 2011, 03:53 PM
Hello Sébastien,

Yes, you are right, I'm sorry I missed the resizing style.

Thank you for sending your feedback, it will be considered.

Regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Yana
Telerik team
Sébastien
Top achievements
Rank 1
Share this question
or