G
Guest
It seems to me there is no reliable way to detect design mode early enough to
prevent, running code a significant amount of code in classes developers are
writing. Currently the DesignMode flag is not set till the ISite is set
which unfortuantely happens after construction of whatever object, control or
component you are in, which means a signficant amount of code may run before
being able to determine design mode.
So how do we stop code from running if we can't detect design mode. What we
have tried to do in some cases is protected code with null checks and other
checks to avoid issues but that could make it harder to track real issues at
run time and is not always workable.
Is there a way we can determine design mode in the construction of the
object? Without that we're pretty much stuck.
Thanks
prevent, running code a significant amount of code in classes developers are
writing. Currently the DesignMode flag is not set till the ISite is set
which unfortuantely happens after construction of whatever object, control or
component you are in, which means a signficant amount of code may run before
being able to determine design mode.
So how do we stop code from running if we can't detect design mode. What we
have tried to do in some cases is protected code with null checks and other
checks to avoid issues but that could make it harder to track real issues at
run time and is not always workable.
Is there a way we can determine design mode in the construction of the
object? Without that we're pretty much stuck.
Thanks