Making the textwrap on source button tooltip...

Aug 5, 2008 at 2:12 PM

I produced the following code for a source button tooltip, but I cannot make the textwrap! Even though I've included  <Setter Property="TextBlock.TextWrapping" Value="Wrap"/>
Hence, half of the text disappears!

I believe that a property needs to be included in the ContentPresenter tag, however nothing I've tried so far seems to work...

Does anybody out there have any ideas?

Many thanks!

<!-- Source Button ToolTip -->
    <Style  x:Key="{x:Type ToolTip}"  TargetType="{x:Type ToolTip}">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="HasDropShadow" Value="True"/>
        <Setter Property="Placement" Value="Top" />
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="TextBlock.TextWrapping" Value="Wrap"/>
        <Setter Property="Template">
                <ControlTemplate TargetType="{x:Type ToolTip}">
                    <Grid TextBlock.Foreground="{StaticResource ToolTipTextBrush}">
                    <!-- fake dropshadow -->
                    <Border Background="#33000000" CornerRadius="12"  Margin="14,14,6,6" />
                    <Border Background="#33000000" CornerRadius="12"  Margin="13,13,7,7" />
                    <Border Background="#33000000" CornerRadius="11"  Margin="12,12,8,8" />
                    <Border Background="#33000000" CornerRadius="10"  Margin="11,11,9,9" />
                    <Border Name="Border"
                        BorderBrush="{StaticResource SolidBorderBrush}"
                        Background="{StaticResource ToolTipBGBrush}"
                        <ContentPresenter Margin="0">