How to create a tooltip entirely from code

4 posts, 0 answers
  1. Ludwig
    Ludwig avatar
    3 posts
    Member since:
    Mar 2013

    Posted 10 Jun 2013 Link to this post

    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.
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 13 Jun 2013 Link to this post

    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.
  3. DevCraft banner
  4. Ludwig
    Ludwig avatar
    3 posts
    Member since:
    Mar 2013

    Posted 13 Jun 2013 Link to this post

    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.

  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 14 Jun 2013 Link to this post

    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.
Back to Top