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

Keep Appointment Tooltip Open

3 Answers 66 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 13 May 2015, 08:39 PM

I'm using RadScheduleview and have a custom ToolTipTemplate to display information from my business objects/class bound to the schedule when a user hovers over an appointment.  This works fine, but I added a link in the custom tooltip which I want the user to be able to click.  Currently you can't click the link because when you move your mouse off the appointment, the tooltip popup disappears, so you can never get to the link.  Is there some kind of "sticky" property or something else that I can utilize to achieve this functionality? 

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 14 May 2015, 01:57 PM
Hi Scott,

What we could suggest you in order to achieve the desired is to change the duration of the Appointment's ToolTip - thus you will have have enough time to click on the link. So, in order to achieve this you need to set the ToolTipTemplate property of the ScheduleView to x:Null and implement a custom AppointmentStyleSelectorInside of it you will need to set telerik:RadToolTipService.ShowDuration attached property to the desired duration. Please, check the following code - snippet:
<telerik:OrientedAppointmentItemStyleSelector x:Key="AppointmentStyleSelector">
    <telerik:OrientedAppointmentItemStyleSelector.VerticalStyle>
        <Style TargetType="telerik:AppointmentItem" BasedOn="{StaticResource AppointmentItemBaseStyle}">
            <Setter Property="telerik:RadToolTipService.ShowDuration" Value="20000" />                  
        </Style>
    </telerik:OrientedAppointmentItemStyleSelector.VerticalStyle>
</telerik:OrientedAppointmentItemStyleSelector>

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Scott
Top achievements
Rank 1
answered on 14 May 2015, 08:31 PM

Your suggestion won't work for two reasons.  One, I can't mark the scheduleview's ToolTipTemplate to x:Null because I currently have it bound to a custom datatemplate.  And two, the tooltip popup isn't disappearing due to a timeout, it's disappearing because I'm moving the mouse off of the appointment to try and click on the link in the popup tooltip window.  I doubt setting the timeout duration to a longer time would change that.

Here's the code for the custom datatemplate that the scheduleview ToolTipTemplate property is bound too (not that I think you'll need it).

<!-- Item template for the schedule appointment/task popup. -->
<DataTemplate x:Key="AppointmentToolTipTemplate">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBlock Text="Event Name: " FontFamily="Portable User Interface" FontSize="12" FontWeight="Bold" />
            <TextBlock Text="{Binding Subject}" TextWrapping="Wrap"  FontSize="12" FontWeight="Bold" />
        </StackPanel>
        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <TextBlock Text="{Binding Body}" />
        </StackPanel>
        <StackPanel Grid.Row="2" Orientation="Horizontal">
            <TextBlock Text="{Binding Appointment.Url}" TextDecorations="Underline" Foreground="Blue"/>
        </StackPanel>
    </Grid>
</DataTemplate>

0
Nasko
Telerik team
answered on 19 May 2015, 08:20 AM
Hi Scott,

Indeed the proposed approach only changes the duration of the ToolTip. By design the ToolTip's main functionality is to display only the data and keeping it open and clicking inside it is not a supported scenario. So, what we could suggest is to create a custom ToolTip either using a Popup or a Window. You need to define a Popup as a Resource in order to be able to find it in code behind. Afterwards you need to handle the needed event of the AppointmentItem that will open the Popup once the event is fired. As for the closing of the Popup you could close it when needed by setting its IsOpen property to false. Please, notice that again you will need to set the ToolTipTemplate property to {x:Null} and set your "AppointmentTooltipTemplate" to the Popup.

Hopes this helps. If you need our further assistance with the implementation of the suggested above approach please do not hesitate to contact us.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Scott
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Scott
Top achievements
Rank 1
Share this question
or