Odd behavior with .NET 2.0 winforms

N

NFXBeats

Maybe this is normal, but as I type in the code file, the designer tab
shows the little asterisk indicating the file has changed in the
designer as well.

Normally this wouldn't bother me, but in my case the designer files
(including the .licx and resx) are also tagged as changed and get
checked out of source control. I am not changing the form itself, only
the code behind.

Even more troubling is that occasionally when the designer tab is open,
but not active and I am editing the code behind, every letter i type
causes a delay as long as 2-3 seconds. Closing the designer resolves
the problem.

One more oddity is that one of my toolstrips visible property is often
changing to false in the designer!

I have a feeling it may be a third party library I am using
(DevExpress) but I am not sure where to start troubleshooting this. It
is not easily reproducible if I create a new project, but it is very
common is a specific project.

Can someone provide me with some guidance please?
 
B

Bruce Wood

Some of what you describe happened even in VS2003, although it didn't
happen live as you typed.

Remember that the Designer serializes your layout into code, and so if
you change code, the Designer has no idea whether you've changed code
that may affect the layout, so it has no choice but to re-render the
layout, which may cause some background changes in the .resx.

Of course, in VS2005 the Designer is using partial class technology. It
should be able to distinguish between changes to the code it generated
and code you wrote. Even so, there are ways to write code in your part
of the partial class that will affect layout. The Designer is likely
just being over-cautious.

In VS2003 it does this only when switch back to the Designer view. It
sounds like in VS2005 the Designer re-evaluates on every keystroke. I
hope not: that would be annoying. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top