views:

159

answers:

1

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 space to accommodate all cases?

+1  A: 

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

Henrik Söderlund