Table of Contents

Class CommandedView

Namespace
The.Web.Pages
Assembly
Instagile.Web.Client.dll
public class CommandedView : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
CommandedView
Implements
Inherited Members

Properties

CanCreate

[Parameter]
public bool CanCreate { get; set; }

Property Value

bool

CanDelete

[Parameter]
public bool CanDelete { get; set; }

Property Value

bool

ChildContent

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Container

Optional: Property to which the commands relate, which may be used to add extra commands.

[Parameter]
public IProperty? Container { get; set; }

Property Value

IProperty

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

CommandedView.PrebuiltCommandContext

IsRoot

[Parameter]
public bool IsRoot { get; set; }

Property Value

bool

Name

[Parameter]
[EditorRequired]
public string Name { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

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

title string
isRoot bool
canCreate bool
canDelete bool
outerContext ICommandHost
progressDelay TimeSpan
container IProperty

Returns

CommandedView.PrebuiltCommandContext

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()