>Hi,
>
>Can anyone point me to a clear explanation of the differences between TextWrapping.WrapWithOverflow and TextWrapping.Wrap
>
>The behaviour that I see seems counter-intuitive:
>
>If, usingTextWrapping.Wrap, I type in a word that is too long to fit the available width it will automatically wrap the excess to the next line.
>
>With TextWrapping.WrapWithOverflow if does not.......
>
>Feels to me it should be the other way around ?
http://msdn.microsoft.com/en-us/library/system.windows.textwrapping.aspxWrap: Line-breaking occurs if the line overflows beyond the available block width, even if the standard line breaking algorithm cannot determine any line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.
WrapWithOverflow: Line-breaking occurs if the line overflows beyond the available block width. However, a line may overflow beyond the block width if the line breaking algorithm cannot determine a line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.
Based on that wrap will always wrap, WrapWithOverflow will only wrap if it finds a valid place to break the line.
"WrapWithOverflow " just plain seems like a bad choice of words to describe what it's doing. WrapOnValidBreakOnly might have been a better choice.