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
1024
TooTip while in edit mode
posted

Hi,

I,m trying to create a style trigger, which creates a tooltip for a cell, when it enters edit mode.

I have 2 editable fields and I want each one to show another nessage in the tooltip. I'm saving the nessage currently in the tag of the field.

I tryed this:

 

 

 

 

 

 

<

 

Style TargetType="{x:Type igDP:CellValuePresenter}">

 

 

 

<Style.Triggers>

 

 

 

<Trigger Property="IsInEditMode" Value="true">

 

 

 

<Setter Property="ToolTip" Value="{Binding Field.Tag}">

 

 

 

</Trigger>

 

 

 

</Style.Triggers>

 

 

 

</Style>

but it doen't work

Parents
  • 69686
    Verified Answer
    posted

    Hello,

    There is an issue with the style you are using. You need to set the relative source to the binding expression, because the default data context is the DataRecord, which does not have a Field property. You can use the following binding : 

                        <Setter Property="ToolTip" Value="{Binding Field.Tag, RelativeSource={RelativeSource Self}}"/>

Reply Children
No Data