Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
tooltip with wrapping
posted

Hi

I'm trying to get the tooltip for my cells to wrap the text but I can't figure out how. Can i go directly in the editor and set it somehow?

/S

 

<Style x:Key="Comment" TargetType="{x:Type Editors:XamTextEditor}" >                                                                                                       

<Style.Triggers>

<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text, Converter={StaticResource stringToBoolConverter}}" Value="True">

<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Text}"/>

</DataTrigger>

</Style.Triggers>

</Style>

 

<DataPresenter:Field Name="CommentTextDisplay">

<DataPresenter:Field.Settings>

<DataPresenter:FieldSettings>

<DataPresenter:FieldSettings.EditorStyle>

<Style BasedOn="{StaticResource Comment}" TargetType="{x:Type Editors:XamTextEditor}">

<Setter Property="TextWrapping" Value="Wrap"/>

<Setter Property="ValueConstraint">

<Setter.Value>

<Editors:ValueConstraint MaxLength="255"/>

</Setter.Value>

</Setter>

</Style>

</DataPresenter:FieldSettings.EditorStyle>

</DataPresenter:FieldSettings>

</DataPresenter:Field.Settings>

</DataPresenter:Field>

Parents
No Data
Reply
  • 210
    Verified Answer
    posted

    Nevermind I fixed it :)

     

    <Style TargetType="{x:Type ToolTip}">

    <Setter Property="Template" >

    <Setter.Value>

    <ControlTemplate TargetType="{x:Type ToolTip}">

    <Border Margin="2" BorderThickness="1" BorderBrush="Black">

    <TextBlock TextWrapping="Wrap" MaxWidth="150" Background="Beige" Text="{Binding Content, RelativeSource ={RelativeSource TemplatedParent}}"/>

    </Border>

    </ControlTemplate>

    </Setter.Value>

    </Setter>

    </Style>

Children
No Data