# Key Features

The purpose of this help article is to show you the key features of the **RadBarcode** control.

## Setting Barcode Value

RadBarcode exposes a **Value** property that is used to set the barcode data presented by the control. The **Value** of the barcode is of type string and the allowed length depends on the symbology you choose.

## Setting the Symbology

Through the **Symbology** property you could set the symbology that will be used to convert the Value of the control into a visual barcode representation.  RadBarcode supports the most commonly used symbologies such as:

* EAN13
* EAN8
* UPC-A
* UPC-E
* Code39
* QRCode
* PDF417

The `RadBarcode.Symbology` property expects `SymbologyBase`. Since `SymbologyBase` is an abstract class, an instance of a concrete subclass such as `Code39` can be assigned to `RadBarcode.Symbology`.

To set the symbology in code-behind, assign a concrete symbology instance to the `Symbology` property. This example assumes that the `RadBarcode` control has `x:Name="Barcode"` in XAML:

```C#
this.Barcode.Symbology = new Telerik.Windows.Controls.Code39();
```

> For more details on the available symbologies go to [Supported Types](https://www.telerik.com/products/wpf/documentation/controls/radbarcode/supported-types/overview) topic.

**Example 1** shows a RadBarcode with the Code39 symbology applied.

**Example 1: Code39 Symbology**

```XAML
<telerik:RadBarcode Width="250" Height="150" Value="58000106" Foreground="Black" 
									HorizontalAlignment="Center" VerticalAlignment="Center">
    <telerik:RadBarcode.Symbology>
        <telerik:Code39 HorizontalTextAlignment="Center"
							SizingMode="Stretch" 
							ShowText="True"  
							CodeTextSpacing="10"/>
    </telerik:RadBarcode.Symbology>
</telerik:RadBarcode>
```

> caption RadBarcode with 1D Code39 symbology

![Barcode Symbology](https://www.telerik.com/products/wpf/documentation/assets/bbadc7b83b21d22b135b7fe83caae279/barcode_setsymbology_1.png)

## Defining the Sizing Mode

RadBarcode provides three sizing modes that will help you fine-tune the rendering of your codes:

* **Manual**: You could define the size of the smallest line or dot of the code through the Module property and the other lines and dots multiply that size. Module property is measured in device pixels.
* **Snap**: The code is stretched to the available size, but each line or dot is drawn with exact number of pixels so they look sharp. If the number of bars is greater than the pixel width of the barcode, the barcode won't get rendered to avoid wrong visualization.
* **Stretch**: The code is stretched in such a way to fit exactly the available size, each line or dot size is calculated so they snap to the device pixels. In order the lines to stay sharp and stretch the barcode to the available size, some of them are slightly thicker than others.

**Example 2** shows the same Barcode with Manual SizingMode:

**Example 2: Code39 SizingMode**

```XAML
<telerik:RadBarcode Width="250" Height="150" Value="58000106" Foreground="Black" 
									HorizontalAlignment="Center" VerticalAlignment="Center">
    <telerik:RadBarcode.Symbology>
        <telerik:Code39 HorizontalTextAlignment="Center" 
						SizingMode="Manual"
						Module="2" 
						ShowText="True"  
						CodeTextSpacing="10"/>
    </telerik:RadBarcode.Symbology>
</telerik:RadBarcode>
```

> caption Barcode with manual SizingMode

![Barcode SizingMode](https://www.telerik.com/products/wpf/documentation/assets/14c7462c478de333d722e50f2229d85e/barcode_sizingmode.png)

## Setting AutoCheckSum

By default, RadBarcode control automatically adds a checksum at the end of the barcode. You could disable this by setting **AutoCheckSum** property of its Symbology to false.

> If you disable the AutoCheckSum feature, you would need to manually add a checksum to ensure the reliability of the barcode symbol.

## Changing the Colors

You could easily change the visual appearance of your Barcodes in order to match your application theme through **ForegroundColor** and **BackgroundColor** properties.

**Example 3: Changing the colors**

```XAML
<telerik:RadBarcode Width="250" Height="150" Foreground="DarkBlue" Background="Beige"
                                HorizontalAlignment="Center" VerticalAlignment="Center"                               
                                Value="58000106">
    <telerik:RadBarcode.Symbology>
        <telerik:Code39 SizingMode="Stretch" />
    </telerik:RadBarcode.Symbology>
</telerik:RadBarcode>
```

> caption Barcode with customized colors

![Barcode Colors](https://www.telerik.com/products/wpf/documentation/assets/6b3dc093027cee4cb095605480149d84/barcode_colors.png)

## See Also

* [Supported Types](https://www.telerik.com/products/wpf/documentation/controls/radbarcode/supported-types/overview)
