Class RadzenTabs
RadzenTabs component.
Implements
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenTabs : RadzenComponent, IDisposable
Examples
<RadzenTabs RenderMode="TabRenderMode.Client" Change=@(args => Console.WriteLine($"Selected index is: {args}"))>
<Tabs>
<RadzenTabsItem Text="Orders">
Details for Orders
</RadzenTabsItem>
<RadzenTabsItem Text="Employees">
Details for Employees
</RadzenTabsItem>
</Tabs>
</RadzenTabs>
Properties
Change
Gets or sets the change callback.
Declaration
public EventCallback<int> Change { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The change callback. |
RenderMode
Gets or sets the render mode.
Declaration
public TabRenderMode RenderMode { get; set; }
Property Value
Type | Description |
---|---|
TabRenderMode | The render mode. |
SelectedIndex
Gets or sets the selected index.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The selected index. |
SelectedIndexChanged
Gets or sets the selected index changed callback.
Declaration
public EventCallback<int> SelectedIndexChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The selected index changed callback. |
SelectedTab
Gets the currently selected RadzenTabsItem based on the selectedIndex.
Declaration
public RadzenTabsItem SelectedTab { get; }
Property Value
Type | Description |
---|---|
RadzenTabsItem |
TabPosition
Gets or sets the tab position.
Declaration
public TabPosition TabPosition { get; set; }
Property Value
Type | Description |
---|---|
TabPosition | The tab position. |
Tabs
Gets or sets the tabs.
Declaration
public RenderFragment Tabs { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The tabs. |
Methods
AddTab(RadzenTabsItem)
Adds the tab.
Declaration
public async Task AddTab(RadzenTabsItem tab)
Parameters
Type | Name | Description |
---|---|---|
RadzenTabsItem | tab | The tab. |
Returns
Type | Description |
---|---|
Task |
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
OnAfterRenderAsync(Boolean)
Called by the Blazor runtime.
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type | Description |
---|---|
Task |
Overrides
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()
Overrides
Reload()
Reloads this instance.
Declaration
public void Reload()
RemoveItem(RadzenTabsItem)
Removes the item.
Declaration
public void RemoveItem(RadzenTabsItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenTabsItem | item | The item. |
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task |
Overrides
ShouldRender()
Should render.
Declaration
protected override bool ShouldRender()
Returns
Type | Description |
---|---|
System.Boolean |