Allows the developer to replace a component with another. Useful to specify default values for component properties.
Object
IComponentActivator
Namespace: Radzen
Assembly: Radzen.Blazor.dll
public class RadzenComponentActivator : IComponentActivatorvar builder = WebApplication.CreateBuilder(args);
var activator = new RadzenComponentActivator();
// Replace RadzenButton with MyButton
activator.Override<RadzenButton, MyButton>();
// Replace RadzenDataGrid with MyDataGrid
activator.Override(typeof(RadzenDataGrid<>), typeof(MyDataGrid<>));
// Register the activator
builder.Services.AddSingleton<IComponentActivator>(activator);Allows the developer to replace a component with another. Useful to specify default values for component properties.
public RadzenComponentActivator()Creates a component of the specified type.
public IComponent CreateInstance(Type componentType)
| Type | Name | Description |
|---|---|---|
| Type | componentType |
| Type | Description |
|---|---|
| IComponent |
Replaces the specified component type with another.
public void Override(Type original, Type override)
| Type | Name | Description |
|---|---|---|
| Type | original | |
| Type | override |