Answer the question
In order to leave comments, you need to log in
Text wrapping in WPF?
Evening in the hut, an hour of joy!
Got a question.
There is a template for displaying messages (UserControl).
It has a TextBlock for the message itself. Set TextWrapping to Wrap.
The text is wrapped. But until the height of the UserControl "runs out".
Question - how to stretch the height of the UserControl, depending on the height of the content?
Answer the question
In order to leave comments, you need to log in
We need to make sure that:
- The UserControl (and its containers) are not in a container that does not allow dynamic expansion (a StackPanel with Orientation == Vertical will prevent us from expanding in height)
- Check properties like VerticalAlignment, Height, MaxHeight, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question