Class HtmlElement
Namespace: Neon.Blazor
Assembly: Neon.Blazor.dll
Syntax
public class HtmlElement : ComponentBase
Properties
Attributes
Additional attributes to be applied to the element.
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public IReadOnlyDictionary<string, object> Attributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, object> |
ChildContent
The child content.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment |
Id
The tag ID.
Declaration
[Parameter]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string |
PreventDefaultOn
Events to prevent default behaviour.
Declaration
[Parameter]
public List<string> PreventDefaultOn { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
StopPropagationOn
Propagation events to prevent default behaviour.
Declaration
[Parameter]
public List<string> StopPropagationOn { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
TagName
The tag name to use for this element.
Declaration
[Parameter]
public string TagName { get; set; }
Property Value
Type | Description |
---|---|
string |
Type
The element type.
Declaration
[Parameter]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
AsElementReference()
Get the Element reference.
Declaration
public ElementReference AsElementReference()
Returns
Type | Description |
---|---|
ElementReference |
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | builder | A RenderTreeBuilder that will receive the render output. |
Overrides
FocusAsync()
Focuses the current element.
Declaration
public ValueTask FocusAsync()
Returns
Type | Description |
---|---|
ValueTask |
GenerateId()
Generates an ID.
Declaration
public static string GenerateId()
Returns
Type | Description |
---|---|
string |
OnSetElementReference(ElementReference)
Set the element reference.
Declaration
public void OnSetElementReference(ElementReference reference)
Parameters
Type | Name | Description |
---|---|---|
ElementReference | reference |
Operators
implicit operator ElementReference(HtmlElement)
Element reference operator.
Declaration
public static implicit operator ElementReference(HtmlElement element)
Parameters
Type | Name | Description |
---|---|---|
HtmlElement | element |
Returns
Type | Description |
---|---|
ElementReference |