Tooltip stays open over dialogs

3 posts, 0 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 09 Feb 2015 Link to this post

    Hi!

    When we previously used Silverlight 4, our ScheduleViewAppointmentItemTemplate looked like this (see tooltip at  the bottom):

    <DataTemplate x:Key="CustomScheduleViewAppointmentItemTemplate">
            <Grid>
                <Grid.Resources>
                    <Style TargetType="TextBlock">
                        <Setter Property="FontSize" Value="10" />
                        <Setter Property="TextTrimming" Value="None" />
                        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
                        <Setter Property="dragDrop:DragDropManager.AllowDrag" Value="False" />
                    </Style>
                </Grid.Resources>
                <Grid.RowDefinitions>
                    <RowDefinition Height="14" />
                    <RowDefinition Height="14" />
                </Grid.RowDefinitions>
     
                <TextBlock Grid.Row="0" Text="{Binding Subject}" Foreground="{Binding Category.CategoryBrush, Converter={StaticResource ForegroundColorByBackgroundBrightnessConverter}}" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}, ConverterParameter='inverse'}" Margin="3,-1,3,0" />
                <TextBlock Grid.Row="0" Text="{Binding Subject}" Foreground="White" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}}" Margin="3,-1,3,0" />
                <Grid Grid.Row="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Appointment.Location}" Foreground="{Binding Category.CategoryBrush, Converter={StaticResource ForegroundColorByBackgroundBrightnessConverter}}" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}, ConverterParameter='inverse'}" Margin="3,-3,3,0" />
                    <TextBlock Grid.Column="0" Text="{Binding Appointment.Location}" Foreground="White" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}}" Margin="3,-3,3,0" />
                    <Grid Grid.Column="1" Visibility="{Binding Appointment.ShiftStyle, Converter={StaticResource ShiftStyleDetailedVisibilityConverter}}">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,-3,3,0" Visibility="{Binding Appointment.NbrOfWeeks, Converter={StaticResource NumberToVisibilityConverter}}">
                            <TextBlock Text="{Binding Appointment.DayNumber, Converter={StaticResource DayNumberToWeekNumberConverter}}" Foreground="{Binding Category.CategoryBrush, Converter={StaticResource ForegroundColorByBackgroundBrightnessConverter}}" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}, ConverterParameter='inverse'}" />
                            <TextBlock Text="/" Foreground="{Binding Category.CategoryBrush, Converter={StaticResource ForegroundColorByBackgroundBrightnessConverter}}" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}, ConverterParameter='inverse'}" />
                            <TextBlock Text="{Binding Appointment.NbrOfWeeks, Converter={StaticResource NbrOfWeeksConverter}}" Foreground="{Binding Category.CategoryBrush, Converter={StaticResource ForegroundColorByBackgroundBrightnessConverter}}" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}, ConverterParameter='inverse'}" />
                            <TextBlock Text="{Binding Appointment.DayNumber, Converter={StaticResource DayNumberToWeekNumberConverter}}" Foreground="White" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}}" />
                            <TextBlock Text="/" Foreground="White" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}}" />
                            <TextBlock Text="{Binding Appointment.NbrOfWeeks, Converter={StaticResource NbrOfWeeksConverter}}" Foreground="White" Visibility="{Binding Appointment.TimeDeviationCauseId, Converter={StaticResource NumberToVisibilityConverter}}" />
                        </StackPanel>
                    </Grid>
                </Grid>
                <!-- Remove when Silverlight 5 -->
                <ToolTipService.ToolTip>
                    <ToolTip Style="{StaticResource MultiLine_ToolTip}" Content="{Binding Appointment.ToolTip}" />
                </ToolTipService.ToolTip>
            </Grid>
        </DataTemplate>

    When we upgraded to Silverlight 5, the tooltip part in the template was removed and the following is used instead:

    <util:CustomOrientedAppointmentItemStyleSelector.HorizontalStyle>
                <Style BasedOn="{StaticResource CustomAppointmentItemBaseStyle}" TargetType="telerikScheduleView:AppointmentItem">
                    <Setter Property="ContentTemplate" Value="{StaticResource CustomScheduleViewAppointmentItemTemplate}" />
                    <Setter Property="Template" Value="{StaticResource ScheduleViewAppointmentItemControlTemplate}" />
                    <Setter Property="Margin" Value="3,2,2,-2" />
                    <Setter Property="VerticalAlignment" Value="Top" />
                    <Setter Property="Height" Value="30" />
                    <Setter Property="telerik:RadToolTipService.ToolTipContent" Value="{Binding Appointment.ToolTip}" />
                    <Setter Property="telerik:RadToolTipService.ShowDuration" Value="7500" />
                </Style>
            </util:CustomOrientedAppointmentItemStyleSelector.HorizontalStyle>

    This code crashed when running a Silverlight 4 runtime version, but now when we have upgraded it works.
    But with one problem, it stays open even if a dialog is opened in front of the scheduleview (se image), very annoying.
    What is the reason, am I using to large duration?
    Any other solution?

    Regards,
    Håkan




  2. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 09 Feb 2015 in reply to Håkan Link to this post

    Hi again!

    I forgot to mention the most strange and annoying with this.
    If you hover above an appointment to display the tooltip, then move the mouse over an empty slot, the previous tooltip pops up there also, see image.

    Regards,
    Håkan
  3. DevCraft banner
  4. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 12 Feb 2015 Link to this post

    Hi Håkan,

    The reason for the observed behavior is the fact you are using a large duration - the ToolTip stays visible until the end of the duration. Please try using a smaller number there and see if this fixes the explained behavior.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top