Class ListBox
- Namespace
- nanoFramework.Presentation.Controls
- Assembly
- nanoFramework.Graphics.dll
Represents a control that displays a list of items, where an item in the list can be selected.
public class ListBox : ContentControl
- Inheritance
-
ListBox
- Inherited Members
- Extension Methods
Constructors
ListBox()
Initializes a new instance of the ListBox class.
public ListBox()
Properties
ExtentHeight
Gets the extent height of the scrollable content.
public int ExtentHeight { get; }
Property Value
ExtentWidth
Gets the extent width of the scrollable content.
public int ExtentWidth { get; }
Property Value
HorizontalOffset
Gets or sets the horizontal scroll offset.
public int HorizontalOffset { get; set; }
Property Value
Items
Gets the collection of items in the ListBox.
public ListBoxItemCollection Items { get; }
Property Value
ScrollingStyle
Gets or sets the scrolling behavior.
public ScrollingStyle ScrollingStyle { get; set; }
Property Value
SelectedIndex
Gets or sets the index of the currently selected item in a ListBox.
public int SelectedIndex { get; set; }
Property Value
SelectedItem
Gets or sets the currently selected item in a ListBox.
public ListBoxItem SelectedItem { get; set; }
Property Value
VerticalOffset
Gets or sets the vertical scroll offset.
public int VerticalOffset { get; set; }
Property Value
Methods
OnButtonDown(ButtonEventArgs)
Called when a button is pressed down. If the button is VK_DOWN and the currently selected item is not the last item, the selection is moved down to the next selectable item. If the button is VK_UP and the currently selected item is not the first item, the selection is moved up to the previous selectable item.
protected override void OnButtonDown(ButtonEventArgs e)
Parameters
e
ButtonEventArgsThe ButtonEventArgs containing information about the button press.
ScrollIntoView(ListBoxItem)
Scrolls the ListBox to bring the specified ListBoxItem into view.
public void ScrollIntoView(ListBoxItem item)
Parameters
item
ListBoxItemThe ListBoxItem to bring into view.
Events
ScrollChanged
Occurs when the scroll position changes.
public event ScrollChangedEventHandler ScrollChanged
Event Type
SelectionChanged
Occurs when the selection of a ListBox item changes.
public event SelectionChangedEventHandler SelectionChanged