expressappframework-devexpress-dot-expressapp-dot-blazor-dot-editors-ca322c17.md
A container for custom ASP.NET Core Blazor components displayed in a Detail View.
Namespace : DevExpress.ExpressApp.Blazor.Editors
Assembly : DevExpress.ExpressApp.Blazor.v25.2.dll
NuGet Package : DevExpress.ExpressApp.Blazor
public class BlazorControlViewItem :
ControlViewItem
Public Class BlazorControlViewItem
Inherits ControlViewItem
The following code snippet uses BlazorControlViewItem to create a custom component:
File: CS\MainDemo.Blazor.Server\Editors\ButtonComponent.razor
@using DevExpress.Blazor
@using DevExpress.ExpressApp
@using DevExpress.ExpressApp.Blazor.Editors
<DxButton Text="Click me!" Click=@ClickFromUI />
@code {
[CascadingParameter] public BlazorControlViewItem ViewItem { get; set; }
void ClickFromUI() {
ViewItem.Application.ShowViewStrategy.ShowMessage("Action is executed!");
}
}
When you add the custom component to a Detail View, specify the component type as the ControlTypeName property value in the Model Editor:
For more information about custom ASP.NET Core Blazor View Items, refer to the following topics:
Object ViewItem ControlViewItem BlazorControlViewItem
See Also
How to: Show a Custom Data-Bound Control in an XAF View (Blazor) - Current Object Data
How to: Show a Custom Data-Bound Control in an XAF View (Blazor) - External Data