Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxWaitIndicator.Template Property

Specifies custom content (for example, an icon) for the Wait Indicator.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment Template { get; set; }

#Property Value

Type Description
RenderFragment

The content markup.

#Remarks

Specify custom content of the Wait Indicator in the <Template> tag. The component applies animation specified by the AnimationType property to custom content.

The following example replaces the default spin indicator with a custom icon:

<DxButton CssClass="my-btn"
          Enabled="!isSending"
          Click="Send"
          RenderStyle="ButtonRenderStyle.Secondary">
    <div class="d-flex">
        <DxWaitIndicator Visible="isSending">
            <Template>
                <div class="indicator-icon" role="img"></div>
            </Template>
        </DxWaitIndicator>
        <span class="mx-2">@Message</span>
    </div>
</DxButton>

@code{
    bool isSending = false;
    string Message => isSending ? "Sending..." : "Send";
    private async Task Send() {
        isSending = true;
        await Task.Delay(3000);
        isSending = false;
    }
}

Custom Icon

Run Demo: Animation

See Also