RobinPerris / DarkUI

Dark themed control and docking library for .NET WinForms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dropdown list is exhausting a lot of resource

kreationnext opened this issue · comments

If a form has too many combobox, i mean dropdown list then it is using up a lot of resources as compared to other controls like textbox and others

@kreationnext @RobinPerris wouldn't this have something to do with .net implementation of the combo box and not the repo owner? As the project only uses the base for the combo box and then redesigns the control to suit the dark style, rather than creating an entirely new combo box control.

commented

First, can you clarify what you mean by 'using a lot of resources'? Are you monitor CPU/RAM usage, or a dotnet mechanism like GC? Can you also clarify if this is a problem with DarkDropdownList or DarkComboBox? They are both very different controls.

DarkComboBox is really nothing more than a standard WinForms ComboBox with custom rendering overrides to change the appearance. It does use additional resources for double buffering, but a few dozen bitmaps stored in memory shouldn't cause issues.

DarkDropdownList on the other hand is a custom control written from scratch. It uses a WinForms ContextMenuStrip to render the dropdown menu itself, however, which may cause problems with significantly large collections of items.

To be honest, in the context of user experience, neither of these controls should be used for more than a dozen or so options.

The issue is with DarkDropdownList. I switch it to DarkComboBox, made some few edits and now its working good

commented

👍