Class CommandedView
public class CommandedView : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
- Inheritance
-
CommandedView
- Implements
- Inherited Members
Properties
CanCreate
[Parameter]
public bool CanCreate { get; set; }
Property Value
CanDelete
[Parameter]
public bool CanDelete { get; set; }
Property Value
ChildContent
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
Container
Optional: Property to which the commands relate, which may be used to add extra commands.
[Parameter]
public IProperty? Container { get; set; }
Property Value
ExternalContext
Optionally supply an existing command context built with CreateCommandContext(string, bool, bool, bool, ICommandHost?, TimeSpan, IProperty?), e.g. to control its lifecycle or reach it from a test.
[Parameter]
public CommandedView.PrebuiltCommandContext ExternalContext { get; set; }
Property Value
IsRoot
[Parameter]
public bool IsRoot { get; set; }
Property Value
Name
[Parameter]
[EditorRequired]
public string Name { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
CreateCommandContext(string, bool, bool, bool, ICommandHost?, TimeSpan, IProperty?)
Creates the command context a CommandedView with these parameters would build, ahead of rendering one: pass the result as ExternalContext for the view to adopt it. The context also works on its own, e.g. for tests that build or execute commands without rendering a view.
public static CommandedView.PrebuiltCommandContext CreateCommandContext(string title, bool isRoot, bool canCreate, bool canDelete, ICommandHost? outerContext = null, TimeSpan progressDelay = default, IProperty? container = null)
Parameters
titlestringisRootboolcanCreateboolcanDeleteboolouterContextICommandHostprogressDelayTimeSpancontainerIProperty
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
OnParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override void OnParametersSet()