Name | Type | Default | Description |
DataSource | object | [] | Determines the buttons configuration. The dataSource can be an array of strings/numbers or objects where the attributes represent the properties of a List Item. For example label, value. It can also be a callback that returns an Array of items as previously described. |
SelectionMode | ButtonGroupSelectionMode | ButtonGroupSelectionMode.One | Determines the selection mode for the element. |
Disabled | bool | false | Enables or disables the element. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
Messages | object | N/A | Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. |
Name | string | "" | Sets or gets the name attribute for the element. Name is used when submiting HTML forms. |
Readonly | bool | false | If the custom element is readonly, it cannot be interacted with. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
Theme | string | "" | Determines the theme. Theme defines the look of the element |
SelectedValues | string[] | new string[]{} | Sets or gets the button group's selected values. Represents an array of strings. |
SelectedIndexes | int[] | new int[]{} | Sets or gets the button group's selected indexes. Represents an array of numbers |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
Name | Type | Arguments | Description |
GetDataSourceAsync() | Task<IEnumerable<object>> | 'N/A' | Gets the "DataSource" property as Task<IEnumerable<object>>. |
GetSelectedIndexesAsync() | Task<int[]> | 'N/A' | Gets the "SelectedIndexes" property as Task<int[]>. |
GetSelectedValuesAsync() | Task<string[]> | 'N/A' | Gets the "SelectedValues" property as Task<string[]>. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
Select | void | object value | Selects/Unselects an item inside the element.Args: object value - The index or the value of the item to be selected/unselected. |
Select | void | int value | Selects/Unselects an item inside the element.Args: int value - The index or the value of the item to be selected/unselected. |
Select | void | string value | Selects/Unselects an item inside the element.Args: string value - The index or the value of the item to be selected/unselected. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |