RichTextBox在Windows 7和Vista上缓慢刷新 [英] RichTextBox slow refreshing on Windows 7 and Vista

查看:103
本文介绍了RichTextBox在Windows 7和Vista上缓慢刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我对RichTextBox的性能(打字时)有问题。


这是我的简单窗口:
$


< 窗口
x
=" RichTextBoxPerformance.Window1"

xmlns = http://schemas.microsoft.com/winfx/2006/xaml/演示文稿

xmlns x = http://schemas.microsoft.com/winfx/2006/xaml

标题 =" RichTextBox测试"
高度
=" 300" 宽度 =" 300">

< RichTextBox
/>

< /
窗口 >


后面没有代码。我的示例基于WPF版本3.5。我也建立了WPF版本4.0的示例存在同样的问题。


如果我在Windows 7(32位和64位)或Vista上运行此示例,RichTextBox刷新文本的速度很慢如果我在XP SP3上运行它,那么RichTextBox刷新速度非常快。


问题是什么,我该如何解决这个问题,或者这是一个错误?


感谢您的帮助。

jproud


 

解决方案

< blockquote>

您好JProud,


您是否为RichTextBox加载了一个大尺寸的文件?请提供更多信息或步骤以便我们重现这个问题?


实际上,我的操作系统是windows7,但之前我没有遇到过同样的问题。你可以看看下面谈到类似问题而没有完美答案。但我认为可以提供一些提示:

<小时EF = "http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c0aa9e05-0d06-418d-a2dd-b01bd35f7a19"> http://social.msdn.microsoft.com/Forums/ en-US / wpf / thread / c0aa9e05-0d06-418d-a2dd-b01bd35f7a19


关心,

Aland Li


Hi together,

I've a problem with the Performance (while typing) of the RichTextBox.

This is my simple window:

<Window x:Class="RichTextBoxPerformance.Window1"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Title="RichTextBox Test" Height="300" Width="300">
<RichTextBox />
</
Window>

There is no code behind. My sample is based on WPF Version 3.5. I've also built a sample with WPF Version 4.0 and there is the same problem.

If I run this sample on a Windows 7 (32Bit and also 64Bit) or on Vista the RichTextBox refreshs the text very slow. If I run this on a XP SP3 the RichTextBox refreshs quite fast.

What is the Problem, how can i solve this, or is this a bug?

Thanks for every help.
jproud

 

解决方案

Hi JProud,

Did you load a file of a big size to the RichTextBox? Could you please provide more information or steps so we can reproduce the issue?

Actually, my operation system is windows7, but I did not meet the same issue before. You can take a look at the tread below which talks about a similar issue without a perfect answer. But I think it can provide some hints:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c0aa9e05-0d06-418d-a2dd-b01bd35f7a19

Regards,
Aland Li


这篇关于RichTextBox在Windows 7和Vista上缓慢刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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