Silverlight duration tooltip

2.5k Views Asked by At

I'm trying to increase the length of time that a tooltip displays in a silverlight application. I downloaded Silverlight.Controls.ToolTip from codeplex and I add it as a reference. Here is my code in my xaml:

xmlns:Controls="clr-namespace:Silverlight.Controls.ToolTips;assembly=Silverlight.Controls.ToolTips"

<Button Content="button content">
    <Controls:ToolTipService.ToolTip>
        <Controls:ToolTip DisplayTime="00:00:10" InitialDelay="00:00:03">
            <TextBlock Text="tooltip"></TextBlock>
        </Controls:ToolTip>
    </Controls:ToolTipService.ToolTip>
</Button>

The code compiles. However, while running the code I get an error "XamlParseException occurred The attachable property 'ToolTip' was not found in 'ToolTipService.' Any ideas on what is causing this error? Thanks!

3

There are 3 best solutions below

0
On

I had the same problem, here is how I solved it.

1) Go to: http://tooltipservice.codeplex.com/SourceControl/BrowseLatest

2) Download the Source Code

3) Copy "ToolTip.cs", "ToolTipService.cs" and ToolTipTimer.cs from "branches\2.2.0\Silverlight.Controls.ToolTips\" into your own project somewhere.

4) Now point the xmlns to assembly on your own project where you have copied the source file into.

So basically, just use the source file instead of the dll and it will work. This has worked for me, hope it works for you.

Good Luck.

0
On

You have downloaded this DLL from web and have not unblocked it yet.

Right Click on the DLL, go to properties and unblock it.

0
On

If you are referencing the ToolTip DLL from another DLL, try also adding a reference to it into you main project.