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.
Ya this will work.
But for my case tooltip can be binded to a property or I can make the tree size wider or smaller in runtime. So executing this code all the time is not feasible.
Are you guys are planning to include this feature in future releases.
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?
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.