Class RadzenAlert
RadzenAlert component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenAlert : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Examples
<RadzenAlert>
<ChildContent>
Content
</ChildContent>
</RadzenAlert>
Constructors
RadzenAlert()
RadzenAlert component.
Declaration
public RadzenAlert()
Examples
<RadzenAlert>
<ChildContent>
Content
</ChildContent>
</RadzenAlert>
Properties
AlertStyle
Gets or sets the severity.
Declaration
[Parameter]
public AlertStyle AlertStyle { get; set; }
Property Value
Type | Description |
---|---|
AlertStyle | The severity. |
AllowClose
Gets or sets a value indicating whether close is allowed. Set to true
by default.
Declaration
[Parameter]
public bool AllowClose { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Close
Gets or sets the callback which is invoked when the alert is closed by the user.
Declaration
[Parameter]
public EventCallback Close { get; set; }
Property Value
Type | Description |
---|---|
EventCallback |
Icon
Gets or sets the icon.
Declaration
[Parameter]
public string Icon { get; set; }
Property Value
Type | Description |
---|---|
string | The icon. |
IconColor
Gets or sets the icon color.
Declaration
[Parameter]
public string IconColor { get; set; }
Property Value
Type | Description |
---|---|
string | The icon color. |
Shade
Gets or sets the color shade of the alert.
Declaration
[Parameter]
public Shade Shade { get; set; }
Property Value
Type | Description |
---|---|
Shade | The color shade of the alert. |
ShowIcon
Gets or sets a value indicating whether icon should be shown. Set to true
by default.
Declaration
[Parameter]
public bool ShowIcon { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Size
Gets or sets the size.
Declaration
[Parameter]
public AlertSize Size { get; set; }
Property Value
Type | Description |
---|---|
AlertSize | The size. |
Text
Gets or sets the text of the alert. Overriden by ChildContent.
Declaration
[Parameter]
public string Text { get; set; }
Property Value
Type | Description |
---|---|
string | The title. |
Title
Gets or sets the title.
Declaration
[Parameter]
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string | The title. |
Variant
Gets or sets the design variant of the alert.
Declaration
[Parameter]
public Variant Variant { get; set; }
Property Value
Type | Description |
---|---|
Variant | The variant of the alert. |
VisibleChanged
Gets or sets the callback which is invoked when the alert is shown or hidden.
Declaration
[Parameter]
public EventCallback<bool> VisibleChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<bool> |
Methods
BuildRenderTree(RenderTreeBuilder)
RadzenAlert component.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
string |
Overrides
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()
Overrides
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task |