SPContext.IsRemoteAuthoringTime property
SharePoint 2013
Gets a value that represents whether the current request renders for design time.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Property value
Type: System.BooleanReturns a Boolean value of true if the Current request is rendering for design time.