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

Tooltip stays open over dialogs

2 Answers 46 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Håkan
Top achievements
Rank 1
Håkan asked on 09 Feb 2015, 02:41 PM
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 Answers, 1 is accepted

Sort by
0
Håkan
Top achievements
Rank 1
answered on 09 Feb 2015, 03:23 PM
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
0
Kalin
Telerik team
answered on 12 Feb 2015, 08:30 AM
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.

 
Tags
ScheduleView
Asked by
Håkan
Top achievements
Rank 1
Answers by
Håkan
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or