Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Add Tooltip - ListView

$
0
0

Hi,

I have to create GridViewColumn dynamically from the code behind. In addition to displaying value, each cell should display the value in tooltip (tooltip helps when the value is too long). I have read that I need to add textblock in order to add tooltip however I had no luck implementing tooltip in the code behind. I would appreciate a help on constructing the gridview with tooltip in code behind:

 Here is the original construction (prior to adding textblock):

for (int i = 0; i < items.Length; i++)
{
    var column = new GridViewColumn();
    string bindingValue = "items["+i+"].DisplayValue";
    column.DisplayMemberBinding = new Binding(bindingValue);
    column.Header = items[i].Name;
    grdView.Columns.Add(column);
}


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>