Method RegisterViewType
RegisterViewType(Type, object)
Registers the provided Blazor view type with an optional associated key. Once a view type is registered, it can be looked up using its content type and the specified key.
Declaration
public void RegisterViewType(Type viewType, object key = null)
Parameters
Type | Name | Description |
---|---|---|
Type | viewType | The Blazor view type to register. This type should inherit from a base Blazor view component. |
object | key | An optional key to associate with the view type. This allows multiple views to be registered for the same content type but differentiated by key. |
Implements
Examples
registrator.RegisterViewType(typeof(MyDetailView), "Detail");
registrator.RegisterViewType(typeof(MySummaryView), "Summary");