开发者

Silverlight c# adding tooltip to textblock

开发者 https://www.devze.com 2023-01-09 02:45 出处:网络
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:-

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

精彩评论

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