Rotated TextBlock incorrect size when resizable is false

We are seeing an issue with textblocks with rotated text where the containing shape is not resizable. In the image the left hand ‘Purpose’ textblock is in a shape that is resizable, the one on the right is in a shape that isn’t resizable. They are identical in every other respect (other than one having an angle of 90, the other 270). Has anyone seen this before?

How is the panel that contains the Shape and TextBlock defined? If you want the shape to be sized to surround the textblock, you might want to use an Auto panel.

I’m using an auto panel. It’s a fairly complicated template so I can’t post it here but I have found what seems to be the underlying cause. My panel has a binding on maxSize which gets set if the panel isn’t resizable. If I remove that the text block fills the whole panel. I think I can workaround it since we are setting resizable to false and also setting minSize and maxSize (in some cases we want to limit the height or width but not both). I think setting resizable to false should be sufficient in this particular case.

Part.resizable and other permission properties have no effect on how GraphObjects are measured and arranged. They only have an effect on whether Tools such as ResizingTool are enabled when the Part is selected.

Perhaps you want to set the angle on the Panel instead of on the TextBlock?

It’s the maxSize binding that was having some kind of effect, which was being added as a consequence of resizable being true. I’ve fixed the problem now.