ToolTips Styling problem

Topics: question
Dec 10, 2010 at 10:41 PM

Hi !
I've got a problem with define style for advanced tooltips.

If I define style like this:

<Style TargetType="myToolTip:ToolTip">

... some Setters

</Style>

I receive an exception "Failed to create a 'System.Type' from the text 'mytooltips:ToolTip'..."

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

 

If I define style using ToolTip as TargetType, I cant refer to properties like CloseAnimation ...

 

Is there any solution to define advanced tooltip style ???

Coordinator
Feb 24, 2011 at 7:10 PM
Hi,

I'm using a Style in my demo application (check the sources for a sample):

<!-- ToolTip Style -->
<Style x:Key="ToolTipStyle" TargetType="controls:ToolTip">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1.714" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
<GradientStop Color="#FFEFC52E"/>
<GradientStop Color="#FFE0CA7A" Offset="1"/>
<GradientStop Color="#FFF7E191" Offset="0.453"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#FF000000" ShadowDepth="20" BlurRadius="15" Direction="-45" Opacity="0.5"/>
</Setter.Value>
</Setter>
</Style>

Make sure you have registered the correct xml-namespace for my advanced tooltips and tooltipservice, as shown below:
xmlns:controls="clr-namespace:Silverlight.Controls.ToolTips;assembly=Silverlight.Controls.ToolTips"

Cheers,
Xavier

2010/12/11 RadekTop <notifications@codeplex.com>

From: RadekTop

Hi !
I've got a problem with define style for advanced tooltips.

If I define style like this:

<Style TargetType="myToolTip:ToolTip">

... some Setters

</Style>

I receive an exception "Failed to create a 'System.Type' from the text 'mytooltips:ToolTip'..."

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

If I define style using ToolTip as TargetType, I cant refer to properties like CloseAnimation ...

Is there any solution to define advanced tooltip style ???

Read the full discussion online.

To add a post to this discussion, reply to this email (tooltipservice@discussions.codeplex.com)

To start a new discussion for this project, email tooltipservice@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com