GridView Row ToolTip Template

2 posts, 0 answers
  1. band
    band avatar
    37 posts
    Member since:
    Jun 2016

    Posted 26 Jul 2016 Link to this post

    Hi I have a datatemplate I would like to apply for the GridViewRow tooltip. May I ask how abouts I would do that?


    <DataTemplate x:Key="AppointmentToolTipTemplate">
        <Grid MaxWidth="300" Background="White">
                <ColumnDefinition Width="43" />
                <ColumnDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            <TextBlock Text="{Binding Subject}" Grid.ColumnSpan="2" TextWrapping="Wrap" Margin="5 8 4 3" FontWeight="Bold" />
            <Button IsEnabled="False" Background="Transparent" Grid.Row="1"  VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5 5 0 0" Width="28" Height="29" ContentTemplate="{StaticResource Calendar.Clock}"></Button>
            <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="1" Margin="0 5 0 0">
                <StackPanel Orientation="Horizontal" Margin="0 0 0 0">
                    <TextBlock Text="{Binding Start, StringFormat='hh:mm tt', Mode=TwoWay}" TextWrapping="Wrap" FontSize="10" />
                    <TextBlock Text=" - " FontSize="10" />
                    <TextBlock Text="{Binding End, StringFormat='hh:mm tt', Mode=TwoWay}" TextWrapping="Wrap" FontSize="10" />
                <TextBlock Text="{Binding Start, StringFormat='dddd dd MMM yyyy', Mode=TwoWay}" Margin="0 3" FontSize="10" />
            <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding Body}" Margin="5 3 5 8" TextWrapping="Wrap"  />
  2. Stefan Nenchev
    Stefan Nenchev avatar
    665 posts

    Posted 29 Jul 2016 Link to this post


    You can create a style that targets telerik:GridViewRow and set its ToolTip Property:

    <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
               <Setter Property="ToolTip">
                           <TextBlock Text="{Binding Name}"></TextBlock>

    I hope this helps.

    Stefan Nenchev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top