Class MultiButtonEntry

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.

C#
Copy
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
C#
Copy
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
C#
Copy
public Entry Entry { get; }
Property Value
Type Description
Entry
API Level: preview
View Source

FirstItem

Gets the first item in the MultiButtonEntry.

Declaration
C#
Copy
public MultiButtonEntryItem FirstItem { get; }
Property Value
Type Description
MultiButtonEntryItem
API Level: preview
View Source

IsEditable

Gets or sets whether the MultiButtonEntry is editable or not.

Declaration
C#
Copy
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
C#
Copy
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
C#
Copy
public MultiButtonEntryItem LastItem { get; }
Property Value
Type Description
MultiButtonEntryItem
API Level: preview
View Source

SelectedItem

Gets the selected item in the MultiButtonEntry.

Declaration
C#
Copy
public MultiButtonEntryItem SelectedItem { get; }
Property Value
Type Description
MultiButtonEntryItem
API Level: preview

Methods

View Source

Append(String)

Appends a new item to the multibuttonentry.

Declaration
C#
Copy
public MultiButtonEntryItem Append(string label)
Parameters
Type Name Description
System.String label

The label of the new item.

Returns
Type Description
MultiButtonEntryItem

A MultiButtonEntryItem to the item added.

API Level: preview
View Source

AppendFilter(Func<String, Boolean>)

Appends an item filter function for the text inserted in the multibuttonentry.

Declaration
C#
Copy
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
C#
Copy
public void Clear()
API Level: preview
View Source

CreateHandle(EvasObject)

Creates a widget handle.

Declaration
C#
Copy
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
C#
Copy
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
Type Description
MultiButtonEntryItem

A MultiButtonEntryItem to the item added.

API Level: preview
View Source

InsertBefore(MultiButtonEntryItem, String)

Adds a new item to the MultiButtonEntry before the indicated object reference.

Declaration
C#
Copy
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
Type Description
MultiButtonEntryItem

A MultiButtonEntryItem to the item added.

API Level: preview
View Source

Prepend(String)

Prepends a new item to the MultiButtonEntry.

Declaration
C#
Copy
public MultiButtonEntryItem Prepend(string label)
Parameters
Type Name Description
System.String label

The label of the new item.

Returns
Type Description
MultiButtonEntryItem

A MultiButtonEntryItem to the item added.

API Level: preview
View Source

PrependFilter(Func<String, Boolean>)

Prepends a filter function for the text inserted in the MultiButtonEntry.

Declaration
C#
Copy
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
C#
Copy
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
C#
Copy
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
C#
Copy
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
C#
Copy
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
C#
Copy
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
C#
Copy
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
C#
Copy
public event EventHandler<MultiButtonEntryItemEventArgs> ItemAdded
Event Type
Type Description
System.EventHandler<MultiButtonEntryItemEventArgs>
API Level: preview
View Source

ItemClicked

ItemClicked is raised when an item is clicked by user interaction.

Declaration
C#
Copy
public event EventHandler<MultiButtonEntryItemEventArgs> ItemClicked
Event Type
Type Description
System.EventHandler<MultiButtonEntryItemEventArgs>
API Level: preview
View Source

ItemDeleted

ItemDeleted is raised when a MultiButtonEntry item is deleted.

Declaration
C#
Copy
public event EventHandler<MultiButtonEntryItemEventArgs> ItemDeleted
Event Type
Type Description
System.EventHandler<MultiButtonEntryItemEventArgs>
API Level: preview
View Source

ItemLongPressed

ItemLongPressed is raised when MultiButtonEntry item is pressed for a long time.

Declaration
C#
Copy
public event EventHandler<MultiButtonEntryItemEventArgs> ItemLongPressed
Event Type
Type Description
System.EventHandler<MultiButtonEntryItemEventArgs>
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
C#
Copy
public event EventHandler<MultiButtonEntryItemEventArgs> ItemSelected
Event Type
Type Description
System.EventHandler<MultiButtonEntryItemEventArgs>
API Level: preview

Implements

Extension Methods