Skip to main content
All docs
V24.2

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

DxResourceManager.LoadDxResources(IJSRuntime) Method

Forces the Resource Manager to load client resources.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.Resources.v24.2.dll

NuGet Package: DevExpress.Blazor.Resources

#Declaration

C#
public static Task<IJSRuntime> LoadDxResources(
    this IJSRuntime jSRuntime
)

#Parameters

Name Type Description
jSRuntime IJSRuntime

A JavaScript runtime instance.

#Returns

Type Description
Task<IJSRuntime>

A structure that stores an awaitable result of an asynchronous operation.

#Remarks

If you register a custom script, call the LoadDxResources method before you access the script’s API members for the first time:

// ...
@code {
    [Inject] IJSRuntime js;
    protected override async Task OnAfterRenderAsync(bool firstRender) {
        if(firstRender) {
            await js.LoadDxResources();
            await js.InvokeAsync("a-method-from-a-custom-script");
        }
        await base.OnAfterRenderAsync(firstRender);
    }
}

Refer to the following topic for more information: DxResourceManager.

See Also