ListBoxExtensions
Wisej.Web.Markup.ListBoxExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.ListBoxExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ListBox class.
public class ListBoxExtensions
Sets the HorizontalScrollbar property of the specified ListBox.
TListBox
listBox
The list box for which to set the HorizontalScrollbar property.
value
A boolean indicating whether a horizontal scrollbar is shown.
Returns: TListBox. The modified list box with the updated HorizontalScrollbar property.
This method allows you to specify whether a horizontal scrollbar should be shown for the list box.
myListBox.HorizontalScrollbar(true);
Sets the IncrementalSelection property of the specified ListBox.
TListBox
listBox
The list box for which to set the IncrementalSelection property.
value
A boolean indicating whether incremental selection is enabled.
Returns: TListBox. The modified list box with the updated IncrementalSelection property.
This method allows you to enable or disable incremental selection for the list box.
myListBox.IncrementalSelection(true);
Sets the ItemHeight property of the specified ListBox.
TListBox
listBox
The list box for which to set the ItemHeight property.
itemHeight
The height of each item in the list box.
Returns: TListBox. The modified list box with the updated ItemHeight property.
This method allows you to specify the height of each item in the list box.
myListBox.ItemHeight(20);
Adds the specified items to the Items collection of the specified ListBox.
TListBox
listBox
The list box to which the items should be added.
items
An array of items to add to the list box.
Returns: TListBox. The modified list box with the added items.
This method allows you to add multiple items to the list box in one call.
myListBox.Items("Item1", "Item2", "Item3");
Sets the LazyLoading property of the specified ListBox.
TListBox
listBox
The list box for which to set the LazyLoading property.
value
A boolean indicating whether lazy loading is enabled.
Returns: TListBox. The modified list box with the updated LazyLoading property.
This method allows you to enable or disable lazy loading for the list box.
myListBox.LazyLoading(true);
Attaches an event handler for the SelectedIndexChanged event of the specified ListBox.
TListBox
listBox
The list box to attach the event handler to.
action
An action to execute when the SelectedIndex property changes.
Returns: TListBox. The modified list box with the attached SelectedIndexChanged event handler.
This method allows you to execute a custom action whenever the SelectedIndex property of the list box changes.
myListBox.OnSelectedIndexChanged(lb =>
{
AlertBox.Show("Selected index changed!");
});
Attaches an event handler for the SortedChanged event of the specified ListBox.
TListBox
listBox
The list box to attach the event handler to.
action
An action to execute when the Sorted property changes.
Returns: TListBox. The modified list box with the attached SortedChanged event handler.
This method allows you to execute a custom action whenever the Sorted property of the list box changes.
myListBox.OnSortedChanged(lb =>
{
AlertBox.Show("Sorted property changed!");
});
Attaches an event handler for the ToolClick event of the specified ListBox.
TListBox
listBox
The list box to attach the event handler to.
action
An action to execute when a tool in the list box is clicked.
Returns: TListBox. The modified list box with the attached ToolClick event handler.
This method allows you to execute a custom action whenever a tool in the list box is clicked.
myListBox.OnToolClick((lb, args) =>
{
AlertBox.Show("Tool clicked!");
});
Sets the Orientation property of the specified ListBox.
TListBox
listBox
The list box for which to set the Orientation property.
orientation
Returns: TListBox. The modified list box with the updated Orientation property.
This method allows you to set the orientation for the list box, which determines how items are displayed.
myListBox.Orientation(Orientation.Horizontal);
Sets the RightClickSelection property of the specified ListBox.
TListBox
listBox
The list box for which to set the RightClickSelection property.
value
A boolean indicating whether right-click selection is enabled.
Returns: TListBox. The modified list box with the updated RightClickSelection property.
This method allows you to enable or disable right-click selection for the list box.
myListBox.RightClickSelection(true);
Sets the ScrollAlwaysVisible property of the specified ListBox.
TListBox
listBox
The list box for which to set the ScrollAlwaysVisible property.
value
A boolean indicating whether the scrollbar is always visible.
Returns: TListBox. The modified list box with the updated ScrollAlwaysVisible property.
This method allows you to ensure the scrollbar is always visible, regardless of the number of items.
myListBox.ScrollAlwaysVisible(true);
Sets the SelectedItem property of the specified ListBox.
TListBox
listBox
The list box for which to set the SelectedItem property.
selectedItem
The item to select in the list box.
Returns: TListBox. The modified list box with the updated SelectedItem property.
This method allows you to specify the selected item in the list box.
myListBox.SelectedItem(item);
Sets the SelectionMode property of the specified ListBox.
TListBox
listBox
The list box for which to set the SelectionMode property.
selectionMode
Returns: TListBox. The modified list box with the updated SelectionMode property.
This method allows you to specify the selection mode for the list box.
myListBox.SelectionMode(SelectionMode.MultiExtended);
Sets the Sorted property of the specified ListBox.
TListBox
listBox
The list box for which to set the Sorted property.
value
A boolean indicating whether the list box is sorted.
Returns: TListBox. The modified list box with the updated Sorted property.
This method allows you to specify whether the items in the list box should be sorted automatically.
myListBox.Sorted(true);
Adds the specified tools to the Tools collection of the specified ListBox.
TListBox
listBox
The list box to which the tools should be added.
items
An array of tools to add to the list box.
Returns: TListBox. The modified list box with the added tools.
This method allows you to add multiple tools to the list box in one call.
myListBox.Tools(tool1, tool2, tool3);
Sets the TopIndex property of the specified ListBox.
TListBox
listBox
The list box for which to set the TopIndex property.
topIndex
The index of the first visible item in the list box.
Returns: TListBox. The modified list box with the updated TopIndex property.
This method allows you to specify the index of the first visible item in the list box.
myListBox.TopIndex(5);
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The to set for the list box.
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The to set for the list box.
The type of the list box, must inherit from .
The type of the list box, must inherit from .
The type of the list box, must inherit from .