locked
How to redesign the ToolTip ? (Lance) - 6/7/2006 9:12 PM PST RRS feed

  • Question

  • By: Lance

    Hello,
    
    How to redesign the ToolTip ? I would like to change color, shape, font.....
    
    BTW, have any easy way to add shadow for text or rectangle ?
    
    Thanks,
    Lance
    
    
    Tuesday, February 19, 2008 12:55 AM

Answers

  • By: Unni Ravindranathan (MS)

    Hi Lance,

    No worries at all. To tell you the truth, I am not testing this on the build
    of WPF you are on - so I can't say how this will behave on that build - but
    in a future build, you should be pleasantly surprised to see how powerful
    tooltips can be:

    Example of tooltip:

    <Window
    xmlns="
    http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="
    http://schemas.microsoft.com/winfx/2006/xaml"
    Background="#FFFFFFFF"
    Width="640" Height="480">

    <Window.Resources>
    <Style x:Key="MyToolTip" TargetType="{x:Type ToolTip}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ToolTip}">
    <Grid>
    <Border CornerRadius="2"
    BorderBrush="Red" BorderThickness="2">
    <ContentPresenter />
    </Border>
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    </Window.Resources>


    <Grid x:Name="DocumentRoot">
    <Button Content="Button">
    <Button.ToolTip>
    <ToolTip Style="{StaticResource MyToolTip}">
    <Button x:Name="Button" Content="Button"/>
    </ToolTip>
    </Button.ToolTip>
    </Button>
    </Grid>
    </Window>

    For Bitmap effects, Expression Interactive Designer does not currently have
    support for authoring. We want people to wait a bit before they are rendered
    in hardware before offering support for this feature. That said, if you are
    creating a small dialog window or something where you don't really care too
    much about s/w rendering, you could consider using them:
    http://windowssdk.msdn.microsoft.com/library/ has more details on how to
    author the markup.

    Thanks,
    -Unni
    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Lance" <Lance@discussions.microsoft.com> wrote in message
    news:A34E1063-FEE0-4858-89F6-6A277A7B5B67@microsoft.com...
    > Hi Unni,
    >
    > Thanks for your help, more related question need your help.
    >
    > 1. How do to "change the style/template to target ToolTip" ?
    > 2. How to use the "BitmapEffect" on Properties ?
    >
    > Thanks,
    > Lance
    >
    > "Unni Ravindranathan (MS)" wrote:
    >
    >> Unfortunately, there is no easy way to style a tool-tip in Expression
    >> Interactive Designer. One "workaround" would be to draw a ContentControl
    >> on
    >> the scene, style it the way you want it to look like, and then change the
    >> style/template to target ToolTip (which is a ContentControl, with
    >> additional
    >> features).
    >>
    >> Also regarding your other question, WPF does have bitmap effects - drop
    >> shadow, blur etc. However, for v1, the bitmap effects are rendered in
    >> software, so you have to be very judicious in their usage. Expression
    >> Interactive Designer currently does not have a way to author them -
    >> however,
    >> they can be easily created in the XAML editor - we will preserve it
    >> correctly for you.
    >>
    >> Thanks,
    >> -Unni
    >> --
    >> This posting is provided "AS IS" with no warranties, and confers no
    >> rights.
    >>
    >> "Lance" <Lance@discussions.microsoft.com> wrote in message
    >> news:14D4AAF0-3297-4BE5-8946-57992FA87E55@microsoft.com...
    >> > Hello,
    >> >
    >> > How to redesign the ToolTip ? I would like to change color, shape,
    >> > font.....
    >> >
    >> > BTW, have any easy way to add shadow for text or rectangle ?
    >> >
    >> > Thanks,
    >> > Lance
    >> >
    >> >
    >>
    >>
    >>

    Tuesday, February 19, 2008 5:56 PM

All replies

  • By: Unni Ravindranathan (MS)

    Unfortunately, there is no easy way to style a tool-tip in Expression
    Interactive Designer. One "workaround" would be to draw a ContentControl on
    the scene, style it the way you want it to look like, and then change the
    style/template to target ToolTip (which is a ContentControl, with additional
    features).

    Also regarding your other question, WPF does have bitmap effects - drop
    shadow, blur etc. However, for v1, the bitmap effects are rendered in
    software, so you have to be very judicious in their usage. Expression
    Interactive Designer currently does not have a way to author them - however,
    they can be easily created in the XAML editor - we will preserve it
    correctly for you.

    Thanks,
    -Unni
    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Lance" <Lance@discussions.microsoft.com> wrote in message
    news:14D4AAF0-3297-4BE5-8946-57992FA87E55@microsoft.com...
    > Hello,
    >
    > How to redesign the ToolTip ? I would like to change color, shape,
    > font.....
    >
    > BTW, have any easy way to add shadow for text or rectangle ?
    >
    > Thanks,
    > Lance
    >
    >
    Tuesday, February 19, 2008 5:55 PM
  • By: Lance

    Hi Unni,
    
    Thanks for your help, more related question need your help.
    
    1. How do to "change the style/template to target ToolTip" ?
    2. How to use the "BitmapEffect" on Properties ?
    
    Thanks,
    Lance
    
    "Unni Ravindranathan (MS)" wrote:
    
    > Unfortunately, there is no easy way to style a tool-tip in Expression 
    > Interactive Designer. One "workaround" would be to draw a ContentControl on 
    > the scene, style it the way you want it to look like, and then change the 
    > style/template to target ToolTip (which is a ContentControl, with additional 
    > features).
    > 
    > Also regarding your other question, WPF does have bitmap effects - drop 
    > shadow, blur etc. However, for v1, the bitmap effects are rendered in 
    > software, so you have to be very judicious in their usage. Expression 
    > Interactive Designer currently does not have a way to author them - however, 
    > they can be easily created in the XAML editor - we will preserve it 
    > correctly for you.
    > 
    > Thanks,
    > -Unni
    > -- 
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > 
    > "Lance" <Lance@discussions.microsoft.com> wrote in message 
    > news:14D4AAF0-3297-4BE5-8946-57992FA87E55@microsoft.com...
    > > Hello,
    > >
    > > How to redesign the ToolTip ? I would like to change color, shape, 
    > > font.....
    > >
    > > BTW, have any easy way to add shadow for text or rectangle ?
    > >
    > > Thanks,
    > > Lance
    > >
    > > 
    > 
    > 
    > 
    Tuesday, February 19, 2008 5:55 PM
  • By: Unni Ravindranathan (MS)

    Hi Lance,

    No worries at all. To tell you the truth, I am not testing this on the build
    of WPF you are on - so I can't say how this will behave on that build - but
    in a future build, you should be pleasantly surprised to see how powerful
    tooltips can be:

    Example of tooltip:

    <Window
    xmlns="
    http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="
    http://schemas.microsoft.com/winfx/2006/xaml"
    Background="#FFFFFFFF"
    Width="640" Height="480">

    <Window.Resources>
    <Style x:Key="MyToolTip" TargetType="{x:Type ToolTip}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ToolTip}">
    <Grid>
    <Border CornerRadius="2"
    BorderBrush="Red" BorderThickness="2">
    <ContentPresenter />
    </Border>
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    </Window.Resources>


    <Grid x:Name="DocumentRoot">
    <Button Content="Button">
    <Button.ToolTip>
    <ToolTip Style="{StaticResource MyToolTip}">
    <Button x:Name="Button" Content="Button"/>
    </ToolTip>
    </Button.ToolTip>
    </Button>
    </Grid>
    </Window>

    For Bitmap effects, Expression Interactive Designer does not currently have
    support for authoring. We want people to wait a bit before they are rendered
    in hardware before offering support for this feature. That said, if you are
    creating a small dialog window or something where you don't really care too
    much about s/w rendering, you could consider using them:
    http://windowssdk.msdn.microsoft.com/library/ has more details on how to
    author the markup.

    Thanks,
    -Unni
    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Lance" <Lance@discussions.microsoft.com> wrote in message
    news:A34E1063-FEE0-4858-89F6-6A277A7B5B67@microsoft.com...
    > Hi Unni,
    >
    > Thanks for your help, more related question need your help.
    >
    > 1. How do to "change the style/template to target ToolTip" ?
    > 2. How to use the "BitmapEffect" on Properties ?
    >
    > Thanks,
    > Lance
    >
    > "Unni Ravindranathan (MS)" wrote:
    >
    >> Unfortunately, there is no easy way to style a tool-tip in Expression
    >> Interactive Designer. One "workaround" would be to draw a ContentControl
    >> on
    >> the scene, style it the way you want it to look like, and then change the
    >> style/template to target ToolTip (which is a ContentControl, with
    >> additional
    >> features).
    >>
    >> Also regarding your other question, WPF does have bitmap effects - drop
    >> shadow, blur etc. However, for v1, the bitmap effects are rendered in
    >> software, so you have to be very judicious in their usage. Expression
    >> Interactive Designer currently does not have a way to author them -
    >> however,
    >> they can be easily created in the XAML editor - we will preserve it
    >> correctly for you.
    >>
    >> Thanks,
    >> -Unni
    >> --
    >> This posting is provided "AS IS" with no warranties, and confers no
    >> rights.
    >>
    >> "Lance" <Lance@discussions.microsoft.com> wrote in message
    >> news:14D4AAF0-3297-4BE5-8946-57992FA87E55@microsoft.com...
    >> > Hello,
    >> >
    >> > How to redesign the ToolTip ? I would like to change color, shape,
    >> > font.....
    >> >
    >> > BTW, have any easy way to add shadow for text or rectangle ?
    >> >
    >> > Thanks,
    >> > Lance
    >> >
    >> >
    >>
    >>
    >>

    Tuesday, February 19, 2008 5:56 PM