Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrap and WrapWithOverflow
Message
De
23/12/2009 04:13:10
 
 
À
22/12/2009 23:09:50
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01440053
Message ID:
01440306
Vues:
25
>>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.aspx
>
>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.
>
>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.

I think the source of my confusion was thinking of 'WrapWithOverflow' as meaning 'Wrap ON overflow'
IAC your suggested name is better (though longer :-{ )
Best,
Viv
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform