TX Sheet Control

TXSheetControlFontEndpoints.MapTXSheetControlFonts Method

Method
Namespace
TXTextControl.TXSheetControl.AspNetCore
Package
TXTextControl.TXSheetControl.AspNetCore as TXTextControl.TXSheetControl.AspNetCore.dll from the private NuGet feed or the supplied NuGet folder

Maps the traditional /sheet-fonts URLs to the bundled static catalog and font files. No backend engine or DI registration is needed.

Syntax

Overload 1

public static RouteGroupBuilder MapTXSheetControlFonts(IEndpointRouteBuilder endpoints)
ParameterTypeOptionalDescription
endpointsIEndpointRouteBuilderNoApplication endpoint builder.

Return value: RouteGroupBuilder. Routes on which the host may apply authorization policies.

Overload 2

public static RouteGroupBuilder MapTXSheetControlFonts(IEndpointRouteBuilder endpoints, string prefix)
ParameterTypeOptionalDescription
endpointsIEndpointRouteBuilderNoApplication endpoint builder.
prefixstringNoAbsolute URL prefix, without a trailing slash or route parameters.

Return value: RouteGroupBuilder. The compatibility route group.

Examples

Configure a complete Razor Pages application. The editor tag helper includes its browser assets automatically; the optional font routes provide compatibility URLs for the bundled static catalog.

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using TXTextControl.TXSheetControl.AspNetCore;

var builder = WebApplication.CreateBuilder(Array.Empty<string>());
builder.Services.AddRazorPages();

var app = builder.Build();
app.UseTXSheetControlAssets();
app.MapTXSheetControlFonts();
app.MapRazorPages();
app.Run();

Remarks

Use the member with an instance or settings object from the documented package. Await task-returning operations. Document-bound handles must be resolved again after loading or deleting their owner.

See Also