Detecting DesignMode?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the correct way to detect Design Mode when building controls in
WinForms?
Thank you
 
DesignMode is always false if ISite is not implememnted (which is stated in
Documentation). In my case DesignMode is always false. Any other suggestions?
 
Actually it says that DesignMode is false if the component
doesn't have an ISite associated with it.

You can't use it in the constructor if that's what you're doing
(since the ISite hasn't been associated yet). Move your
code to another place.

/claes
 
Ok, thanks all!

Claes Bergefall said:
Actually it says that DesignMode is false if the component
doesn't have an ISite associated with it.

You can't use it in the constructor if that's what you're doing
(since the ISite hasn't been associated yet). Move your
code to another place.

/claes
 

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

Back
Top