FragmentContainer Class

The root component of a fragment rendered by ComponentTestHost.RenderAsync.

public sealed class FragmentContainer : IComponent
Implements

Constructors

NameDescription
FragmentContainer()

FragmentContainer()

public FragmentContainer()

No documentation is available.

Properties

NameDescription
ChildContentGets or sets the rendered fragment.

Gets or sets the rendered fragment.

public RenderFragment? ChildContent { get; set; }

Property value

RenderFragment?

Methods

NameDescription
Attach(RenderHandle)Attaches the component to a RenderHandle.
SetParametersAsync(ParameterView)Sets parameters supplied by the component's parent in the render tree.

Attach(RenderHandle)

FragmentContainer.cs

Attaches the component to a RenderHandle.

public void Attach(RenderHandle renderHandle)

Parameters

renderHandle RenderHandle
A RenderHandle that allows the component to be rendered.

SetParametersAsync(ParameterView)

FragmentContainer.cs

Sets parameters supplied by the component's parent in the render tree.

public Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView
The parameters.

Returns

Task A Task that completes when the component has finished updating and rendering itself.

Remarks

The IComponent.SetParametersAsync method should be passed the entire set of parameter values each time IComponent.SetParametersAsync is called. It not required that the caller supply a parameter value for all parameters that are logically understood by the component.