Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
It inherits Layout.
The MultiButtonEntry is a widget, that lets a user enter text and each chunk of the text managed as a set of buttons.
Each text button is inserted by pressing the "return" key. If there is no space in the current row, a new button is added to the next row.
When a text button is pressed, it will become focused. Backspace removes the focus. When the multi-button entry loses focus, items longer than one line are shrunk to one line.
The typical use case of multi-button entry is composing emails/messages to a group of addresses, each of which is an item that can be clicked for further actions.
public class MultiButtonEntry : Layout, IAccessibleObject
- Inheritance
-
System.Object
MultiButtonEntry
- Implements
-
Constructors
View Source
MultiButtonEntry(EvasObject)
Creates and initializes a new instance of the MultiButtonEntry class.
Declaration
public MultiButtonEntry(EvasObject parent)
Parameters
Type |
Name |
Description |
EvasObject |
parent |
The parent is a given container, which will be attached by the MultiButtonEntry as a child. It's EvasObject type.
|
API Level: preview
Properties
View Source
Entry
Gets the entry object int the MultiButtonEntry.
Declaration
public Entry Entry { get; }
Property Value
API Level: preview
View Source
FirstItem
Gets the first item in the MultiButtonEntry.
Declaration
public MultiButtonEntryItem FirstItem { get; }
Property Value
API Level: preview
View Source
IsEditable
Gets or sets whether the MultiButtonEntry is editable or not.
Declaration
public bool IsEditable { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
API Level: preview
View Source
IsExpanded
Gets or sets the MultiButtonEntry to expanded state.
If true, expanded state.
If false, single line state.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
API Level: preview
View Source
LastItem
Gets the last item in the MultiButtonEntry.
Declaration
public MultiButtonEntryItem LastItem { get; }
Property Value
API Level: preview
View Source
SelectedItem
Gets the selected item in the MultiButtonEntry.
Declaration
public MultiButtonEntryItem SelectedItem { get; }
Property Value
API Level: preview
Methods
View Source
Append(String)
Appends a new item to the multibuttonentry.
Declaration
public MultiButtonEntryItem Append(string label)
Parameters
Type |
Name |
Description |
System.String |
label |
The label of the new item.
|
Returns
API Level: preview
View Source
AppendFilter(Func<String, Boolean>)
Appends an item filter function for the text inserted in the multibuttonentry.
Declaration
public void AppendFilter(Func<string, bool> func)
Parameters
Type |
Name |
Description |
Func<System.String, System.Boolean> |
func |
The function to use as item filter.
|
API Level: preview
View Source
Clear()
Removes all items in the MultiButtonEntry.
Declaration
API Level: preview
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type |
Name |
Description |
EvasObject |
parent |
Parent EvasObject.
|
Returns
Type |
Description |
System.IntPtr |
Handle IntPtr.
|
Overrides
API Level: preview
View Source
InsertAfter(MultiButtonEntryItem, String)
Adds a new item to the MultiButtonEntry after the indicated object.
Declaration
public MultiButtonEntryItem InsertAfter(MultiButtonEntryItem after, string label)
Parameters
Type |
Name |
Description |
MultiButtonEntryItem |
after |
The item after which to add it.
|
System.String |
label |
The label of new item.
|
Returns
API Level: preview
View Source
InsertBefore(MultiButtonEntryItem, String)
Adds a new item to the MultiButtonEntry before the indicated object reference.
Declaration
public MultiButtonEntryItem InsertBefore(MultiButtonEntryItem before, string label)
Parameters
Type |
Name |
Description |
MultiButtonEntryItem |
before |
The item before which to add it.
|
System.String |
label |
The label of new item.
|
Returns
API Level: preview
View Source
Prepend(String)
Prepends a new item to the MultiButtonEntry.
Declaration
public MultiButtonEntryItem Prepend(string label)
Parameters
Type |
Name |
Description |
System.String |
label |
The label of the new item.
|
Returns
API Level: preview
View Source
PrependFilter(Func<String, Boolean>)
Prepends a filter function for the text inserted in the MultiButtonEntry.
Declaration
public void PrependFilter(Func<string, bool> func)
Parameters
Type |
Name |
Description |
Func<System.String, System.Boolean> |
func |
The function to use as text filter.
|
API Level: preview
View Source
RemoveFilter(Func<String, Boolean>)
Removes a filter from the list.
Declaration
public void RemoveFilter(Func<string, bool> func)
Parameters
Type |
Name |
Description |
Func<System.String, System.Boolean> |
func |
The filter function to remove.
|
API Level: preview
View Source
SetFormatCallback(Func<Int32, String>)
Sets a function to format the string that will be used to display the hidden items counter.
If func is NULL, the default format will be used, which is "+ 'the hidden items counter'".
Declaration
public void SetFormatCallback(Func<int, string> func)
Parameters
Type |
Name |
Description |
Func<System.Int32, System.String> |
func |
The function to return string to show.
|
API Level: preview
Events
View Source
Clicked
Clicked is raised when a MultiButtonEntry is clicked.
Declaration
public event EventHandler Clicked
Event Type
Type |
Description |
System.EventHandler |
|
API Level: preview
View Source
Contracted
Contracted is raised when a MultiButtonEntry is contracted.
Declaration
public event EventHandler Contracted
Event Type
Type |
Description |
System.EventHandler |
|
API Level: preview
View Source
Expanded
Expanded is raised when a MultiButtonEntry is expanded.
Declaration
public event EventHandler Expanded
Event Type
Type |
Description |
System.EventHandler |
|
API Level: preview
View Source
ExpandedStateChanged
ExpandedStateChanged is raised when shrink mode state of MultiButtonEntry is changed.
Declaration
public event EventHandler ExpandedStateChanged
Event Type
Type |
Description |
System.EventHandler |
|
API Level: preview
View Source
ItemAdded
ItemAdded is raised when a new MultiButtonEntry item is added.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemAdded
Event Type
API Level: preview
View Source
ItemClicked
ItemClicked is raised when an item is clicked by user interaction.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemClicked
Event Type
API Level: preview
View Source
ItemDeleted
ItemDeleted is raised when a MultiButtonEntry item is deleted.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemDeleted
Event Type
API Level: preview
View Source
ItemLongPressed
ItemLongPressed is raised when MultiButtonEntry item is pressed for a long time.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemLongPressed
Event Type
API Level: preview
View Source
ItemSelected
ItemSelected is raised when an item is selected by API, user interaction, and etc.
This is also raised when a user presses backspace, while the cursor is on the first field of the entry.
Declaration
public event EventHandler<MultiButtonEntryItemEventArgs> ItemSelected
Event Type
API Level: preview
Implements
Extension Methods