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

AppointmentStyleSelector strange behavior

1 Answer 111 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 25 Nov 2011, 08:08 AM
Hi 

I'm using trial version of WPF controls (Q3 2011) and trying to implement custom appointment style as it described here
It works well until I want to resize an appointment (please see attached screenshot). The problem is that if I use custom AppointmentStyleSelector I can't resize Appointment rectangle by dragging top or bottom edge anymore, right and left edges are highlighted for resizing instead. Usage of OrientedAppointmentItemStyleSelector as AppointmentStyleSelector leads to the same results.
So could you please help me to figure out how to fix that issue?

Here is a link to the demo project http://dl.dropbox.com/u/3950376/TelerikAppointmentStyle.zip

Thanks,
Alexander

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 25 Nov 2011, 10:11 AM
Hi Alexander,

In your project you have created a custom AppointmentitemStyleSelector and provided custom styles for appointment items.

The AppointmentItemStyleSelector is by default oriented, which means it is aware of appointment orientation. However, you have created your custom styles with no orientation. This means that the default orientation will be applied first, and then your custom styles will be taken into account.

The default appointment item orientation is horizontal. And the two view definitions you use (DayView and WeekView) use actually the vertical template of the appointment item rather than the horizontal (DayView and WeekView stack appoitnments vertically, so they use vertically oriented appointments). Hence the discrepancy occurs.

 I suggest you provide both horizontal and vertical version when creating a style, if you intend to use the new style across views with different orientation. And please , remember to make your custom selector aware of orientation via the activeViewDefinition param.

Or, as in your specific case of using only two vertically oriented views, copy the vertical control template for the appointment item in your newly created style in xaml. Leaving the style with style setters only and with no control template, will result in applying the default template.

I hope this information will be helpful.


Greetings,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ScheduleView
Asked by
Alexander
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or