BarcodeBuilder
Properties
WriteAction - Func
Methods
Padding(System.Double)
The padding of the Barcode.
Parameters
padding - System.Double
The configurator for the padding setting.
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Padding(500)
)
Encoding(Kendo.Mvc.UI.BarcodeSymbology)
The symbology used by the Barcode.
Parameters
encoding - BarcodeSymbology
The configurator for the encoding setting.
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("10110110")
.Encoding(BarcodeSymbology.Code128)
)
RenderAs(Kendo.Mvc.UI.RenderingMode)
Sets the preferred rendering engine. If it is not supported by the browser, the Barcode will switch to the first available mode.The supported values are: "canvas" - renders the widget as a Canvas element, if available. or "svg" - renders the widget as inline SVG document, if available.
Parameters
value - RenderingMode
The value for RenderAs
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.RenderAs(RenderingMode.SVG)
)
Background(System.String)
The background of the barcode area. Any valid CSS color string will work here, including hex and rgb.
Parameters
value - System.String
The value for Background
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Background("#2eb3a6")
)
Border(System.Action)
The border of the barcode area.
Parameters
configurator - System.Action<BarcodeBorderSettingsBuilder>
The configurator for the border setting.
RETURNS
Returns the current instance of BarcodeBuilder .
Checksum(System.Boolean)
If set to true, the Barcode will display the checksum digit next to the value in the text area.
Parameters
value - System.Boolean
The value for Checksum
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Checksum(true)
)
Checksum()
If set to true, the Barcode will display the checksum digit next to the value in the text area.
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Checksum(true)
)
Color(System.String)
The color of the bar elements. Any valid CSS color string will work here, including hex and rgb.
Parameters
value - System.String
The value for Color
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Color("#10c4b2")
)
Height(System.Double)
The height of the barcode in pixels. By default the height is 100.
Parameters
value - System.Double
The value for Height
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Height(200)
)
Padding(System.Action)
The padding of the barcode.
Parameters
configurator - System.Action<BarcodePaddingSettingsBuilder>
The configurator for the padding setting.
RETURNS
Returns the current instance of BarcodeBuilder .
Text(System.Action)
Can be set to a JavaScript object which represents the text configuration.
Parameters
configurator - System.Action<BarcodeTextSettingsBuilder>
The configurator for the text setting.
RETURNS
Returns the current instance of BarcodeBuilder .
Value(System.String)
The initial value of the Barcode
Parameters
value - System.String
The value for Value
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
)
Width(System.Double)
The width of the barcode in pixels. By default the width is 300.
Parameters
value - System.Double
The value for Width
RETURNS
Returns the current BarcodeBuilder instance.
Example
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("1234567")
.Width(200)
)
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
The name.
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
The name.
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean,System.Boolean)
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.