Windows Mobile 7:将滚动条添加到文本块或文本框 [英] Windows mobile 7 : Adding scrollbar to a textblock or textbox
本文介绍了Windows Mobile 7:将滚动条添加到文本块或文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是一个简单的应用程序,其中
用户在文本框中输入一些行.
我必须将其显示在文本块或文本框中.
但无法一次显示全部内容.
因此,我需要滚动显示该内容.
我使用了以下代码:
(但不起作用.实际上,不是滚动
textblock/textbox的内容,它滚动
textblock或文本框本身.)
Hye,
i m maing a simple application where
user enters some lines in a textbox.
i''ve to show it into either a textblock or a textbox.
but whole content can''t be shown at a time.
so, i need to scroll that content.
i have used the following code:
(but it doesn''t works. Actually, instead of scrolling
the content of textblock/textbox, it scroll the
textblock or the textbox itself.)
<scrollviewer maxheight="135" name="scrollViewer2" width="228" horizontalscrollbarvisibility="Disabled" verticalscrollbarvisibility="Auto">
<textblock height="185" lineheight="21.333" name="textBlock1" text="TextBlock" width="228" textwrapping="Wrap" />
</scrollviewer>
<scrollviewer maxheight="149" name="scrollViewer1" width="233" horizontalscrollbarvisibility="Disabled" verticalscrollbarvisibility="Visible">
<textbox height="188" name="textBox2" text="TextBox" width="215" verticalscrollbarvisibility="Visible" textwrapping="Wrap" />
</scrollviewer>
请复制代码并检查
Please copy code and review
推荐答案
您是否尝试过以下方法:
http://forums.silverlight.net/forums/t/14935.aspx [ ^ ]
问候
Espen Harlinn
Have you tried something like this:
http://forums.silverlight.net/forums/t/14935.aspx[^]
Regards
Espen Harlinn
这篇关于Windows Mobile 7:将滚动条添加到文本块或文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文