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

How to create a tooltip entirely from code

3 Answers 110 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ludwig
Top achievements
Rank 1
Ludwig asked on 11 Jun 2013, 01:54 AM
Hello guys could anybody help me whit this, I need to generate tooltips dinamicaly fom code Im working on Windows Phone, I need it on C#

Im able to create a tooltip using this ...

rec = a Rectangle object on My XAML Page ...

RadToolTipService.Open(rec, "My text to show");


but Im not able to set an Style on it ...
Then I tried to use something like this ...

RadToolTip mytooltip = new RadToolTip();

but there is not constructors for tooltips ...

and if I use it as a type as follow ... Im not sure how to initialize

RadToolTip mytooltip;

Thanks for your help beforehand.

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 13 Jun 2013, 05:44 PM
Hello Ludwig,

Thanks for writing.
You can set a style for your tool tip like this:

RadToolTipService.SetStyle(rec, myTooltipStyle);

Please write again if you need further assistance.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Ludwig
Top achievements
Rank 1
answered on 13 Jun 2013, 11:08 PM

Hello Victor

The styling issue is now solved, could you please help me with an example of creating a tool tip programmatically from C# ?? 
What am I doing, is this :

RadToolTipService.Open(this.rectangle, "A different tooltip");

is that the right way to do it ??

Thanks.

0
Victor
Telerik team
answered on 14 Jun 2013, 07:36 AM
Hi Ludwig,

Yes, this is the only way to open a tooltip from C#. If it works and there are no ugly hacks, it is the right way to do it. :)
Please have a look at our online help for more examples of using RadToolTip.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
ToolTip
Asked by
Ludwig
Top achievements
Rank 1
Answers by
Victor
Telerik team
Ludwig
Top achievements
Rank 1
Share this question
or