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
 
Back
Top