none
how to display Silverlight Tooltip content which is in html tags with Tooltipservice ?

    Question

  • Hi,

    Iam trying to display tooltip content with html tags in silverlight so iam using c1richtextbox control to convert html tags in to normal text and assigning to controls tooltip. during this iam when there is tags for bold it is not getting same in tool it is display in normal text . is there any other way to display tooltip content which is same as in html tags ??

      Dim mRichTB As New C1RichTextBox

                        mRichTB.Html = "<h1>This is a Heading</h1>"
                            Dim mTooltip As New Silverlight.Controls.ToolTips.ToolTip
                            mTooltip.Content = mRichTB.Text
                            mTooltip.DisplayTime = Duration.Forever
                            ToolTipService.SetToolTip(Button, mTooltip)

    Issue 2 :

    iam using http://tooltipservice.codeplex.com/documentation  silverlight tooltip reference.

    one more issue is i want to increase tooltip time duration till the mouse over on control but it is displaying max 15 sec even though 

    i increased duration to 1 day and duration forever

    Dim mTooltip As New Silverlight.Controls.ToolTips.ToolTip

                            mTooltip.Content = mRichTB.Text

                            Dim mDuration As Duration

                            Dim mTimespan As New TimeSpan(1, 1, 1, 0)

                            mDuration = New Duration(mTimespan)

                            mTooltip.DisplayTime = mDuration

                            ToolTipService.SetToolTip(Button, mTooltip)

    Can any one suggest possible solutions for this ??

    Thanks


    Krishna


    • Edited by Dkrishna Tuesday, February 14, 2017 12:54 PM
    Tuesday, February 14, 2017 12:52 PM

All replies

  • Hi Dkrishna,

    >>  is there any other way to display tooltip content which is same as in html tags ??

    I don't find any properties and method in ToolTipService class which used to set Tooltip format. So when you using ToolTipService.SetToolTip() method, it will use the default Tooltip format that is a normal text.

    If you want to use some format for Silverlight Tooltip content, you could reference following blog to create custom Tooltip style.

    https://blogs.msdn.microsoft.com/devdave/2008/10/18/customizing-a-tooltip/

    >> one more issue is i want to increase tooltip time duration till the mouse over on control but it is displaying max 15 sec even though i increased duration to 1 day and duration forever

    I get the same issue when using this Silverlight Advanced Tooltip dll. Since this is third part dll that released by XavierDecoster. I suggest you submit this issue on the Issues site.

    Before this issue resolve by the author, I suggest you create a custom Tooltip with a storyboard, and you can control the storyboard to show the Tooltip display time.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 16, 2017 2:23 AM
    Moderator