Problem setting ToolTipTemplate

2 posts, 0 answers
  1. Kwame Johnson
    Kwame Johnson avatar
    27 posts
    Member since:
    May 2010

    Posted 24 Mar 2011 Link to this post

    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" />

    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...

  2. Pana
    Pana avatar
    748 posts

    Posted 25 Mar 2011 Link to this post

    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.

    the Telerik team
  3. DevCraft R3 2016 release webinar banner
Back to Top