New to Telerik UI for .NET MAUIStart a free 30-day trial

Badge

Class

Represents the additional marker over the content of RadBadgeView.

Definition

Namespace:Telerik.Maui.Controls.BadgeView

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class Badge : RadContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewBadge

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadContentViewITransformIView...

Inherited Members RadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnBindingContextChanged()

Constructors

Initializes a new instance of the Badge class.

C#
public Badge()

Fields

Identifies the AnimationDuration property.

C#
public static readonly BindableProperty AnimationDurationProperty

AnimationEasingProperty

BindableProperty

Identifies the AnimationEasing property.

C#
public static readonly BindableProperty AnimationEasingProperty

AnimationTypeProperty

BindableProperty

Identifies the AnimationType property.

C#
public static readonly BindableProperty AnimationTypeProperty

BackgroundColorProperty

BindableProperty

Identifies the BackgroundColor property.

C#
public static readonly BindableProperty BackgroundColorProperty

BorderColorProperty

BindableProperty

Identifies the BorderColor property.

C#
public static readonly BindableProperty BorderColorProperty

BorderThicknessProperty

BindableProperty

Identifies the BorderThickness property.

C#
public static readonly BindableProperty BorderThicknessProperty

ControlTemplateProperty

BindableProperty

Identifies the ControlTemplate property.

C#
public static readonly BindableProperty ControlTemplateProperty

CornerRadiusProperty

BindableProperty

Identifies the CornerRadius property.

C#
public static readonly BindableProperty CornerRadiusProperty

FontAttributesProperty

BindableProperty

Identifies the FontAttributes property.

C#
public static readonly BindableProperty FontAttributesProperty

FontFamilyProperty

BindableProperty

Identifies the FontFamily property.

C#
public static readonly BindableProperty FontFamilyProperty

FontSizeProperty

BindableProperty

Identifies the FontSize property.

C#
public static readonly BindableProperty FontSizeProperty

Identifies the MinimumHeightRequest property.

C#
public static readonly BindableProperty MinimumHeightRequestProperty

Identifies the MinimumWidthRequest property.

C#
public static readonly BindableProperty MinimumWidthRequestProperty

Identifies the StartAnimationCommand property.

C#
public static readonly BindableProperty StartAnimationCommandProperty

TextColorProperty

BindableProperty

Identifies the TextColor property.

C#
public static readonly BindableProperty TextColorProperty

TextMarginProperty

BindableProperty

Identifies the TextMargin property.

C#
public static readonly BindableProperty TextMarginProperty

TextProperty

BindableProperty

Identifies the Text property.

C#
public static readonly BindableProperty TextProperty

Properties

Gets or sets the duration of Animation for badge in milliseconds.

C#
public int AnimationDuration { get; set; }

Gets or sets the Easing for the animation of badge.

C#
[TypeConverter(typeof(EasingTypeConverter))]
public Easing AnimationEasing { get; set; }

Gets or sets the type of BadgeAnimationType for badge.

C#
public BadgeAnimationType AnimationType { get; set; }

Gets or sets the background color of badge.

C#
public Color BackgroundColor { get; set; }

Gets or sets the border color of badge.

C#
public Color BorderColor { get; set; }

Gets or sets the border thickness of badge.

C#
public Thickness BorderThickness { get; set; }

ControlTemplate

ControlTemplate

Gets or sets the ControlTemplate of the view.

C#
public ControlTemplate ControlTemplate { get; set; }

CornerRadius

Thickness

Gets or sets the corner radius of badge.

C#
public Thickness CornerRadius { get; set; }

FontAttributes

FontAttributes

Gets or sets the text font attributes of badge.

C#
public FontAttributes FontAttributes { get; set; }

Gets or sets the text font family of badge.

C#
public string FontFamily { get; set; }

Gets or sets the text font size of badge.

C#
[TypeConverter(typeof(FontSizeConverter))]
public double FontSize { get; set; }

Gets or sets the minimum height of the control.

C#
public double MinimumHeightRequest { get; set; }

Gets or sets the minimum width of the control.

C#
public double MinimumWidthRequest { get; set; }

Gets the command that starts the badge animation.

C#
public ICommand StartAnimationCommand { get; }

Gets or sets the text of badge.

C#
public string Text { get; set; }

Gets or sets the text color of badge.

C#
public Color TextColor { get; set; }

TextMargin

Thickness

Gets or sets the text margin of badge.

C#
public Thickness TextMargin { get; set; }

Methods

C#
protected override void OnApplyTemplate()

Called when the handler changes.

C#
protected override void OnHandlerChanged()

Overrides: RadContentView.OnHandlerChanged()

C#
protected override void OnPropertyChanged(string propertyName = null)
Parameters:propertyNamestring

Starts the badge animation based on the configured animation type and settings.

C#
public void StartBadgeAnimation()