New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the text of the Telerik UI Barcode for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class BarcodeTextBuilder

Inheritance: objectBarcodeTextBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public BarcodeTextBuilder(BarcodeTextElement text)
Parameters:textBarcodeTextElement

Methods

Defines the color of the text. The option accepts a valid CSS color string, including HEX and RGB.

C#
public BarcodeTextBuilder Color(string color)
Parameters:colorstring

The value that configures the color option.

Returns:

BarcodeTextBuilder

Example:
C#
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Text(text => text.Color("#10c4b2"))
)

Defines the font of the text.

C#
public BarcodeTextBuilder Font(string font)
Parameters:fontstring

The value that configures the font.

Returns:

BarcodeTextBuilder

Example:
C#
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Text(text => text.Font("20px sans-serif"))
)

Configures the margin options for the text of the Barcode.

C#
public BarcodeTextBuilder Margin(Action<BarcodeSpacingBuilder> configurator)
Parameters:configuratorAction<BarcodeSpacingBuilder>

The action that configures the margin options of the text.

Returns:

BarcodeTextBuilder

Example:
C#
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Text(text =&gt; text.Margin(margin =&gt; margin.Left(10).Top(20).Right(10).Bottom(20)))
)

Defines the margin of the text.

C#
public BarcodeTextBuilder Margin(int margin)
Parameters:marginint

The value that configures the margin option.

Returns:

BarcodeTextBuilder

Example:
C#
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Text(text =&gt; text.Margin(10))
)

Sets the visibility of the text.

C#
public BarcodeTextBuilder Visible(bool isVisible)
Parameters:isVisiblebool

The value for the visibility of the text.

Returns:

BarcodeTextBuilder

Example:
C#
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Text(text =&gt; text.Visible(false))
)