Back to Devexpress

CodabarGenerator.WideNarrowRatio Property

corelibraries-devexpress-dot-xtraprinting-dot-barcode-dot-codabargenerator-28c93f5a.md

latest2.3 KB
Original Source

CodabarGenerator.WideNarrowRatio Property

Gets or sets the density of a barcode’s bars.

Namespace : DevExpress.XtraPrinting.BarCode

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

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
[DefaultValue(2)]
public float WideNarrowRatio { get; set; }
vb
<DefaultValue(2)>
Public Property WideNarrowRatio As Single

Property Value

TypeDefaultDescription
Single2

A float value specifying the density of a barcode’s bars.

|

Remarks

Use this property to specify the ratio of the thickest bar to the narrowest. The value assigned should be equal to or between 2 and 3.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the WideNarrowRatio 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#L84

csharp
((CodabarGenerator)barCode.Symbology).StopSymbol = CodabarStartStopSymbol.D;
((CodabarGenerator)barCode.Symbology).WideNarrowRatio = 2.5F;

See Also

Codabar

CodabarGenerator Class

CodabarGenerator Members

DevExpress.XtraPrinting.BarCode Namespace