I've implemented a CalendarDayStyleSelector to higlight certain dates (holidays in this case for an HR application). I know I can set the tooltip manually in the setter of the tooltip property:
<Style x:Key="Holiday" TargetType="{x:Type igEditors:CalendarDay}"> <Setter Property="Background" Value="#FFF2F257" /> <Setter Property="ToolTip" Value="Holiday" /></Style>
This sets the tooltip for al of the selected dates to "Holiday"
How can I set a tooltip for the date itself? For examle, if I hover over 7/4/10, I want the tooltip to display "Independence Day" I know I want to bind the data - just a little lost on what to bind it to and what the XAML syntax would look like. Thanks!
Bob
Hi
Can you please post an example of how this is done please. I tried this approach but in vain.
thanks
chev
Andrew,
Thanks for the direction. I was able to accomplish the results I wanted with this techinque.
Maybe you could set the ToolTip property to a Binding to the StartDate property. E.g. Value="{Binding Path=StartDate, RelativeSource={RelativeSource Self}, Converter={StaticResource holidayConverter}}" where holidayConverter is an instance of an IValueConverter that you write to return the appropriate string for a given date.