is there a possibility to prevent a textblock from resize it’s parent?
I have a textblock with a lot of text and I want it to wrap, but not to enlarge the parents size. The size of the parent may be variable.
Greetings Thomas
is there a possibility to prevent a textblock from resize it’s parent? I have
Share
Unfortunately there is no Property for this feature.
The only workaround that I’m aware of is to either use an existing control or place another hidden control in the same space and then bind
Widthof yourTextBlock/TextBoxto theActualWidthof that control.Here is an example when the
TextBlockdoesn’t effect theWidthof theColumnDefinitionbut it will get wider if theColumnDefinitionis resized for another reason