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

Appointment item content problem

0 Answers 33 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
PaulH
Top achievements
Rank 1
PaulH asked on 19 Sep 2011, 03:59 PM
Hi there

A prospective customer is insisting that the appointment items and their tooltips show not just the subject but the body of the appointment as well. I have been able to make the tooltip display correctly by simply changing it to display a stack panel with textblocks for the subject and body inside. I want to retain the text wrapping functionality of the appointment item content textblock which I would lose if I repeated the same steps for the appointment item content template. I have tried creating a value converter which will amalgamate the subject and body for me and display that in the appointment item but this seems to have the effect of changing all appointments to display with the same text showing on them. Is there a way you can see of achieving the desired result?
Thanks in advance

My AppointmentItem DataTemplate:

 

<DataTemplate x:Key="AppointmentItemTemplate">

<TextBlock Text="{Binding Converter={StaticResource AppointmentItemValueConverter}}" TextWrapping="Wrap" TextTrimming="WordEllipsis" />

 

</DataTemplate>


My converter (Convert method):

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

{

 

if (null == value) return string.Empty;

AppointmentItemProxy itemProxy = (AppointmentItemProxy)value;

Appointment appointment = (Appointment)itemProxy.Appointment;

return string.Format(System.Globalization.CultureInfo.CurrentUICulture, "{0}\r{1}", appointment.Subject, appointment.Body);

}

No answers yet. Maybe you can help?

Tags
ScheduleView
Asked by
PaulH
Top achievements
Rank 1
Share this question
or