开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜