By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Partial Class Getting Extra Designer Form

P: n/a
Hi,

I have moved some of the implementation of a form into a second
file and enclosed it with "partial class ..." VS wants to give the
second file its own designer form. How do I prevent that and how
do I get rid of the second one?

Thanks,
Gary
Jul 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Gary Brown"
I have moved some of the implementation of a form into a second
file and enclosed it with "partial class ..." VS wants to give the
second file its own designer form. How do I prevent that and how
do I get rid of the second one?
I should have added that I started with a blank code file for the second
implementation file.


Jul 11 '07 #2

P: n/a
Not sure how to prevent VS to display the blank designer form, but you can
manually modify the project file for your partial class to include the
following node:
<DependentUpon>MyFormFileName.cs</DependentUpon>
(or vb) - this way when you open your project, the partial class appears
under your form, sumilar to Designer class. You will still need to open with
View-Code rather then double-clicking though.

If anyone knows how to let VS know that the new partial definition should
NOT have a separate (blank) designer, or at least how to define default
opening action on it as code view - would appreciate a lot.

"Gary Brown" wrote:
"Gary Brown"
I have moved some of the implementation of a form into a second
file and enclosed it with "partial class ..." VS wants to give the
second file its own designer form. How do I prevent that and how
do I get rid of the second one?

I should have added that I started with a blank code file for the second
implementation file.


Jul 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.