我应该在 Silverlight 网站上使用哪些控件来加载文本内容?
我正在着手开发一个基于 Silverlight 的网站。我是孤独的开发人员,并且是我自己做的(即不为任何公司)。
现在我想在网站上加载大量文本内容以及可以使用 Silverlight 创建的动画和丰富的用户界面。文本内容可能会不时发生变化,当这种情况发生时,我不想做很多返工。因此,我正在考虑将 Word/文本文件中的文本加载到控件中,每当新内容到达/现有内容被修改时,我只需将其附加到 Word/文本文件中。
这样应用程序本身就保持不变,只有文件内容不断变化。 Silverlight 不支持 FlowDocument。 RichTextBox 没有 Load 或 LoadFile 属性。那么我该怎么办呢?我还应该使用 Frame、Downloader 和类似的其他控件吗?你有什么建议?对此最好的方法是什么?
I am embarking on development of a Silverlight based website. I am the lone developer and am doing it on my own (ie, not for any company).
Now I want to load a lot of textual content on the website along with animations and rich user interfaces that can be created using Silverlight. The text content may change from time to time and when that happens, I don't want to do a lot of rework. So I m thinking to load the text from a Word/text file into controls and whenever new content arrives/existing content is modified, I just have to append it to the Word/text file.
This way the application itself remains untouched, only the file contents keep changing. Silverlight doesn't support FlowDocument. RichTextBox doesnt have a Load or LoadFile property. So how do I go about this? Should I make use of Frame, Downloader and similar other controls as well? What do you suggest? What would be the best approach to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
RichTextBox
确实具有Xaml
属性,因此您可以下载包含RichTextBox
支持的受限文本元素集的 Xaml 文件。您还可以创建一个 Silverlight 编辑器,围绕该编辑器可以创建和上传此 Xaml 文本内容。但是您是否考虑过 Silverlight 是否是主要交付文本内容的正确平台? HTML 在这方面非常擅长,使用 JQuery 等框架,您可以创建跨浏览器运行良好的交互式体验。
The
RichTextBox
does have aXaml
property so you could download Xaml files containing the restricted set of textual elements thatRichTextBox
supports. You could also create a Silverlight editor around which you could create and upload this Xaml text content.However have you considered whether Silverlight is the right platform to deliver primarily textual content? HTML is pretty good at that and with frameworks such as JQuery you can create quite interactive experiences that work well across browsers.