Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Tooltip on Mouse Overing for custom class.

$
0
0

Hi

I have one line chart control.

This is the sample example code.

<local:LineChartControl Height="300" Width="300" HorizontalAlignment="Left" VerticalAlignment="Top"><local:LineChartControl.PoltPoints><local:CustomPoints X="10" Y="20" BrushColor="DarkGoldenrod"/><local:CustomPoints X="250" Y="40" BrushColor="Aqua"/><local:CustomPoints X="170" Y="70" BrushColor="Red"/></local:LineChartControl.PoltPoints></<local:LineChartControl >

The "LineChartControl" custom class, which is going have the ObservableCollection<"PoltPoints"> class, in turn"PoltPoints" class is which holds the X and Y axis points to plot...

For plotting  i have overrided the "OnRender" function which take of plottting in the"LineChartControl" class.

Here i want to provide the hint(as the current x and y point) on hoveringany of the point(which is CustomPoints class).

As per my understanding :

Tooltip is the one which shows something on hover.

When u hover on any "control" it will show tooltip. So i inherited this class from Control class.

so i did like  this.ToolTip = "X and Y points" .. in the constructor of the CustomPoints class.

so i when i hover any point(which is the CustomPoints class) it will show the tooltip.

But it is not working as i thought.!!!!..


May i know, how to get it and where i am going wrong and pls correct if i am wrong.

Thanks in advance.


NANDAKUMAR.T


Viewing all articles
Browse latest Browse all 18858

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>