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

Problem setting ToolTipTemplate

1 Answer 100 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Kwame Johnson
Top achievements
Rank 1
Kwame Johnson asked on 25 Mar 2011, 12:06 AM
Hey There-

I've run into a fairly annoying problem implementing a custom tooltip for my ScheduleView. Basically, everything seems to work EXCEPT for the fact that I'm attempting to set the background color of the content and there seems to be extra space on the left and right of the datatemplate that I cannot get rid of. Just to test, I've reduced the datatemplate XAML to:

<DataTemplate x:Key="ToolTipTemplate" >
            <TextBox Background="{Binding Appointment.SMCBrush}" TextWrapping="NoWrap" Text="{Binding Appointment.Title}" Foreground="{Binding Appointment.FontBrush}" Margin="0,0,0,0" />
</DataTemplate>

What I need to implement is more complicated and will most likely require me to use a grid, but even with this little bit of code I still see a noticeable amount of white space on either side of the tooltip. How do i get rid of that? It seems like I've tried everything...

K

1 Answer, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 25 Mar 2011, 03:14 PM
Hello Kwame Johnson,

It is pretty annoying I know. But if we add Style (you need style to set the Background of the tooltip control) properties for all possible inner controls in RadScheduleView the API would become overcomplicated. I would suggest you to set negative margins on a border to compensate for the tooltip's paddings and find the proper corner radiuses. Then put the TextBlock inside the Border. It should be a decent workaround.

Greetings,
Pana
the Telerik team
Tags
ScheduleView
Asked by
Kwame Johnson
Top achievements
Rank 1
Answers by
Pana
Telerik team
Share this question
or