![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Tooltip ControlTemplate I decided to do some artistic thingy to my tooltips: <Style TargetType="{x:Type ToolTip}"> <Setter Property="ToolTip.Background"> <Setter.Value> <RadialGradientBrush Center="0,0" RadiusX="0.9" RadiusY="0.9" GradientOrigin="0,0" > <RadialGradientBrush.GradientStops> <GradientStop Color="LightBlue" Offset="1" /> <GradientStop Color="White" Offset="0" /> </RadialGradientBrush.GradientStops> </RadialGradientBrush> </Setter.Value> </Setter> <Setter Property="ToolTip.Template"> <Setter.Value> <ControlTemplate> <Grid Background="{TemplateBinding Property=Control.Background}"> <ContentPresenter Content="{TemplateBinding Property=ContentControl.Content}" Margin="{TemplateBinding Property=Control.Padding}"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> Lo and behold: a nice gradient to all my tooltips! But... why does the tooltip still have a shadow? I thought that Control Template replaced all layout... Erno |
| | #2 (permalink) |
| Guest | Re: Tooltip ControlTemplate After some experiments: It is not a shadow! A black rectangular form is reserved as a kind of panel on which the tiptip is drawn. Does anybody know how to make that rectangle transparent (or make it go away)? Erno "Erno" <no-spam> wrote in message news:urZw80zJGHA.2064@TK2MSFTNGP09.phx.gbl... >I decided to do some artistic thingy to my tooltips: > > <Style TargetType="{x:Type ToolTip}"> > <Setter Property="ToolTip.Background"> > <Setter.Value> > <RadialGradientBrush Center="0,0" RadiusX="0.9" RadiusY="0.9" > GradientOrigin="0,0" > > <RadialGradientBrush.GradientStops> > <GradientStop Color="LightBlue" Offset="1" /> > <GradientStop Color="White" Offset="0" /> > </RadialGradientBrush.GradientStops> > </RadialGradientBrush> > </Setter.Value> > </Setter> > <Setter Property="ToolTip.Template"> > <Setter.Value> > <ControlTemplate> > <Grid Background="{TemplateBinding Property=Control.Background}"> > <ContentPresenter Content="{TemplateBinding > Property=ContentControl.Content}" > Margin="{TemplateBinding > Property=Control.Padding}"/> > </Grid> > </ControlTemplate> > </Setter.Value> > </Setter> > </Style> > > Lo and behold: a nice gradient to all my tooltips! But... why does the > tooltip still have a shadow? I thought that Control Template replaced all > layout... > > Erno > |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vista tooltip | Nhat | Vista General | 4 | 04-08-2008 10:16 AM |
| CustomControl and controlTemplate | Eager | Avalon | 3 | 09-28-2007 02:06 AM |
| IE7 tooltip bugs | Joakim | Vista General | 2 | 06-21-2006 08:23 AM |
| User controls in a ControlTemplate | Griff | Avalon | 1 | 05-26-2006 04:28 AM |
| Tooltip customisation | Ranj | Avalon | 0 | 04-21-2006 10:05 AM |