The behaviour you're seeing is because the top level control (your form) and
the controls on it are in design mode, the other user control (uc2) is just
part of the implementation of the designing user control (uc1). Notice how
you can't select uc2 when you're designing the form?
In uc2, you can check the Parent.DesignMode (it's protected, you'll need to
add a property to expose it). We have an interface which all our controls
implement to allow controls to check their parent's DesignMode
polymorphically.
If you wanted to get it going quickly, you can also use the value of
Application.ExecutablePath.ToLower().IndexOf("devenv.exe") > -1. You might
want to cache this value, it may have an impact on performance if it's called
frequently.
Hope this helps.
Regards,
Matt Garven
> I have a user control (uc2)which lives on another user control (uc1) on a
> form (a nested user control). When I open the form in design view the the
[quoted text clipped - 12 lines]
>
> Thanks.