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>
You could do this:
<GridViewColumn Width="50"
DisplayMemberBinding="{Binding Path=RedenBroj}">
<GridViewColumn.Header>
<TextBlock Text="Ред.Број"
ToolTip="Your explanation" />
</GridViewColumn.Header>
</GridViewColumn>
Slightly late response but you can add a tooltip, without losing the ability to drag columns to reorder them, by doing the following:
<GridViewColumn Width="50"
Header="Реd.Број"
DisplayMemberBinding="{Binding Path=RedenBroj}">
<GridViewColumn.HeaderContainerStyle>
<Style>
<Setter Property="Control.ToolTip" Value="Tool tip content"/>
</Style>
</GridViewColumn.HeaderContainerStyle>
</GridViewColumn>
Update: more concise version thanks to LPL
Further update: I wanted to be able to have all columns have tooltips that match their headers (as some columns were too narrow to show the whole header):
<ListView.View>
<GridView>
<GridView.ColumnHeaderContainerStyle>
<Style TargetType="GridViewColumnHeader">
<Setter Property="ToolTip"
Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>
</Style>
</GridView.ColumnHeaderContainerStyle>
<GridViewColumn DisplayMemberBinding="{Binding A}" Header="A"/>
<GridViewColumn DisplayMemberBinding="{Binding B}" Header="B"/>
<GridViewColumn DisplayMemberBinding="{Binding C}" Header="C"/>
</GridView>
</ListView>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With