I am dynamically creating xamwebtree. I want to show tooltip only for those nodes whose text is not completly visible. Any quick response will be appreciated.
Hi Rawat,
You can use some logic to adding a Tooltip to the tree node based on the length of the header like:
private void Button_Click(object sender, RoutedEventArgs e)
{
XamWebTreeItem item = new XamWebTreeItem();
item.Header = igTxt.Text;
string header = igTxt.Text;
if (header.Length > 20)
ToolTip tooltip = new ToolTip() { Content = item.Header };
ToolTipService.SetToolTip(item, tooltip);
}
xamWebTree1.Items.Add(item);
Where is the igTxt is text box.
I am following up this thread to see if the supplied code works for you? Were you able to show up tooltips for nodes with long header text?