Back to Devexpress

XRBarCode.AutoModule Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrbarcode-8b223110.md

latest3.1 KB
Original Source

XRBarCode.AutoModule Property

Gets or sets whether the Module property value should be calculated automatically based on the barcode size.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue(false)]
[SRCategory(ReportStringId.CatBehavior)]
public bool AutoModule { get; set; }
vb
<DefaultValue(False)>
<SRCategory(ReportStringId.CatBehavior)>
Public Property AutoModule As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to automatically calculate the Module value; otherwise, false.

|

Remarks

Use the AutoModule property to adjust the XRBarCode.Module property value when resizing a bar code. Enabling the AutoModule setting may cause issues if the bar code’s width is too narrow to display all the bars correctly (it also depends on the selected Symbology. In this case, a bar code scanner may be unable to read the output.

The Alignment property is ignored if the AutoModule property is enabled and the TargetDeviceDpi property is set. If you want the Alignment property to work correctly, disable the AutoModule property or reset the TargetDeviceDpi property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AutoModule property.

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.

reporting-add-a-bar-code-to-a-report/CS/Form1.cs#L277

csharp
// If the AutoModule property is set to false, uncomment the next line.
barCode.AutoModule = true;
//barcode.Module = 3;

See Also

Module

XRBarCode Class

XRBarCode Members

DevExpress.XtraReports.UI Namespace