Xamarin.Android

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfBarcode - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfBarcode

    Represents a class used to encode the text as bar code and render in view.

    Inheritance
    System.Object
    SfBarcode
    Namespace: Com.Syncfusion.Barcode
    Assembly: Syncfusion.SfBarcode.Android.dll
    Syntax
    public class SfBarcode : View

    Constructors

    SfBarcode(Context)

    Initializes the new instance of SfBracode class.

    Declaration
    public SfBarcode(Context context)
    Parameters
    Type Name Description
    Android.Content.Context context

    SfBarcode(Context, IAttributeSet)

    Initializes the new instance of SfBracode class.

    Declaration
    public SfBarcode(Context context, IAttributeSet attributeSet)
    Parameters
    Type Name Description
    Android.Content.Context context
    Android.Util.IAttributeSet attributeSet

    Properties

    DarkBarBrush

    Gets or sets the Brush for the darker area of bar code.

    Declaration
    public Color DarkBarBrush { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The default brush is Black.

    LightBarBrush

    Gets or sets the Brush for the lighter area of bar code.

    Declaration
    public Color LightBarBrush { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The default brush is White.

    Orientation

    Gets of sets the vertical orientation of the barcode.

    Declaration
    public BarcodeOrientation Orientation { get; set; }
    Property Value
    Type Description
    BarcodeOrientation

    ShowText

    Gets or sets whether to display the text.

    Declaration
    public bool ShowText { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is True.

    Symbology

    Gets or sets the bar code symbol type.

    Declaration
    public BarcodeSymbolType Symbology { get; set; }
    Property Value
    Type Description
    BarcodeSymbolType

    The default value is Code39.

    SymbologySettings

    Gets or sets the Settings for the applied bar code type.

    Declaration
    public Settings SymbologySettings { get; set; }
    Property Value
    Type Description
    Settings

    Text

    Gets or sets the text to encode.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    TextColor

    Gets or sets the text color.

    Declaration
    public Color TextColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    TextFont

    Gets or sets the text font.

    Declaration
    public Typeface TextFont { get; set; }
    Property Value
    Type Description
    Android.Graphics.Typeface

    TextGapHeight

    Gets or sets the height between bar code and the text.

    Declaration
    public float TextGapHeight { get; set; }
    Property Value
    Type Description
    System.Single

    TextLocation

    Gets of sets the vertical alignment of the text.

    Declaration
    public BarcodeTextLocation TextLocation { get; set; }
    Property Value
    Type Description
    BarcodeTextLocation

    The default value is Bottom.

    TextPosition

    Gets or sets the horizontal alignment of the text.

    Declaration
    public BarcodeTextPosition TextPosition { get; set; }
    Property Value
    Type Description
    BarcodeTextPosition

    The default value is Center.

    TextSize

    Gets or sets the text size.

    Declaration
    public double TextSize { get; set; }
    Property Value
    Type Description
    System.Double

    Methods

    OnDraw(Canvas)

    Darw the barcode in view.

    Declaration
    protected override void OnDraw(Canvas canvas)
    Parameters
    Type Name Description
    Android.Graphics.Canvas canvas

    OnSizeChanged(Int32, Int32, Int32, Int32)

    Calculate new bounds of the barcode

    Declaration
    protected override void OnSizeChanged(int w, int h, int oldw, int oldh)
    Parameters
    Type Name Description
    System.Int32 w
    System.Int32 h
    System.Int32 oldw
    System.Int32 oldh
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved