我想在silvelight页面中显示大文本数据吗?文本数据应该是可滚动的,如何解决? [英] I want to show large text data in a silvelight page?the text data should be scrollable what is the solution?

查看:102
本文介绍了我想在silvelight页面中显示大文本数据吗?文本数据应该是可滚动的,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在silvelight页面中显示大文本数据吗?文本数据应该可滚动是什么解决方案?

I want to show large text data in a silvelight page?the text data should be scrollable what is the solution?

推荐答案

使用TextBox并设置IsReadOnly属性为true.还要查看属性Horizo​​ntalScrollBarVisibility,VerticalScrollBarVisibility和TextWrapping.
Use a TextBox and set the IsReadOnly property to true. Also look at the properties HorizontalScrollBarVisibility, VerticalScrollBarVisibility, and TextWrapping.




您可以将TextBox与TextMode ="Multiline"一起使用.这看起来像是带有滚动条的TextArea.

您还可以在ScrollViewer中使用StackPanel来保存自定义UserControl,以加载内容.

如果您使用的是Silverlight 4.0 Beta,则也可以使用RichTextArea.

如果有帮助,请投票.
Hi,

You can use TextBox with TextMode = "Multiline". This will look like a TextArea having a Scrollbar on it.

You can also use StackPanel inside ScrollViewer to hold custom UserControls to load the contents.

If you are using Silverlight 4.0 Beta you can use RichTextArea too.

Please vote for it if this helps you.


要垂直滚动,您必须将文本框的宽度固定为某种尺寸,以使滚动条可以工作.将最大宽度设置为自动,然后打开垂直滚动.

< Textblock ScrollViewer.VerticalScrollBarVisibility ="Auto" MaxWidth ="50"/>
To scroll vertically, You will have to fix the width of the textbox to something to allow a scroller to work. Set the max width to auto and turn vertical scroll on.

<Textblock ScrollViewer.VerticalScrollBarVisibility="Auto" MaxWidth="50"/>


这篇关于我想在silvelight页面中显示大文本数据吗?文本数据应该是可滚动的,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆