In This Article

Code39Symbology Class

Represents a bar code symbology implementation for Code 39.

This symbology is also known as Alpha39, Code 39 mod 43, Code 3 of 9, Code 3/9, USD-3, and USS Code 39.

public class Code39Symbology : LinearBarCodeSymbology, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement BarCodeSymbology LinearBarCodeSymbology Object
Derived:
Code39ExtendedSymbology

Remarks

Code 39 is a linear symbology, and is one of the first alphanumeric bar codes. Each character encoded is made up of 5 bars and 4 spaces for a total of 9 elements. 3 out of the 9 element are always wide. Although it is not as dense of a symbology such as Code 128, it is one of the most widely supported symbologies by devices.

This symbology can encode numbers, uppercase letters, and -$% ./+ characters.

Each encoded value must start and stop with *, which is automatically inserted. The AreStartStopCharactersVisible property determines whether these start/stop characters are included in the DisplayValue.

This symbology is self-checking, so no checksum or check digit is required. However if the IsChecksumEnabled property is true, the symbology's implementation auto-calculates and inserts a check digit. This is referred to as Code 39 mod 43.

An extended implementation of Code 39 is available in Code39ExtendedSymbology. That implementation allows for all lower 128 ASCII characters to be encoded based on the core Code 39 concepts.

For detailed documentation on this symbology's features and how to use them, please see the Code 39 documentation topic.

Constructors

Code39Symbology()

Initializes an instance of the Code39Symbology class.

public Code39Symbology()

Properties

AreStartStopCharactersVisible

Gets or sets whether the start/stop characters (*) are visible in the displayed value.

public bool AreStartStopCharactersVisible { get; set; }

Property Value

Boolean:

true if the start/stop characters (*) are visible in the displayed value; otherwise, false. The default value is false.

IsChecksumEnabled

Gets or sets whether the optional checksum should be added.

public bool IsChecksumEnabled { get; set; }

Property Value

Boolean:

true if the optional checksum should be added; otherwise, false. The default value is false.

Methods

OnValueChanged(String, String)

Occurs when the value of the Value property is changed.

protected override void OnValueChanged(string oldValue, string newValue)
Parameter Type Description
oldValue String

The old value.

newValue String

The new value.

PreprocessCharacter(Char)

Pre-processes the specified character and expands it if necessary.

protected virtual string PreprocessCharacter(char ch)
Parameter Type Description
ch Char

The character to examine.

Returns

String:

The pre-processing result.

ValidateValue(String)

Validates that the symbology can parse the specified value.

public override ValidationResult ValidateValue(string value)
Parameter Type Description
value String

The value to validate.

Returns

ValidationResult:

A ValidationResult containing the result of the validation.

Fields

AreStartStopCharactersVisibleProperty

Identifies the AreStartStopCharactersVisible dependency property. This field is read-only.

public static readonly DependencyProperty AreStartStopCharactersVisibleProperty

IsChecksumEnabledProperty

Identifies the IsChecksumEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsChecksumEnabledProperty

Inherited Members

Extension Methods