ComboBoxExtensions
Wisej.Web.Markup.ComboBoxExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ComboBox class.
public class ComboBoxExtensions
Methods
AutoCompleteMode<TComboBox>(comboBox, autoCompleteMode)

Sets the AutoCompleteMode property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated AutoCompleteMode property.
This method allows you to specify the auto-complete mode for the combo box.
myComboBox.AutoCompleteMode(AutoCompleteMode.SuggestAppend);
CharacterCasing<TComboBox>(comboBox, casing)

Sets the CharacterCasing property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated CharacterCasing property.
This method allows you to specify the character casing for the text in the combo box.
myComboBox.CharacterCasing(CharacterCasing.Upper);
DropDownHeight<TComboBox>(comboBox, height)

Sets the DropDownHeight property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated DropDownHeight property.
This method allows you to specify the height of the drop-down portion of the combo box.
myComboBox.DropDownHeight(200);
DropDownStyle<TComboBox>(comboBox, style)

Sets the DropDownStyle property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated DropDownStyle property.
This method allows you to specify the drop-down style for the combo box.
myComboBox.DropDownStyle(ComboBoxStyle.DropDownList);
DropDownWidth<TComboBox>(comboBox, width)

Sets the DropDownWidth property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated DropDownWidth property.
This method allows you to specify the width of the drop-down portion of the combo box.
myComboBox.DropDownWidth(150);
DroppedDown<TComboBox>(comboBox, value)

Sets the DroppedDown property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated DroppedDown property.
This method allows you to programmatically open or close the drop-down portion of the combo box.
myComboBox.DroppedDown(true);
IncrementalSelection<TComboBox>(comboBox, value)

Sets the IncrementalSelection property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated IncrementalSelection property.
This method allows you to enable or disable incremental selection for the combo box.
myComboBox.IncrementalSelection(true);
ItemHeight<TComboBox>(comboBox, height)

Sets the ItemHeight property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated ItemHeight property.
This method allows you to specify the height of each item in the combo box.
myComboBox.ItemHeight(20);
Items<TComboBox>(comboBox, items)

Adds the specified items to the Items collection of the specified ComboBox.
Returns: TComboBox. The modified combo box with the added items.
This method allows you to add multiple items to the combo box in one call.
myComboBox.Items("Item1", "Item2", "Item3");
LazyLoading<TComboBox>(comboBox, value)

Sets the LazyLoading property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated LazyLoading property.
This method allows you to enable or disable lazy loading for the combo box.
myComboBox.LazyLoading(true);
MaxLength<TComboBox>(comboBox, length)

Sets the MaxLength property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated MaxLength property.
This method allows you to specify the maximum number of characters that can be entered in the combo box.
myComboBox.MaxLength(50);
OnAutoComplete<TComboBox>(comboBox, action)

Attaches an event handler for the AutoComplete event of the specified ComboBox.
action
An action to execute during the AutoComplete event, with the combo box and event arguments as parameters.
Returns: TComboBox. The modified combo box with the attached AutoComplete event handler.
This method allows you to define custom auto-complete behavior by executing a specified action during the AutoComplete event.
myComboBox.OnAutoComplete((cb, args) =>
{
// Custom auto-complete logic
});
OnDropDownClosed<TComboBox>(comboBox, action)

Attaches an event handler for the DropDownClosed event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached DropDownClosed event handler.
This method allows you to execute a custom action whenever the drop-down portion of the combo box is closed.
myComboBox.OnDropDownClosed(cb =>
{
AlertBox.Show("Drop-down closed!");
});
OnDropDownStyleChanged<TComboBox>(comboBox, action)

Attaches an event handler for the DropDownStyleChanged event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached DropDownStyleChanged event handler.
This method allows you to execute a custom action whenever the DropDownStyle property of the combo box changes.
myComboBox.OnDropDownStyleChanged(cb =>
{
AlertBox.Show("Drop-down style changed!");
});
OnLoad<TComboBox>(comboBox, action)

Attaches an event handler for the Load event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached Load event handler.
This method allows you to execute a custom action whenever the combo box is loaded.
myComboBox.OnLoad(cb =>
{
AlertBox.Show("Combo box loaded!");
});
OnSelectedIndexChanged<TComboBox>(comboBox, action)

Attaches an event handler for the SelectedIndexChanged event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached SelectedIndexChanged event handler.
This method allows you to execute a custom action whenever the SelectedIndex property of the combo box changes.
myComboBox.OnSelectedIndexChanged(cb =>
{
AlertBox.Show("Selected index changed!");
});
OnSelectedItemChanged<TComboBox>(comboBox, action)

Attaches an event handler for the SelectedItemChanged event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached SelectedItemChanged event handler.
This method allows you to execute a custom action whenever the SelectedItem property of the combo box changes.
myComboBox.OnSelectedItemChanged(cb =>
{
AlertBox.Show("Selected item changed!");
});
OnSelectionChangeCommitted<TComboBox>(comboBox, action)

Attaches an event handler for the SelectionChangeCommitted event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached SelectionChangeCommitted event handler.
This method allows you to execute a custom action whenever the user commits a selection change in the combo box.
myComboBox.OnSelectionChangeCommitted(cb =>
{
AlertBox.Show("Selection change committed!");
});
OnSortedChanged<TComboBox>(comboBox, action)

Attaches an event handler for the SortedChanged event of the specified ComboBox.
Returns: TComboBox. The modified combo box with the attached SortedChanged event handler.
This method allows you to execute a custom action whenever the Sorted property of the combo box changes.
myComboBox.OnSortedChanged(cb =>
{
AlertBox.Show("Sorted property changed!");
});
OnToolClick<TComboBox>(comboBox, action)

Attaches an event handler for the ToolClick event of the specified ComboBox.
action
An action to execute when a tool is clicked within the combo box.
Returns: TComboBox. The modified combo box with the attached ToolClick event handler.
This method allows you to execute a custom action whenever a tool within the combo box is clicked.
myComboBox.OnToolClick((cb, e) =>
{
AlertBox.Show("Tool clicked!");
});
SelectedItem<TComboBox>(comboBox, item)

Sets the SelectedItem property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated SelectedItem property.
This method allows you to specify the selected item in the combo box.
myComboBox.SelectedItem("Item1");
SelectedText<TComboBox>(comboBox, text)

Sets the SelectedText property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated SelectedText property.
This method allows you to specify the selected text in the combo box.
myComboBox.SelectedText("SelectedText");
SelectionLength<TComboBox>(comboBox, length)

Sets the SelectionLength property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated SelectionLength property.
This method allows you to specify the number of characters to select in the text of the combo box.
myComboBox.SelectionLength(5);
SelectionStart<TComboBox>(comboBox, index)

Sets the SelectionStart property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated SelectionStart property.
This method allows you to specify the starting position of the text selection in the combo box.
myComboBox.SelectionStart(2);
SelectOnEnter<TComboBox>(comboBox, value)

Sets the SelectOnEnter property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated SelectOnEnter property.
This method allows you to enable or disable selecting the text when the combo box is entered.
myComboBox.SelectOnEnter(true);
Sorted<TComboBox>(comboBox, value)

Sets the Sorted property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated Sorted property.
This method allows you to specify whether the items in the combo box should be sorted automatically.
myComboBox.Sorted(true);
SpellCheck<TComboBox>(comboBox, value)

Sets the SpellCheck property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated SpellCheck property.
This method allows you to enable or disable spell checking for the combo box.
myComboBox.SpellCheck(true);
Tools<TComboBox>(comboBox, tools)

Adds the specified tools to the Tools collection of the specified ComboBox.
Returns: TComboBox. The modified combo box with the added tools.
This method allows you to add multiple tools to the combo box in one call.
myComboBox.Tools(tool1, tool2, tool3);
Watermark<TComboBox>(comboBox, text)

Sets the Watermark property of the specified ComboBox.
Returns: TComboBox. The modified combo box with the updated Watermark property.
This method allows you to set a watermark text for the combo box.
myComboBox.Watermark("Enter text...");
Last updated
Was this helpful?