Dela via


Microsoft.AspNetCore.Components Namespace

Provides classes for component rendering, event handling, and routing.

Classes

BindConverter

Performs conversions during binding.

BindElementAttribute

Configures options for binding specific element types.

BindInputElementAttribute

Configures options for binding subtypes of an HTML input element.

CascadingParameterAttribute

Denotes the target member as a cascading component parameter. Its value will be supplied by the closest ancestor CascadingValue<TValue> component that supplies values with a compatible type and name.

CascadingParameterAttributeBase

Represents a parameter whose value cascades down the component hierarchy.

CascadingTypeParameterAttribute

Denotes the generic type parameter as cascading. This allows generic type inference to use this type parameter value automatically on descendants that also have a type parameter with the same name.

CascadingValue<TValue>

A component that provides a cascading value to all descendant components.

CascadingValueSource<TValue>

Supplies a cascading value that can be received by components using CascadingParameterAttribute.

ChangeEventArgs

Supplies information about an change event that is being raised.

ComponentBase

Optional base class for components. Alternatively, components may implement IComponent directly.

Dispatcher

Dispatches external actions to be executed on the context of a Renderer.

DynamicComponent

A component that renders another component dynamically according to its Type parameter.

EditorRequiredAttribute

Specifies that the component parameter is required to be provided by the user when authoring it in the editor.

If a value for this parameter is not provided, editors or build tools may provide warnings indicating the user to specify a value. This attribute is only valid on properties marked with ParameterAttribute.

ElementReferenceContext

Context for an ElementReference.

ElementReferenceExtensions

Static class that adds extension methods to ElementReference.

ErrorBoundaryBase

A base class for error boundary components.

EventCallbackFactory

A factory for creating EventCallback and EventCallback<TValue> instances.

EventCallbackFactoryBinderExtensions

Contains extension methods for two-way binding using EventCallback. For internal use only.

EventCallbackFactoryEventArgsExtensions

Provides extension methods for EventCallbackFactory and EventArgs types.

EventHandlerAttribute

Associates an event argument type with an event attribute name.

ExcludeFromInteractiveRoutingAttribute

When applied to a page component, indicates that the interactive Router component should ignore that page. This means that navigations to the page will not be resolved by interactive routing, but instead will cause a full page reload.

ImportMap

Represents an element that defines the import map for module scripts in the application.

ImportMapDefinition

Represents the contents of a element that defines the import map for module scripts in the application.

InjectAttribute

Indicates that the associated property should have a value injected from the service provider during initialization.

LayoutAttribute

Indicates that the associated component type uses a specified layout.

LayoutComponentBase

Optional base class for components that represent a layout. Alternatively, components may implement IComponent directly and declare their own parameter named Body.

LayoutView

Displays the specified content inside the specified layout and any further nested layouts.

LocationChangeException

An exception thrown when LocationChanged throws an exception.

NavigationException

Exception thrown when an NavigationManager is not able to navigate to a different url.

NavigationManager

Provides an abstraction for querying and managing URI navigation.

NavigationManagerExtensions

Provides extension methods for the NavigationManager type.

OwningComponentBase

A base class that creates a service provider scope.

OwningComponentBase<TService>

A base class that creates a service provider scope, and resolves a service of type TService.

ParameterAttribute

Denotes the target member as a component parameter.

PersistentComponentState

The state for the components and services of a components application.

RendererInfo

Provides information about the platform that the component is running on.

RenderModeAttribute

Specifies a fixed rendering mode for a component type.

Where possible, components should not specify any render mode this way, and should be implemented to work across all render modes. Component authors should only specify a fixed rendering mode when the component is incapable of running in other modes.

ResourceAsset

A resource of the components application, such as a script, stylesheet or image.

ResourceAssetCollection

Describes a mapping of static assets to their corresponding unique URLs.

ResourceAssetProperty

A resource property.

RouteAttribute

Indicates that the associated component should match the specified route template pattern.

RouteData

Describes information determined during routing that specifies the page to be displayed.

RouteView

Displays the specified page component, rendering it inside its layout and any further nested layouts.

StreamRenderingAttribute

An attribute to indicate whether to stream the rendering of a component and its descendants.

This attribute only takes effect within renderers that support streaming rendering (for example, server-side HTML rendering from a Razor Component endpoint). In other hosting models it has no effect.

If a component type does not declare this attribute, then instances of that component type will share the same streaming rendering mode as their parent component.

SupplyParameterFromFormAttribute

Indicates that the value of the associated property should be supplied from the form data for the form with the specified name.

SupplyParameterFromQueryAttribute

Indicates that routing components may supply a value for the parameter from the current URL querystring. They may also supply further values if the URL querystring changes.

SupplyParameterFromQueryProviderServiceCollectionExtensions

Enables component parameters to be supplied from the query string with SupplyParameterFromQueryAttribute.

WebElementReferenceContext

A ElementReferenceContext for a web element.

Structs

CascadingParameterInfo

Contains information about a cascading parameter.

ElementReference

Represents a reference to a rendered element.

EventCallback

A bound event handler delegate.

EventCallback<TValue>

A bound event handler delegate.

EventCallbackWorkItem

Wraps a callback delegate associated with an event.

MarkupString

A string value that can be rendered as markup such as HTML.

NavigationOptions

Additional options for navigating to another URI.

ParameterValue

Represents a single parameter supplied to an IComponent by its parent in the render tree.

ParameterView

Represents a collection of parameters supplied to an IComponent by its parent in the render tree.

ParameterView.Enumerator

An enumerator that iterates through a ParameterView.

PersistingComponentStateSubscription

Represents a subscription to the OnPersisting callback that ComponentStatePersistenceManager callback will trigger when the application is being persisted.

RenderHandle

Allows a component to interact with its renderer.

Interfaces

IComponent

Represents a UI component.

IComponentActivator

Represents an activator that can be used to instantiate components. The activator is not responsible for dependency injection, since the framework performs dependency injection to the resulting instances separately.

IComponentRenderMode

Represents a render mode for a component.

IHandleAfterRender

Interface implemented by components that receive notification that they have been rendered.

IHandleEvent

Interface implemented by components that receive notification of state changes.

IPersistentComponentStateStore

Manages the storage for components and services that are part of a Blazor application.

Enums

PersistedStateSerializationMode

Specifies the mode to use when serializing component persistent state.

Delegates

RenderFragment

Represents a segment of UI content, implemented as a delegate that writes the content to a RenderTreeBuilder.

RenderFragment<TValue>

Represents a segment of UI content for an object of type TValue, implemented as a function that returns a RenderFragment.

Remarks

For more information about components, see Create and use ASP.NET Core Razor components.