Share via


ActivitySettingsPart.SwitchMode Method

Switches the activity UI between read only mode and edit mode.

Namespace: Microsoft.IdentityManagement.WebUI.Controls
Assembly: Microsoft.IdentityManagement.WFExtensionInterfaces (in microsoft.identitymanagement.wfextensioninterfaces.dll)

Usage

'Usage
Dim instance As ActivitySettingsPart
Dim mode As ActivitySettingsPartMode

instance.SwitchMode(mode)

Syntax

'Declaration
Public MustOverride Sub SwitchMode ( _
    mode As ActivitySettingsPartMode _
)
public abstract void SwitchMode (
    ActivitySettingsPartMode mode
)
public:
virtual void SwitchMode (
    ActivitySettingsPartMode mode
) abstract
public abstract void SwitchMode (
    ActivitySettingsPartMode mode
)
public abstract function SwitchMode (
    mode : ActivitySettingsPartMode
)

Parameters

  • mode
    Represents read only mode or edit mode.

Example

For the complete code example, see Creating a User Interface for the Activity.

public override void SwitchMode(ActivitySettingsPartMode mode)
{
    bool readOnly = (mode == ActivitySettingsPartMode.View);
    this.SetTextBoxReadOnlyOption("txtLogFilePath", readOnly);
    this.SetTextBoxReadOnlyOption("txtLogFileName", readOnly);
}

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

Windows 2008 x64 Edition

Change History

See Also

Reference

ActivitySettingsPart Class
ActivitySettingsPart Members
Microsoft.IdentityManagement.WebUI.Controls Namespace