WPF text Wrap vs WrapWithOverflow

前端 未结 3 1183
北海茫月
北海茫月 2020-12-04 17:30

What\'s the \"conceptual\" difference between TextWrapping=\"Wrap\" and TextWrapping=\"WrapWithOverflow\" (e.g. for a TextBox)? In the MSDN page ab

3条回答
  •  失恋的感觉
    2020-12-04 17:36

    MSDN

    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.
    NoWrap No line wrapping is performed.
    Wrap 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.

    Hope this helps

提交回复
热议问题