开发者

Is there a measurestring equivalent in Silverlight xaml?

What I am trying to accomplish: Create a dynamic bubble that expands on height and width depending on the amount of text in the bubble.

What I researched so far: In a SO article they described utilizing the measurestring function to figure out the exact width or height so dynamic changes in the .cs to the width and height can be accomplished.

Is there something like this in Silverlight? Is the only option I have is to utilize the myTxt.Text.length and then change the myGrid.height and myGrid.width to leave wasted spac开发者_C百科e to accommodate all cases?


On the TextBlock you will find the properties ActualWidth and ActualHeight. I think that is what you are looking for.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜