Class RadzenButton
RadzenButton component.
public class RadzenButton : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
- Inheritance
-
RadzenButton
- Implements
- Derived
- Inherited Members
Examples
<RadzenButton Click=@(args => Console.WriteLine("Button clicked")) Text="Button" />
Constructors
RadzenButton()
public RadzenButton()
Properties
BusyText
Gets or sets the busy text.
[Parameter]
public string BusyText { get; set; }
Property Value
- string
The busy text.
ButtonStyle
Gets or sets the button style.
[Parameter]
public ButtonStyle ButtonStyle { get; set; }
Property Value
- ButtonStyle
The button style.
ButtonType
Gets or sets the type of the button.
[Parameter]
public ButtonType ButtonType { get; set; }
Property Value
- ButtonType
The type of the button.
ChildContent
Gets or sets the child content.
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
- RenderFragment
The child content.
Click
Gets or sets the click callback.
[Parameter]
public EventCallback<MouseEventArgs> Click { get; set; }
Property Value
- EventCallback<MouseEventArgs>
The click callback.
Disabled
Gets or sets a value indicating whether this RadzenButton is disabled.
[Parameter]
public bool Disabled { get; set; }
Property Value
- bool
true
if disabled; otherwise,false
.
Icon
Gets or sets the icon.
[Parameter]
public string Icon { get; set; }
Property Value
- string
The icon.
IconColor
Gets or sets the icon color.
[Parameter]
public string IconColor { get; set; }
Property Value
- string
The icon color.
Image
Gets or sets the image.
[Parameter]
public string Image { get; set; }
Property Value
- string
The image.
ImageAlternateText
Gets or sets the text.
[Parameter]
public string ImageAlternateText { get; set; }
Property Value
- string
The text.
IsBusy
Gets or sets a value indicating whether this instance busy text is shown.
[Parameter]
public bool IsBusy { get; set; }
Property Value
- bool
true
if this instance busy text is shown; otherwise,false
.
IsDisabled
Gets a value indicating whether this instance is disabled.
public bool IsDisabled { get; }
Property Value
- bool
true
if this instance is disabled; otherwise,false
.
Shade
Gets or sets the color shade of the button.
[Parameter]
public Shade Shade { get; set; }
Property Value
- Shade
The color shade of the button.
Size
Gets or sets the size.
[Parameter]
public ButtonSize Size { get; set; }
Property Value
- ButtonSize
The size.
TabIndex
Gets or sets the index of the tab.
[Parameter]
public int TabIndex { get; set; }
Property Value
- int
The index of the tab.
Text
Gets or sets the text.
[Parameter]
public string Text { get; set; }
Property Value
- string
The text.
Variant
Gets or sets the design variant of the button.
[Parameter]
public Variant Variant { get; set; }
Property Value
- Variant
The variant of the button.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
GetComponentCssClass()
protected override string GetComponentCssClass()
Returns
OnClick(MouseEventArgs)
Handles the Click event.
public virtual Task OnClick(MouseEventArgs args)
Parameters
args
MouseEventArgsThe MouseEventArgs instance containing the event data.