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
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