Skip to main content
All docs
V26.1
  • IntelligentMailOptionsBuilder Class

    Builds an IntelligentMailOptions object. Chain builder methods to configure barcode settings, then call the Build method to create the options object.

    Namespace: DevExpress.Docs.Barcode

    Assembly: DevExpress.Docs.Core.v26.1.dll

    Declaration

    public class IntelligentMailOptionsBuilder :
        BarcodeOptionsBuilder<IntelligentMailOptions, IntelligentMailOptionsBuilder>

    The following members return IntelligentMailOptionsBuilder objects:

    Remarks

    The following code snippet creates the Intelligent Mail barcode and customizes its options:

    DevExpress Barcode Generator - Intelligent Mail barcode

    using DevExpress.Docs.Barcode;
    using DevExpress.Drawing;
    using System.Drawing;
    
    var mailCodeOptions = IntelligentMailOptionsBuilder.Create()
        .WithBackColor(Color.LightGray)
        .WithShowText(false)
        .WithPadding(5)
        .WithBorderWidth(1)
        .WithBorderColor(Color.Blue)
        .Build();
    
    var filePath = Path.GetFullPath("intelligent_mail_barcode.png");
    
    using var stream = new FileStream(filePath, FileMode.Create);
    using var generator = new BarcodeGenerator(mailCodeOptions);
    generator.Export("92123912345678123456", stream, DXImageFormat.Png);
    
    See Also