Skip to main content
All docs
V25.1
  • .NET 8.0+
    • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

    BlazorViewExtensions.CustomizeViewItemControl(View, Controller, Action<ViewItem>) Method

    Allows you to access and customize controls of View Items that the specified View contains in ASP.NET Core Blazor applications. This applies to View Items in Detail View, Dashboard View, and List View (DxGridListEditor and DxTreeListEditor in edit mode)

    Namespace: DevExpress.ExpressApp.Blazor.Utils

    Assembly: DevExpress.ExpressApp.Blazor.v25.1.dll

    NuGet Package: DevExpress.ExpressApp.Blazor

    Declaration

    public static void CustomizeViewItemControl(
        this View view,
        Controller controller,
        Action<ViewItem> customizeAction
    )

    Parameters

    Name Type Description
    view View

    A View that contains the View Item with controls the customizeAction method customizes.

    controller Controller

    A Controller to customize controls of the specified View Item.

    customizeAction Action<ViewItem>

    A method to customize controls of the specified View Item.

    Remarks

    The following code snippet uses the CustomizeViewItemControl(View, Controller, Action<ViewItem>) method to enable HTML markup in a Static Text component:

    File:
    MySolution.Blazor.Server\Controllers\CustomizeViewController.cs

    using DevExpress.ExpressApp;
    using DevExpress.ExpressApp.Blazor.Editors;
    using DevExpress.ExpressApp.Blazor.Utils;
    
    namespace MySolution.Blazor.Server;
    
    public class CustomizeViewController : ViewController {
            protected override void OnActivated() {
                base.OnActivated();
                View.CustomizeViewItemControl(this, item => {
                    if(item is StaticTextViewItem staticTextViewItem) {
                        staticTextViewItem.ComponentModel.UseMarkupString = true;
                    }
                });
            }
        }
    
    See Also