开发者

WPF Performance Problems with derived TextBox controls

I have a WPF application that renders input forms based on form-configurations saved in a database.

The forms have many controls (100+) and most of these controls are derived from a TextBo开发者_运维问答x-control. On some machines (fast Hardware, Win7 32Bit, also some elder, Windows XP 32Bit), after entering data to a lot of these forms, input performance goes down. Every keystroke gets a delay of some milliseconds and the only solution to resolve this is to close the application and restart it.

My derived control overrides the metadata of the DefaultStyleKeyProperty to set a custom template.

I'm currently reasearching the app in SciTech memory profiler, but maybe someone has already experienced a similar problem with derived TextBoxes and can give me a hint and spare me some more hours/days investigating the problem?

Update

Look also here


It sounds like you may have something stopping the controls on the "used forms" being GCed.

Firstly opening and use as many forms as possible looking at the windows task manager to see if you memory usage is going up – if it is not there is no point looking for memory leeks

Check you are removing all events handlers you forms/controls have put on any long lived objects.

Check that any objects you databind to implement INotifyPropertyChanged, see KB938416

I have in the past had good results using the Red Gate memory profiler.


You don’t need to have controls created that the user can’t see, 100+ controls will have a cost.

Can you use something list a list control in virtual mode, so your TextBox controls are only created when visible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜