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.

    StaticTextViewItem.ComponentModel Property

    Returns a StaticTextComponentModel descendant that wraps properties and events of a corresponding Static Text View Item.

    Namespace: DevExpress.ExpressApp.Blazor.Editors

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

    NuGet Package: DevExpress.ExpressApp.Blazor

    Declaration

    public StaticTextComponentModel ComponentModel { get; }

    Property Value

    Type Description
    DevExpress.ExpressApp.Blazor.Components.Models.StaticTextComponentModel

    A component model of a Static Text View Item.

    Remarks

    To customize the Static Text View Item’s underlying component, call the View.CustomizeViewItemControl method and obtain the component model (the ComponentModel property).

    The following code snippet demonstrates how to enable HTML markup in a Static Text component:

    using DevExpress.ExpressApp;
    using DevExpress.ExpressApp.Blazor.Editors;
    using YourApplicationName.Module.BusinessObjects;
    
    namespace YourApplicationName.Blazor.Server.Controllers;
    public partial class MyStaticCustomizeController : ObjectViewController<DetailView, Employee> {
        protected override void OnActivated() {
            base.OnActivated();
            View.CustomizeViewItemControl<StaticTextViewItem>(this, SetStaticItem, "MyStatic");
        }
        private void SetStaticItem(StaticTextViewItem staticText) {
            staticText.ComponentModel.UseMarkupString = true;
        }
    }
    
    See Also