ToolTip image on DataGrid

Mar 9, 2010 at 1:43 PM
Edited Mar 9, 2010 at 3:08 PM

Hi
I’ve been looking for a similar problem in the forum but unfortunately I’ didn’t found anything special.
I would be grateful if I got some help
So I have a DataGrid with some column of a product class (Name, Price, Ref and Image)
My problem is that I like to add a default image on each DataRow but once the user pass over this image (the default one) I’d like to show a tooltip for the appropriate image of the product(if this product does not have a Image so we will not show an default image)

I try this also to add a template for RowDetailsTemplate


<DataTemplate x:Key="RowDetailsTemplate">
        <Grid TextBlock.Foreground="White">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />                 
            </Grid.RowDefinitions>
          
            <Image Source="{Binding image}"/>
        </Grid>
        
    </DataTemplate>

and then

<Setter Property="RowDetailsTemplate" Value="{StaticResource RowDetailsTemplate}" />

but nothing happend

So any help?to add a tooltip or just to add a rowDetailsTemplate?

I hope that I’m clear
Good day

 

 

Mar 9, 2010 at 3:48 PM

I Find a solution for the RowDetailsTemplate with this

 

<my:DataGrid.RowDetailsTemplate>
                        <DataTemplate>
                            <Grid TextBlock.Foreground="White">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>               
                                </Grid.ColumnDefinitions>
                                <Image Width="50" Height="50" VerticalAlignment="Center" HorizontalAlignment="Left" Source="{Binding image}" />
                                <TextBlock Grid.Column="1" >Pour d'autre infromation<Hyperlink>Cliquer ici</Hyperlink></TextBlock>
                               </Grid>
                        </DataTemplate>
            </my:DataGrid.RowDetailsTemplate>

 

Still now the problem with tooltip if it's possible