Meadow.Foundation.Displays.UI.TextDisplayMenu
TextDisplayMenu | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Class TextDisplayMenu
TextDisplayMenu TextDisplayMenu class
Assembly: TextDisplayMenu.dll
View Source
public class TextDisplayMenu
Properties
IsEnabled
Is the menu enabled
View Source
public bool IsEnabled { get; protected set; }
Methods
Enable()
Enable the menu
View Source
public void Enable()
Disable()
Disable the menu
View Source
public void Disable()
CreateMenuPage(MenuItem[], bool)
Create a TextDisplayMenu page
View Source
protected MenuPage CreateMenuPage(MenuItem[] items, bool addBack)
Returns
Meadow.Foundation.Displays.UI.MenuPage: The new MenuPage object
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.Displays.UI.MenuItem[] | items | Items to populate page |
System.Boolean | addBack | True to add a back item |
ShowCurrentPage()
Show the current page
View Source
protected void ShowCurrentPage()
GetItemText(MenuItem, bool)
Get the text for a menu item
View Source
protected string GetItemText(MenuItem item, bool isSelected)
Returns
System.String
: The item text
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.Displays.UI.MenuItem | item | The menu item |
System.Boolean | isSelected | Is the menu selected |
UpdateCurrentMenuPage()
Updates the currentMenuPage based on the current navigation depth
View Source
protected void UpdateCurrentMenuPage()
Next()
Next input - navigates down/forward in the list of items
View Source
public bool Next()
Returns
System.Boolean
: True if successful, false in menu is disabled### Previous()
Previous input - navigates up/back in the list of items
View Source
public bool Previous()
Returns
System.Boolean
: True if successful, false in menu is disabled### Back()
Back input - navigates back in the navigation stack
View Source
public bool Back()
Returns
System.Boolean
: True if successful, false in menu is disabled### Select()
Select input - selects the current item
View Source
public bool Select()
Returns
System.Boolean
: True if successful, false in menu is disabled### Refresh()
Refresh / redraw the menu
View Source
public void Refresh()
UpdateItemValue(string, object)
Update menu item value
View Source
public void UpdateItemValue(string id, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Item id |
System.Object | value | New value |
UpdateItemValue(Hashtable)
Update menu item value
View Source
public void UpdateItemValue(Hashtable values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Hashtable | values | Values for all items |
Events
Selected
Raised when the menu receives a selected input
View Source
public event MenuSelectedHandler Selected
Event Type
Meadow.Foundation.Displays.UI.MenuSelectedHandler
ValueChanged
Raised when a value changes
View Source
public event ValueChangedHandler ValueChanged
Event Type
Meadow.Foundation.Displays.UI.ValueChangedHandler
Exited
Raised when the user exits the menu
View Source
public event EventHandler? Exited
Event Type
System.EventHandler