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

ItemToolTipOpening

2 Answers 63 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Natália
Top achievements
Rank 1
Natália asked on 13 Aug 2010, 03:45 PM
Hi,

I'm using ItemToolTipOpening event and wanted to know if I can keep the window open until the user clicks outside it and not just take the mouse as it happens automatically.
 wish I could add buttons in the window that is displayed through the Tooltip.

Thanks...

2 Answers, 1 is accepted

Sort by
0
leblanc
Top achievements
Rank 1
answered on 17 Aug 2010, 05:03 PM

You could redefine the style for the tooltip to add the buttons and delays you are looking for.

<Style x:Key="_SeriesItemTooltip" TargetType="telerik:ItemToolTip2D">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:ItemToolTip2D">
                <Grid Background="{Binding ., Converter={StaticResource _lossToBorderColorConverter}}">
                    <TextBlock Margin="3" Foreground="White" Text="{Binding ., Converter={StaticResource _marginToTooltipConverter}}" />
                    <!--<ContentPresenter /> because contenttemplate has formatted string not datapoint object.-->
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Using the MVVM api you could then set the tooltip to a specific dataseries: 

 

seriesMapping4.SeriesDefinition.SeriesItemTooltipStyle = Resources["_SeriesItemTooltip"] as Style;


@Telerik  by the way for this style i should only have to set the ContentTemplate however the datacontext in ContentTemplate is a String ... it would be more beneficial if it was the DataPoint object so that i don't have to override the controltemplate.
0
Natália
Top achievements
Rank 1
answered on 17 Aug 2010, 06:19 PM
Thanks for the reply leblanc.

That way I could insert the buttons on the tooltip, but how to function as a window?
I can not keep the tooltip visible to click on the button is inside the tooltip.


thanks
...
Tags
Chart
Asked by
Natália
Top achievements
Rank 1
Answers by
leblanc
Top achievements
Rank 1
Natália
Top achievements
Rank 1
Share this question
or