Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1590
Tooltips on Appointment
posted

Hi, I'm trying to set a tooltip on an Appointment in the XamScheduleView. I have learned that, in order to achieve this, I should define a Style for the ActivityToolTipPresenter, and set the Template property. In this template, I want to bind to some properties of the business object which is the data source for the appointment. I tried to create Appointment object like this:

 Appointment appointment = new Appointment() {  Id = id.ToString(),  ... (more properties) ... ,  DataItem = businessObject };

Then, in the Style I tried to access the business object like this:

<Grid DataContext="{Binding Activity.DataItem.SomeProperty}" />

However, this binding doesn't work. Apparently, the DataItem no longer refers to my BusinessObject, but to itself instead (the Appointment object).

So, how can I achieve the desired effect?

Regards, Stefan