BarcodeDrawingOptions.Name Property
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.asTXSheetControl. Server TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Api. dll
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
Drawing name; defaults to Barcode.
Syntax
public string? Name { get; init; }
Remarks
See Barcodes and QR Codes for a complete .NET example, source validation, mail merge and file compatibility.
Examples
Create and save a label workbook with the configured barcode settings.
using TXTextControl.TXSheetControl.Server;
static async Task<byte[]> CreateFloatingLabelAsync(ServerSheetControl control)
{
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("A1").SetTextAsync("001042");
var options = new BarcodeDrawingOptions {
Symbology = "code128", Source = "A1", Anchor = new DrawingAnchor("D4", 8, 8),
Size = new ObjectSize(240, 100), Name = "Invoice barcode", AltText = "Invoice identifier", Rotation = 0
};
var drawing = await sheet.Drawings.AddBarcodeAsync(options);
var snapshot = await drawing.GetBarcodeAsync();
await drawing.UpdateBarcodeAsync(new BarcodeOptions { Symbology = "code128", Source = "A1", ShowText = false });
return await control.SaveAsync(StreamType.SpreadsheetML);
}