Monday, October 29, 2012

Silverlight duration tooltip

Silverlight duration tooltip

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!

Answers & Comments...

Answer: 1

Most probabley you have downloaded this DLL from web and have not unblocked it yet.

Right Click on DLL, go to properties and unloack it.

Cheers :)

by : Sameer Azazihttp://stackoverflow.com/users/517783

Answer: 2

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.

by : didibushttp://stackoverflow.com/users/172272




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog