Class
RadBadge

A content control which is attached to an element and usually displays a status, warning, note, count information related to the attached element.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Common")]
public class RadBadge : ContentControl

Inheritance: objectRadBadge

Constructors

RadBadge()

Initializes a new instance of the RadBadge class.

Declaration

cs-api-definition
public RadBadge()

Fields

AnchorPositionProperty

Identifies the AnchorPosition dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AnchorPositionProperty

Field Value

DependencyProperty

BadgeProperty

Identifies the Badge attached property.

Declaration

cs-api-definition
public static readonly DependencyProperty BadgeProperty

Field Value

DependencyProperty

BadgeTypeProperty

Identifies the BadgeType dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty BadgeTypeProperty

Field Value

DependencyProperty

GeometryProperty

Identifies the Geometry dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GeometryProperty

Field Value

DependencyProperty

InheritDataContextProperty

Identifies the InheritDataContext dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty InheritDataContextProperty

Field Value

DependencyProperty

PlayChangeAnimationCommandProperty

Identifies the PlayChangeAnimationCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PlayChangeAnimationCommandProperty

Field Value

DependencyProperty

PositionProperty

Identifies the Position dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PositionProperty

Field Value

DependencyProperty

StrokeDashArrayProperty

Identifies the StrokeDashArray dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StrokeDashArrayProperty

Field Value

DependencyProperty

StrokeProperty

Identifies the Stroke dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StrokeProperty

Field Value

DependencyProperty

StrokeThicknessProperty

Identifies the StrokeThickness dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StrokeThicknessProperty

Field Value

DependencyProperty

TextAlignmentProperty

Identifies the TextAlignment dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextAlignmentProperty

Field Value

DependencyProperty

Properties

AnchorPosition

Gets or sets the anchor position of the badge, relative to the size of the badge control. When you set the Position property, consider you move this anchor position. Default value is (0.5, 0.5) meaning the center point of the badge is used for positioning it relatively to the element.

Declaration

cs-api-definition
public Point AnchorPosition { get; set; }

Property Value

Point

BadgeType

Gets or sets the badge type.

Declaration

cs-api-definition
public BadgeType BadgeType { get; set; }

Property Value

BadgeType

A BadgeType value that determines the visual representation of the badge.

Remarks

The following values are supported: Default (the default badge appearance), DotOnly (only a dot is displayed), Available (indicates available status), DoNotDisturb (indicates do not disturb status), Rejected (indicates rejected status), Remove (indicates removal status), Offline (indicates offline status), Away (indicates away status), OutOfOffice (indicates out of office status), Add (indicates add status), and ContentOnly (displays no badge).

Geometry

Gets or sets the geometry of the badge.

Declaration

cs-api-definition
public Geometry Geometry { get; set; }

Property Value

Geometry

InheritDataContext

Gets or sets a value indicating whether the badge should take the data context from its target element.

Declaration

cs-api-definition
public bool InheritDataContext { get; set; }

Property Value

bool

PlayChangeAnimationCommand

Gets or sets the PlayChangeAnimation command.

Declaration

cs-api-definition
public DelegateCommand PlayChangeAnimationCommand { get; set; }

Property Value

DelegateCommand

Position

Gets or sets the relative position of the badge to the element it is attached to.

Declaration

cs-api-definition
public Point Position { get; set; }

Property Value

Point

Stroke

Gets or sets the Stroke of the Geometry of the Badge control.

Declaration

cs-api-definition
public Brush Stroke { get; set; }

Property Value

Brush

StrokeDashArray

Gets or sets the stroke dash array of the badge.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public DoubleCollection StrokeDashArray { get; set; }

Property Value

DoubleCollection

StrokeThickness

Gets or sets the stroke thickness of the badge.

Declaration

cs-api-definition
public double StrokeThickness { get; set; }

Property Value

double

TextAlignment

Gets or sets the text alignment of the underlying TextBlock.

Declaration

cs-api-definition
public TextAlignment TextAlignment { get; set; }

Property Value

TextAlignment

A TextAlignment value that determines how text is aligned within the badge's content area.

Remarks

The following values are supported: (text is aligned to the left edge), (text is centered within the available space), (text is aligned to the right edge), and (text is stretched to fit both edges, creating equal spacing between words).

Methods

GetBadge(DependencyObject)

Gets the attached badge control of the element.

Declaration

cs-api-definition
public static RadBadge GetBadge(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

RadBadge

MeasureOverride(Size)

Declaration

cs-api-definition
protected override Size MeasureOverride(Size constraint)

Parameters

constraint

Size

Returns

Size

OnApplyTemplate()

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnChangeAnimationRequested()

Called when change animation is about to play.

Declaration

cs-api-definition
protected virtual void OnChangeAnimationRequested()

OnCreateAutomationPeer()

Creates a RadBadgeAutomationPeer.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnLoadAnimationRequested()

Called when play animation is about to play.

Declaration

cs-api-definition
protected virtual void OnLoadAnimationRequested()

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Declaration

cs-api-definition
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

SetBadge(DependencyObject, RadBadge)

Sets the attached badge control of the element.

Declaration

cs-api-definition
public static void SetBadge(DependencyObject obj, RadBadge value)

Parameters

obj

DependencyObject

value

RadBadge