Share via


SPMobileComponent.ControlMode Property

Gets an object that specifies whether the control's mode is for the New form, the Display form, or the Edit form.

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

Public Overridable ReadOnly Property ControlMode As SPControlMode
    Get

Dim instance As SPMobileComponent
Dim value As SPControlMode

value = instance.ControlMode
public virtual SPControlMode ControlMode { get; }

Property Value

Type: Microsoft.SharePoint.WebControls.SPControlMode
An SPControlMode object that specifies whether the control's mode is for the New form, the Display form, or the Edit form. The default is Display.

Remarks

The default implementation returns the same value as the ControlMode property of the object in the MobileContext property. Use SPMobileComponent.ControlMode instead of the SPMobileContextControlMode() property of the object held in SPMobileComponent.MobileContext to simplify your code. Do not override ControlMode or you create a chance that its value will be inconsistent with the value of MobileContextControlMode().

See Also

Reference

SPMobileComponent Class

SPMobileComponent Members

Microsoft.SharePoint.MobileControls Namespace