Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow