TXSheetControlFontEndpoints.MapTXSheetControlFonts Method
- Namespace
TXTextControl.TXSheetControl. AspNetCore
- Package
TXTextControl.asTXSheetControl. AspNetCore TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. AspNetCore. dll
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)
| Parameter | Type | Optional | Description |
|---|---|---|---|
endpoints | IEndpointRouteBuilder | No | Application endpoint builder. |
Return value: RouteGroupBuilder. Routes on which the host may apply authorization policies.
Overload 2
public static RouteGroupBuilder MapTXSheetControlFonts(IEndpointRouteBuilder endpoints, string prefix)
| Parameter | Type | Optional | Description |
|---|---|---|---|
endpoints | IEndpointRouteBuilder | No | Application endpoint builder. |
prefix | string | No | Absolute 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.