UPCAGenerator Class

Represents the class used to generate an UPC-A barcode.

Namespace: DevExpress.XtraPrinting.BarCode

Assembly: DevExpress.Printing.v21.2.Core.dll

Declaration

public class UPCAGenerator :
    EAN13Generator

Remarks

The following code creates the UPC-A barcode and specifies its properties:

View Example: How to add a bar code to a report

using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
// ...
public XRBarCode CreateUPCABarCode(string BarCodeText) {
    // Create a bar code control.
    XRBarCode barCode = new XRBarCode();

    // Set the bar code's type to UPC-A.
    barCode.Symbology = new UPCAGenerator();

    // Adjust the bar code's main properties.
    barCode.Text = BarCodeText;
    barCode.Width = 275;
    barCode.Height = 200;

    return barCode;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the UPCAGenerator class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Show 11 items
See Also