UiPath Documentation
sdk
latest
false
Developer guide

UiPath.Studio.Activities.Api.Settings

In this section you can find more information on how to build activities using UiPath.Studio.Activities.Api.Settings.

IActivitiesSettingsService​

Entry point for settings-related functionality.

Inheritance​

IActivitiesSettingsReader > IActivitiesSettingsService

Methods​

void AddCategory(SettingsCategory category)​

Add a settings category in the project settings UI.

Parameter TypeParameter NameDescription
SettingsCategorycategoryThe description of the settings page.
void AddSection(SettingsCategory category, SettingsSection section)​

Add a section to this category.

Parameter TypeParameter NameDescription
SettingsCategorycategory
SettingsSectionsectionIf the section key does not start with the the category key, the latter is added as prefix of the former and the SettingsElement.Key value is updated.
void AddSetting(SettingsEditorControlContainer parent, SettingDescriptionBase setting)​

Generates a default Settings Editor based on the Setting and passes it to AddSetting(SettingsEditorControlContainer).

Parameter TypeParameter NameDescription
SettingsEditorControlContainerparentThe SettingsCategory or SettingsSection where the generated setting control is appended.
SettingDescriptionBasesettingThe setting description that is used to generate a control.
void AddSetting(SettingsEditorControlContainer parent, SettingsEditorControl setting)​

Add a settings control

Parameter TypeParameter NameDescription
SettingsEditorControlContainerparentThe SettingsCategory or SettingsSection where the generated setting control is appended.
SettingsEditorControlsettingThe setting description that is used to generate a control.
bool TrySetValue (string key, string value)​

Sets and saves a setting value.

Parameter TypeParameter NameDescription
stringkeyThe key of the setting.
stringvalueThe value of the setting.

ModernClassicSettings​

Note:

This feature was introduced in UiPath.Studio.Activities.Api v21.10.

Defines how an activity package prefers to handle Modern vs Classic activities. If set to UseGlobalSetting, it will defer the behavior to the global Studio setting. Having it explicitly set to either UseModern or UseClassic will result in the setting being overwritten for the particular package.

Constants​

TypeNameDescription
stringUseGlobalSettingDefers the decision to the global Studio setting.
stringUseModernMakes the modern activities the default.
stringUseClassicMakes the classic activities the default.

MultipleValuesSelectorDescription​

A setting that allows selecting multiple values from a predefined collection of values.

Inheritance​

SettingsElement > SettingDescriptionBase > MultipleValuesSelectorDescription

Properties​

TypeNameDescription
stringValuesPossible values to select.
stringDefaultValuesDefault selection.

SettingDescriptionBase​

Format a value for display.

Inheritance​

SettingsElement > SettingDescriptionBase

Properties​

TypeNameDescription
stringDescriptionAn explanation of the setting.
boolIsReadOnlyIf set to true, the value is not editable nor persisted.
boolIsDesignTimeReturns trueif invoked at design time. Requires Studio 2021.10 or later.
stringLabelThe label to use for this setting.
boolRequiresPackageReloadIf set to true, changing this setting requires a package reload. Requires Studio 2021.10 or later.

SettingDescriptionBase ​

A setting description that applies for a certain type.

Inheritance​

SettingsElement > SettingDescriptionBase > SettingDescriptionBase

Generic Type T​

The type of setting for which this description applies.

Properties​

TypeNameDescription
Func<T, string>GetDisplayValueFunction that needs to return a formatted display value for a given type.

SettingsControlBase​

A settings element that is part of the UI.

Inheritance​

SettingsElement > SettingsControlBase

Properties​

TypeNameDescription
boolIsDesignTimeReturns true when invoked at design time. Requires Studio 2021.10 or later.
boolRequiresPackageReloadIf set to true, changing this setting requires a package reload This only applies to design time settings. Requires Studio 2021.10 or later.

SettingsEditorControlBase​

Settings editor. It appears as a label with an associated control. An instance of this can be passed to SettingsSection.AddSetting(SettingsEditorControl).

Inheritance​

SettingsElement > SettingsControlBase > SettingsEditorControlBase

Properties​

TypeNameDescription
ControlDescriptionBaseControlThe control to use for this setting.
stringDescription(Optional) A longer explanatory text for this setting, displayed as a tooltip.
stringLabel(Optional) The setting editor label. This can be a markdown text.

SettingsEditorControlContainer​

A settings UI element that can host editors.

Inheritance​

SettingsElement > SettingsControlBase > SettingsEditorControlContainer

SettingsElement​

Base class for settings elements with associated keys.

Properties​

TypeNameDescription
stringKeyThe unique key associated with this setting. Used for storage/retrieval.

SettingsCategory​

A settings category.

Inheritance​
Properties​
TypeNameDescription
stringDescription(Optional) Displayed bellow the title, explains the purpose of this page.
stringHeaderThe category header.
boolIsHiddenIf set to true, the category will not be displayed in the Project Settings dialog. Requires Studio 2020.4 or later.
Remarks​

Adds a category in activities project settings.

SettingsSection​

A settings group box containing related controls.

Inheritance​

Properties​

TypeNameDescription
stringDescription(Optional) Displayed bellow the title, an explanation the purpose of this section.
boolIsExpandedIf set to true, the section is expanded by default.
stringTitleThe section title.

Remarks​

Adds a settings group box to activities project settings.

SingleValueEditorDescription​

A setting entry that allows editing a single value of type T. A default editor is created based on T.

Inheritance​

Generic Type T​

The type of setting for which this description applies.

Properties​

TypeNameDescription
TDefaultValueThe default value of this setting.
Func<T, string>ValidateValidate a value (applies to editors that allow free text input).

SingleValueSelectorDescription​

A setting that allows selecting a single value from a predefined collection of values.

Inheritance​

Properties​

TypeNameDescription
string[]ValuePossible values to select.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated