Silverlight c# adding tooltip to textblock
I am generating a textblock in c# and want to add a tooptip to it which displays an image and some text. how can I do this withou开发者_如何学Got XAML?
Use code like this:-
TextBlock txt = new TextBlock();
txt.Text = "Hello World";
ToolTipService.SetToolTip(txt, "Some Content");
Note that you can replace "Some Content" with any UIElement
containing pretty much any content you wish.
精彩评论