CustomProjectSetting.DesignMode

True if we're in design mode, which allows settings to be changed.

public sealed bool DesignMode { get; set; }

See also:

Class CustomProjectSetting