Re: How do you turn off painting/redraw for a user control?
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 9 Dec 2007 17:11:38 +0100
Are you using combo-boxes? One of the classic problems with data bound combo boxes is that they fire their SelectedItemChanged event as each item is bound.
As to your use of Infragistics tools, be aware that Infragistics uses different principles to those of Windows Forms and tuning these controls can present a problem. As this is an essentially Microsoft forum I suggest you hit the Ifragistics dedicated newsgroups.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"tribbles" <shiretrib@xxxxxxxxx> wrote in message news:1190149774.202618.227290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Sep 18, 2:21 am, "Bob Powell [MVP]" <b...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Do you have other code in these controls such as changed event handlers that
in-turn fire off an Invalidate or something. These can cause "ringing"
poblems where the whole system goes mad sending updates for a while and then
takes a while to setle down.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consultinghttp://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Trickshttp://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQhttp://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"tribbles" <shiret...@xxxxxxxxx> wrote in message
news:1190050310.148258.239290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> On Sep 15, 2:12 am, "Bob Powell [MVP]" <b...@xxxxxxxxxxxxxxxxxxxxxxx>
> wrote:
>> Your best bet is to revisit the user controls themselves to see if you
>> have
>> inefficiencies in the children that are holding things up.
> I've come across something that is working ok, but is much slower than
> expected.. I create everything in a panel is not linked to anything
> and then once all the children are created, I add the panel to the
> screen. For my test case is takes about 3 seconds to create
> everything on the panel. The suprising part is that it takes 1.5
> seconds for the program to add the panel to the screen. It looks
> quite a bit better than adding all the controls directly to the screen
> of course, but I assumed it would take a fraction of a secont to
> render and I'm confused as to why it would take so long to render a
> bunch of textboxes, checkboxes and dropdowns (I have roughly 10
> controls bundled into a user control that represents a row and I have
> 5 rows).- Hide quoted text -
- Show quoted text -
I am seeing the 'event storm' occur with some debugging and profilign
tools I have. My user controls directly have very few triggering
events. However, I use a tab control from Infragestics to host my
user control on one of its tabs and it has a couple of events being
triggered hundreds of times during all of this. My current plans is
to switch to the MS tab control to see if this problem goes away, as I
can not descern any reasonable reason for the event storm, nor can I
track exactly what is triggering it. Near as I can tell, the event
storm starts when I add the panel with my user controls to the tab
page.
As for the creation of my user controls, they do have their own event
storms going on (thus the 3 seconds) but I understand those and I'm
slowly working thru them. By the time I added the user panel with my
custom controls on it to the tab page, my event storm from the items
changes is finished. When I add the panel, my user controls are
getting 40+ refresh calls before being fully rendered. Yet none of my
Changed events are firing... Also the background paint event seems to
be called most often...
While I am havign good success tracing what happens when I place my
controls in the MS panel... I've been unable to trace through the
infragestic controls to see what is going on, which is a bit
frustrating...
.
- Prev by Date: Re: ControlDesigner for a window form
- Next by Date: Re: where should I keep all the funtions?
- Previous by thread: Re: ControlDesigner for a window form
- Next by thread: Re: Setting PictureBox BackColor at runtime
- Index(es):
Relevant Pages
|