Skip to the content.

PromptPlus API:IControlMultiSelect

Build Publish License NuGet Downloads

Back to List Api

IControlMultiSelect<T>

Namespace: PPlus.Controls

Represents the interface with all Methods of the MultiSelect control

public interface IControlMultiSelect<T> : IPromptControls<IEnumerable<T>>

Type Parameters

T
typeof return

Implements IPromptControls<IEnumerable<T>>

Methods

AddDefault(params T[])

Add default value selected to initial list.

IControlMultiSelect<T> AddDefault(params T[] values)

Parameters

values T[]
Value default

Returns

IControlMultiSelect<T>

AddDefault(IEnumerable<T>)

Add default value selected to initial list.

IControlMultiSelect<T> AddDefault(IEnumerable<T> values)

Parameters

values IEnumerable<T>
Values default

Returns

IControlMultiSelect<T>

AddItem(T, Boolean, Boolean)

Add item to list

IControlMultiSelect<T> AddItem(T value, bool disable, bool selected)

Parameters

value T
Item to add

disable Boolean
true item disabled, otherwise no

selected Boolean
true item selected, otherwise no

Returns

IControlMultiSelect<T>

AddItemGrouped(String, T, Boolean, Boolean)

Add Item in a group to list
AddItemGrouped cannot be used with OrderBy/OrderByDescending

IControlMultiSelect<T> AddItemGrouped(string group, T value, bool disable, bool selected)

Parameters

group String
Group name

value T
Item to add

disable Boolean
true item disabled, otherwise no

selected Boolean
true item selected, otherwise no

Returns

IControlMultiSelect<T>

AddItems(IEnumerable<T>, Boolean, Boolean)

Add items colletion to list

IControlMultiSelect<T> AddItems(IEnumerable<T> values, bool disable, bool selected)

Parameters

values IEnumerable<T>
items colletion to add

disable Boolean
true item disabled, otherwise no

selected Boolean
true item selected, otherwise no

Returns

IControlMultiSelect<T>

AddItemsGrouped(String, IEnumerable<T>, Boolean, Boolean)

Add Items colletion in a group to List
AddItemsGrouped cannot be used with OrderBy/OrderByDescending

IControlMultiSelect<T> AddItemsGrouped(string group, IEnumerable<T> value, bool disable, bool selected)

Parameters

group String
Group name

value IEnumerable<T>
items colletion to add

disable Boolean
true item disabled, otherwise no

selected Boolean
true item selected, otherwise no

Returns

IControlMultiSelect<T>

AddItemsTo(AdderScope, params T[])

Add Items colletion to scope Disable/Remove AdderScope
At startup the list items will be compared and will be removed or disabled
Tip: Use for custom comparer

IControlMultiSelect<T> AddItemsTo(AdderScope scope, params T[] values)

Parameters

scope AdderScope
scope Disable/Remove

values T[]
items colletion

Returns

IControlMultiSelect<T>

AddItemsTo(AdderScope, IEnumerable<T>)

Add Items colletion to scope Disable/Remove AdderScope
At startup the list items will be compared and will be removed or disabled
Tip: Use for custom comparer

IControlMultiSelect<T> AddItemsTo(AdderScope scope, IEnumerable<T> values)

Parameters

scope AdderScope
scope Disable/Remove

values IEnumerable<T>
items colletion

Returns

IControlMultiSelect<T>

ChangeDescription(Func<T, String>)

Dynamically change the description using a user role

IControlMultiSelect<T> ChangeDescription(Func<T, String> value)

Parameters

value Func<T, String>
function to apply change

Returns

IControlMultiSelect<T>

Config(Action<IPromptConfig>)

Custom config the control.

IControlMultiSelect<T> Config(Action<IPromptConfig> context)

Parameters

context Action<IPromptConfig>
action to apply changes. IPromptConfig

Returns

IControlMultiSelect<T>

EqualItems(Func<T, T, Boolean>)

Custom item comparator

IControlMultiSelect<T> EqualItems(Func<T, T, Boolean> comparer)

Parameters

comparer Func<T, T, Boolean>
function comparator

Returns

IControlMultiSelect<T>

FilterType(FilterMode)

Filter strategy for filter items in colletion
Default value is FilterMode.Contains

IControlMultiSelect<T> FilterType(FilterMode value)

Parameters

value FilterMode
Filter Mode

Returns

IControlMultiSelect<T>

HotKeyInvertSelected(HotKey)

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

IControlMultiSelect<T> HotKeyInvertSelected(HotKey value)

Parameters

value HotKey
The HotKey to Invert Selected item

Returns

IControlMultiSelect<T>

HotKeySelectAll(HotKey)

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

IControlMultiSelect<T> HotKeySelectAll(HotKey value)

Parameters

value HotKey
The HotKey to Select All item

Returns

IControlMultiSelect<T>

Interaction<T1>(IEnumerable<T1>, Action<IControlMultiSelect<T>, T1>)

Execute a action foreach item of colletion passed as a parameter

IControlMultiSelect<T> Interaction<T1>(IEnumerable<T1> values, Action<IControlMultiSelect<T>, T1> action)

Type Parameters

T1
Type external colletion

Parameters

values IEnumerable<T1>
Colletion for interaction

action Action<IControlMultiSelect<T>, T1>
Action to execute

Returns

IControlMultiSelect<T>

OrderBy(Expression<Func<T, Object>>)

Sort list by expression
OrderBy cannot be used with Grouped item

IControlMultiSelect<T> OrderBy(Expression<Func<T, Object>> value)

Parameters

value Expression<Func<T, Object>>
expresion to sort the colletion

Returns

IControlMultiSelect<T>

OrderByDescending(Expression<Func<T, Object>>)

Sort Descending list by expression
OrderBy cannot be used with Grouped item

IControlMultiSelect<T> OrderByDescending(Expression<Func<T, Object>> value)

Parameters

value Expression<Func<T, Object>>
expresion to sort the colletion

Returns

IControlMultiSelect<T>

OverflowAnswer(Overflow)

Overwrite Overflow strategy answer
Default value is Overflow.Ellipsis

IControlMultiSelect<T> OverflowAnswer(Overflow value)

Parameters

value Overflow
Overflow strategy

Returns

IControlMultiSelect<T>

OverwriteDefaultFrom(String, Nullable<TimeSpan>)

Overwrite defaults start selected value with last result saved on history.

IControlMultiSelect<T> OverwriteDefaultFrom(string value, Nullable<TimeSpan> timeout)

Parameters

value String
name of file to save history

timeout Nullable<TimeSpan>
The timeout for valid items saved. Default value is 365 days

Returns

IControlMultiSelect<T>

PageSize(Int32)

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

IControlMultiSelect<T> PageSize(int value)

Parameters

value Int32
Number of Max.items

Returns

IControlMultiSelect<T>

Range(Int32, Nullable<Int32>)

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

IControlMultiSelect<T> Range(int minvalue, Nullable<Int32> maxvalue)

Parameters

minvalue Int32
Minimum number of items

maxvalue Nullable<Int32>
Maximum number of items

Returns

IControlMultiSelect<T>

ShowTipGroup(Boolean)

Show tip with text of group. Default false

IControlMultiSelect<T> ShowTipGroup(bool value)

Parameters

value Boolean
If True, it shows the tip with the group text, otherwise nothing.

Returns

IControlMultiSelect<T>

Styles(MultiSelectStyles, Style)

Overwrite Styles

IControlMultiSelect<T> Styles(MultiSelectStyles styletype, Style value)

Parameters

styletype MultiSelectStyles
MultiSelectStyles of content

value Style
The Style

Returns

IControlMultiSelect<T>

TextSelector(Func<T, String>)

Function to show text Item in list.Default value is Item.ToString()

IControlMultiSelect<T> TextSelector(Func<T, String> value)

Parameters

value Func<T, String>
Function to show text Item in list

Returns

IControlMultiSelect<T>


Back to List Api