UiComponentBase
The Base class for all ServiceStack.Blazor Components
Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public abstract class UiComponentBase : ComponentBase
Properties
JS
View Source
Declaration
public IJSRuntime JS { get; set; }
class
Optional user defined classes for this component
View Source
Declaration
public string class { get; set; }
Class
View Source
Declaration
public string Class { get; }
Methods
CssClass(String, String)
Return any user-defined classes along with optional classes for when component is in a valid
or invalid
state
View Source
Declaration
protected virtual string CssClass(string valid = null, string invalid = null)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.String | valid | css classes to include when valid |
|
| System.String
| invalid | css classes to include when invalid
|
ClassNames(String[])
Helper to combine multiple css classes. Strings can contain multiple classes, empty strings are ignored.
View Source
Declaration
protected virtual string ClassNames(params string[] classes)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String[] | classes |
SanitizeAttribute(String)
View Source
Declaration
public static bool SanitizeAttribute(string name)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | name |
SanitizeAttributes(Nullable<IReadOnlyDictionary<String, Object>>)
View Source
Declaration
public static IReadOnlyDictionary<string, object>? SanitizeAttributes(IReadOnlyDictionary<string, object>? attrs)
Returns
System.Nullable<IReadOnlyDictionary<System.String,System.Object>>
Parameters
Type | Name |
---|---|
System.Nullable<IReadOnlyDictionary<System.String,System.Object>> | attrs |
QueueRenderAction(Func<IJSRuntime, Task>)
View Source
Declaration
protected virtual void QueueRenderAction(Func<IJSRuntime, Task> action)
Parameters
Type | Name |
---|---|
Func<IJSRuntime,Task> | action |
SetTitle(String)
Set the document.title
View Source
Declaration
protected virtual void SetTitle(string title)
Parameters
Type | Name |
---|---|
System.String | title |
OnAfterRenderAsync(Boolean)
View Source
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Returns
Task
Parameters
Type | Name |
---|---|
System.Boolean | firstRender |