November Happy Hour will be moved to Thursday December 5th.

Class ContextModeExtension

Convenient extension methods for ContextMode

Inheritance
System.Object
ContextModeExtension
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public static class ContextModeExtension

Methods

EditOrPreview(ContextMode)

Determines if current context mode is Edit or Preview

Declaration
public static bool EditOrPreview(this ContextMode contextMode)
Parameters
Type Name Description
ContextMode contextMode

The context mode that is extended

Returns
Type Description
System.Boolean

True if context mode is edit or preview else false