问题描述
是否有人试图将大量文本粘贴到RichEditBox中?当我说大的时候,我说的是一个文本文件~100KB,1000多行。基本上我用记事本,ctrl-c,切换到我的Metro应用程序和ctrl-v打开文本文件。它有效,但我的Core i5需要20-30美元b $ b秒,1个核心100%占用。
Have anyone tried to paste large amount of text into RichEditBox? When I say large I'm talking about a text file ~100KB with 1000+ lines. Basically I opened the text file with notepad, ctrl-c, switch to my Metro app, and ctrl-v. It works but it'll take 20-30 seconds on my Core i5 with 1 core 100% occupied.
不确定我做错了什么?顺便说一句,在官方的TextEditing样本中它是一样的。
Not sure if I'm doing anything wrong? Btw, it's the same in the official TextEditing sample.
推荐答案
这是在某些情况下RichEditBox的已知问题。 您可以通过为RichEditBox设置宽度/高度来处理它,或者将RichEditBox放在其他内容中,例如设置了宽度和高度的网格。
This is a known issue with RichEditBox in certain cases. You can work around it by setting a Width/Height for the RichEditBox, or putting the RichEditBox inside something else like a Grid that has a Width and Height set.
Andre
这篇关于关于将大文本粘贴到RichEditBox中的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!