Appointment Tooltip duration

3 posts, 1 answers
  1. Rudolf
    Rudolf avatar
    9 posts
    Member since:
    Jul 2012

    Posted 01 Mar 2012 Link to this post

    Dear Telerik team,

    i'm using a RadScheduleView Control, with Appointment Templates as used in your examples/demos (works great).
    Now i want to extend the show duration of a tooltip from an appointment.

    Per default it's set to 5-6 seconds, but i need it at least for 20 seconds.

    I read in your forum that this can be done by setting the ToolStipService ShowDuration

    eg.:
    ToolTipService.ShowDuration="20000"

    I tried to set his in the control template of the "root" Grid, but it doesn't work.
    Can you tell me how to set this property to take this effect, or is there another configuration needed ?

    eg.: Horizontal Style for an Appointment

    <Style x:Key="Level200HorizontalStyle" TargetType="telerik:AppointmentItem">   
               <Setter Property="Background" Value="{StaticResource AppointmentBackground}" />
               <Setter Property="BorderBrush" Value="{StaticResource AppointmentBorder}" />
               <Setter Property="Padding" Value="5" />
               <Setter Property="Foreground" Value="{StaticResource AppointmentForeground}" />
               <Setter Property="FontSize" Value="10" />
               <!-- Setter Property="FontFamily" Value="Arial"/ -->
               <Setter Property="Template">
                   <Setter.Value>
                       <ControlTemplate TargetType="{x:Type telerik:AppointmentItem}">
                           <Grid x:Name="Root" ToolTipService.ShowDuration="20000"
    >
                               <Grid.InputBindings>
                                   <MouseBinding MouseAction="LeftDoubleClick" Command="scheduleView:RadScheduleViewCommands.EditAppointment"/>
                               </Grid.InputBindings>
                               <Border BorderBrush="{TemplateBinding BorderBrush}"
                                       BorderThickness="{TemplateBinding BorderThickness}"
                                       Background="{TemplateBinding Background}" CornerRadius="2" />
                               <Border x:Name="CommonStatesVisual" BorderThickness="{TemplateBinding BorderThickness}"
                                       Background="{StaticResource AppointmentMouseOver}"
                                       BorderBrush="{TemplateBinding BorderThickness}" CornerRadius="2"
                                       Visibility="Collapsed" />
                               <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                       VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                       Margin="{TemplateBinding Padding}">
                                   <Grid.ColumnDefinitions>
                                       <ColumnDefinition Width="20" />
                                       <ColumnDefinition Width="Auto" />
                                   </Grid.ColumnDefinitions>
                                   <ContentPresenter />
                               </Grid>
                               <Grid x:Name="MouseOverOverlay" Opacity="0" Visibility="Collapsed">
                                   <Border x:Name="PART_StartResizeGrip" telerik:RadDragAndDropManager.AllowDrag="True"
                                           Background="Transparent" Cursor="SizeWE" HorizontalAlignment="Left"
                                           VerticalAlignment="Stretch">
                                       <StackPanel x:Name="StartResizeGrip"
                                               HorizontalAlignment="Center" Margin="1" VerticalAlignment="Center" Background="#FF878787">
                                           <Rectangle Fill="White" Height="2" Margin="1" Width="2" />
                                           <Rectangle Fill="White" Height="2" Margin="1" Width="2" />
                                           <Rectangle Fill="White" Height="2" Margin="1" Width="2" />
                                       </StackPanel>
                                   </Border>
                                   <Border x:Name="PART_EndResizeGrip" telerik:RadDragAndDropManager.AllowDrag="True"
                                           Background="Transparent" Cursor="SizeWE" HorizontalAlignment="Right"
                                           VerticalAlignment="Stretch">
                                       <StackPanel x:Name="EndResizeGrip"
                                               HorizontalAlignment="Center" Margin="1" VerticalAlignment="Center" Background="#FF878787">
                                           <Rectangle Fill="White" Height="2" Margin="1" Width="2" />
                                           <Rectangle Fill="White" Height="2" Margin="1" Width="2" />
                                           <Rectangle Fill="White" Height="2" Margin="1" Width="2" />
                                       </StackPanel>
                                   </Border>
                               </Grid>
                           </Grid>
                           <ControlTemplate.Triggers>
                               <Trigger Property="IsDragged" Value="True">
                                   <Setter Property="Opacity" TargetName="Root" Value="0.3" />
                               </Trigger>
                               <Trigger Property="IsMouseOver" Value="True">
                                   <Trigger.EnterActions>
                                       <BeginStoryboard>
                                           <Storyboard>
                                               <ObjectAnimationUsingKeyFrames Duration="0:0:0.4"
                                                       Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="MouseOverOverlay">
                                                   <DiscreteObjectKeyFrame KeyTime="0">
                                                       <DiscreteObjectKeyFrame.Value>
                                                           <Visibility>Visible</Visibility>
                                                       </DiscreteObjectKeyFrame.Value>
                                                   </DiscreteObjectKeyFrame>
                                               </ObjectAnimationUsingKeyFrames>
                                               <DoubleAnimation BeginTime="0:0:0.2" Duration="0:0:0.2" To="1"
                                                       Storyboard.TargetProperty="Opacity"
                                                       Storyboard.TargetName="MouseOverOverlay" />
                                           </Storyboard>
                                       </BeginStoryboard>
                                   </Trigger.EnterActions>
                                   <Trigger.ExitActions>
                                       <BeginStoryboard>
                                           <Storyboard>
                                               <ObjectAnimationUsingKeyFrames Duration="0:0:0.2"
                                                       Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="MouseOverOverlay">
                                                   <DiscreteObjectKeyFrame KeyTime="0:0:0.2">
                                                       <DiscreteObjectKeyFrame.Value>
                                                           <Visibility>Collapsed</Visibility>
                                                       </DiscreteObjectKeyFrame.Value>
                                                   </DiscreteObjectKeyFrame>
                                               </ObjectAnimationUsingKeyFrames>
                                               <DoubleAnimation BeginTime="0" Duration="0:0:0.2" To="0"
                                                       Storyboard.TargetProperty="Opacity"
                                                       Storyboard.TargetName="MouseOverOverlay" />
                                           </Storyboard>
                                       </BeginStoryboard>
                                   </Trigger.ExitActions>
                                   <Setter Property="Visibility" TargetName="CommonStatesVisual" Value="Visible" />
                                   <Setter Property="Visibility" TargetName="MouseOverOverlay" Value="Visible" />
                               </Trigger>
                               <Trigger Property="IsSelected" Value="True">
                                   <Setter Property="Visibility" TargetName="CommonStatesVisual" Value="Visible" />
                               </Trigger>
                           </ControlTemplate.Triggers>
                       </ControlTemplate>
                   </Setter.Value>
               </Setter>
           </Style>

    best regards
    rudi
  2. Answer
    Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 01 Mar 2012 Link to this post

    Hello,

    I suggest you set the property to the AppointmentItem's style:

    <Style  x:Key="Level200HorizontalStyle" TargetType="telerik:AppointmentItem">
                <Setter Property="ToolTipService.ShowDuration" Value="20000"  >
                </Setter>
    </Style>


    Hope this helps.

    All the best,
    Rosi
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rudolf
    Rudolf avatar
    9 posts
    Member since:
    Jul 2012

    Posted 01 Mar 2012 Link to this post

    that worked - thank's !

    regards
    rudi
Back to Top