Skip to the content.

PromptPlus API:IControlList

Build Publish License NuGet Downloads

Back to List Api

IControlList

Namespace: PPlus.Controls

Represents the interface with all Methods of the AddtoList control

public interface IControlList : IPromptControls<IEnumerable<String>>

Implements IPromptControls<IEnumerable<String>>

Methods

AcceptInput(Func<Char, Boolean>)

Execute a function to accept input.
If result true accept input; otherwise, ignore input.

IControlList AcceptInput(Func<Char, Boolean> value)

Parameters

value Func<Char, Boolean>
function to accept input

Returns

IControlList

AddItem(String, Boolean)

Add item to list

IControlList AddItem(string value, bool immutable)

Parameters

value String
Text item to add

immutable Boolean
true the item cannot be removed; otherwise yes.

Returns

IControlList

AddItems(IEnumerable<String>, Boolean)

Add items colletion to list

IControlList AddItems(IEnumerable<String> values, bool immutable)

Parameters

values IEnumerable<String>
items colletion to add

immutable Boolean
true the item cannot be removed; otherwise yes.

Returns

IControlList

AddValidators(params Func<Object, ValidationResult>[])

Add a validator to accept sucessfull finish of control.
Tip: see to validators embedding

IControlList AddValidators(params Func<Object, ValidationResult>[] validators)

Parameters

validators Func<Object, ValidationResult>[]
the function validator.

Returns

IControlList

AllowDuplicate(Boolean)

Allow duplicate items.Default value for this control is false.

IControlList AllowDuplicate(bool value)

Parameters

value Boolean
Allow duplicate items

Returns

IControlList

ChangeDescription(Func<String, String>)

Dynamically change the description using a user role

IControlList ChangeDescription(Func<String, String> value)

Parameters

value Func<String, String>
function to apply change

Returns

IControlList

Config(Action<IPromptConfig>)

Custom config the control.

IControlList Config(Action<IPromptConfig> context)

Parameters

context Action<IPromptConfig>
action to apply changes. IPromptConfig

Returns

IControlList

Default(String)

Default initial value when when stated.

IControlList Default(string value)

Parameters

value String
initial value

Returns

IControlList

HotKeyEditItem(HotKey)

Overwrite a HotKey to edit item. Default value is ‘F2’

IControlList HotKeyEditItem(HotKey value)

Parameters

value HotKey
The HotKey to edit item

Returns

IControlList

HotKeyRemoveItem(HotKey)

Overwrite a HotKey to remove item. Default value is ‘F3’

IControlList HotKeyRemoveItem(HotKey value)

Parameters

value HotKey
The HotKey to remove item

Returns

IControlList

InputToCase(CaseOptions)

Transform char input using CaseOptions.

IControlList InputToCase(CaseOptions value)

Parameters

value CaseOptions
Transform option

Returns

IControlList

Interaction<T>(IEnumerable<T>, Action<IControlList, T>)

Execute a action foreach item of colletion passed as a parameter

IControlList Interaction<T>(IEnumerable<T> values, Action<IControlList, T> action)

Type Parameters

T
Type external colletion

Parameters

values IEnumerable<T>
Colletion for interaction

action Action<IControlList, T>
Action to execute

Returns

IControlList

MaxLength(UInt16)

MaxLength of input text.The value must be greater than or equal to 1
Default value is 0 (no limit)

IControlList MaxLength(ushort value)

Parameters

value UInt16
Length

Returns

IControlList

PageSize(Int32)

Set max.item view per page.
Default value : 10.The value must be greater than or equal to 1

IControlList PageSize(int value)

Parameters

value Int32
Number of Max.items

Returns

IControlList

Range(Int32, Nullable<Int32>)

Defines a minimum and maximum (optional) range of items in the list

IControlList Range(int minvalue, Nullable<Int32> maxvalue)

Parameters

minvalue Int32
Minimum number of items

maxvalue Nullable<Int32>
Maximum number of items

Returns

IControlList

Styles(ListStyles, Style)

Overwrite Styles

IControlList Styles(ListStyles content, Style value)

Parameters

content ListStyles
The ListStyles content

value Style
The Style to apply

Returns

IControlList

SuggestionHandler(Func<SuggestionInput, SuggestionOutput>)

Add Suggestion Handler feature

IControlList SuggestionHandler(Func<SuggestionInput, SuggestionOutput> value)

Parameters

value Func<SuggestionInput, SuggestionOutput>
function to apply suggestions. SuggestionInput and SuggestionOutput

Returns

IControlList


Back to List Api