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

Appointment : custom field and user interface

2 Answers 109 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Aldo
Top achievements
Rank 2
Aldo asked on 11 Jun 2012, 08:38 AM
Hi,
I need to show a custom appointment with some custom fields, I followed docs samples but it doesn't work.

My steps:
1) create an AppointmentExt class that inherits from Appointment, with 2 simple extra fields
public class AppointmentExt : Appointment
{
    public planning_slot Slot { get; set; }
    public string SpecialTooltip { get; set; }
}

2) added an ObservableCollection<AppointmentExt> as Appointments source
ObservableCollection<AppointmentExt> appointments = new ObservableCollection<AppointmentExt>();

3) Created a new Tooltip template and bind the text to my specialtooltip
<DataTemplate x:Key="ScheduleTooltip">
    <StackPanel Orientation="Horizontal">
        <TextBlock MaxWidth="200" TextWrapping="Wrap" Text="{Binding SpecialTooltip}"/>
    </StackPanel>
</DataTemplate>

At runtime the SpecialTooltip is fill but it's displayed empty (not binded?).

So I've 2 question:
A) how can I bind the tooltip to my SpecialTooltip field?
B) how can I change the way the appointment is draw ?

Thanks


2 Answers, 1 is accepted

Sort by
0
Aldo
Top achievements
Rank 2
answered on 11 Jun 2012, 09:52 AM
Question 1) autoresponded : Appointment.SpecialTooltip

Wait only for second one

thanks
0
Yana
Telerik team
answered on 14 Jun 2012, 09:45 AM
Hello Aldo,

First, note that when you create a custom appointment you should use its Storage for the custom properties and also override Copy and CopyFrom methods as explained in the following article:
http://www.telerik.com/help/wpf/radscheduleview-features-appointments-custom-appointment.html#Creating_a_Custom_Appointment_class

Also this help article: Appointment Style shows how you can change the look of the appointments.

Hope this helps.

Kind regards,
Yana
the Telerik team

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

Tags
ScheduleView
Asked by
Aldo
Top achievements
Rank 2
Answers by
Aldo
Top achievements
Rank 2
Yana
Telerik team
Share this question
or