A segmented control component that allows users to select one option from a group of related options.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Type Parameters:
TItem
TValue
Syntax:
public class TelerikSegmentedControl<TItem, TValue> : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikSegmentedControl<TItem, TValue>
Implements:
Inherited Members
Constructors
public TelerikSegmentedControl()
Properties
Data
IEnumerable<TItem>
The collection of items that will be rendered inside the SegmentedControl.
[Parameter]
public IEnumerable<TItem> Data { get; set; }
Data field containing disabled identifier. Default: "Disabled".
[Parameter]
public string DisabledField { get; set; }
Data field containing icon class identifier. Default: "IconClass".
[Parameter]
public string IconClassField { get; set; }
Data field containing icon identifiers. Default: "Icon".
[Parameter]
public string IconField { get; set; }
Specifies the data field that provides the SVG variant for each icon identified by IconField. The default value is "IconVariant". Null, empty, or unsupported item values use the icon's default SVG content, and font or custom CSS icons are unaffected.
[Parameter]
public string IconVariantField { get; set; }
ItemTemplate
RenderFragment<TItem>
A template for rendering custom item content.
[Parameter]
public RenderFragment<TItem>? ItemTemplate { get; set; }
Sets the size of the control. Default value is Medium.
[Parameter]
public string? Size { get; set; }
Data field containing text identifier. Default: "Text".
[Parameter]
public string TextField { get; set; }
Data field containing title identifier. Default: "Title".
[Parameter]
public string TitleField { get; set; }
Value
TValue
The currently selected item.
[Parameter]
public TValue? Value { get; set; }
ValueChanged
EventCallback<TValue>
Event fired when an item is clicked and the selection changes.
[Parameter]
public EventCallback<TValue?> ValueChanged { get; set; }
Data field containing value identifier. Default: "Value".
[Parameter]
public string ValueField { get; set; }
Data field containing visible identifier. Default: "Visible".
[Parameter]
public string VisibleField { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
public override void Dispose()
Overrides: