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
2349
How to apply a static resource style to tooltip in a grid field?
posted

In the following code, I'd like to use a different style for this tooltip than the default style defined in my resource files.  How would I tell this tooltip to use that style instead?

 

                            <igDataGrid:Field Name="ServicePerformed" Label="Services">
                                <igDataGrid:Field.Settings>
                                    <igDataGrid:FieldSettings LabelMinWidth="180">
                                        <igDataGrid:FieldSettings.CellValuePresenterStyle>
                                            <Style TargetType="{x:Type igDataGrid:CellValuePresenter}">
                                                <Style.Setters>
                                                    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self},Path=Value}" />                                                   
                                                </Style.Setters>
                                            </Style>
                                        </igDataGrid:FieldSettings.CellValuePresenterStyle>
                                    </igDataGrid:FieldSettings>
                                </igDataGrid:Field.Settings>
                            </igDataGrid:Field>

  • 69686
    Suggested Answer
    posted

    Hello,

    This is one way of doing this and it should working correctly. If you want to avoid creating a style, you can handle the ToolTipOpening event of the CellValuePresenter and set the tooltip there dynamically. You can find how here