wpfgridviewcolumnheader

How to add tooltip text on my Gridview column header, WPF VS2010


Here is my grid i what to give an explanation to the header "RED.BROJ" when on mouse over that header to show the expl. text.

<ListView.View>
    <GridView>
        <GridViewColumn Width="50"
                        Header="Реd.Број"
                        DisplayMemberBinding="{Binding Path=RedenBroj}">
        </GridViewColumn>

Solution

  • You could do this:

    <GridViewColumn Width="50"
                    DisplayMemberBinding="{Binding Path=RedenBroj}">
        <GridViewColumn.Header>
            <TextBlock Text="Ред.Број"
                       ToolTip="Your explanation" />                      
        </GridViewColumn.Header>        
    </GridViewColumn>