通过修改移动控件的Wrapping属性,可以控制Label控件或TextView控件中文本自动换行显示。Wrapping属性的可选值为NotSet,Wrap和NoWrap.
如果设置为NoWrap,那么表单中一行内超过屏幕的文本将不会自动的换行到新的一行中。程序清单页面的表单中包含一个很长的文本,其换行被禁用。
如果设置为NoWrap,那么表单中一行内超过屏幕的文本将不会自动的换行到新的一行中。程序清单页面的表单中包含一个很长的文本,其换行被禁用。
C#代码
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" %>
<Mobile:Form runat="server">
<Mobile:TextView
Wrapping="NoWrap"
Runat="Server">
This is a line of text that goes off the side of the page because it is very long
</Mobile:TextView>
</Mobile:Form>
VB。NET代码
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" %>
<Mobile:Form runat="server">
<Mobile:TextView
Wrapping="NoWrap"
Runat="Server">
This is a line of text that goes off the side of the page because it is very long
</Mobile:TextView>
</Mobile:Form>







