ClassRadBadge
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:
[TelerikToolboxCategory("Common")]
public class RadBadge : ContentControl
Inheritance: objectRadBadge
Constructors
RadBadge()
Initializes a new instance of the RadBadge class.
Declaration
public RadBadge()
Fields
AnchorPositionProperty
Identifies the AnchorPosition dependency property.
Declaration
public static readonly DependencyProperty AnchorPositionProperty
Field Value
DependencyProperty
BadgeProperty
Identifies the Badge attached property.
Declaration
public static readonly DependencyProperty BadgeProperty
Field Value
DependencyProperty
BadgeTypeProperty
Identifies the BadgeType dependency property.
Declaration
public static readonly DependencyProperty BadgeTypeProperty
Field Value
DependencyProperty
GeometryProperty
Identifies the Geometry dependency property.
Declaration
public static readonly DependencyProperty GeometryProperty
Field Value
DependencyProperty
InheritDataContextProperty
Identifies the InheritDataContext dependency property.
Declaration
public static readonly DependencyProperty InheritDataContextProperty
Field Value
DependencyProperty
PlayChangeAnimationCommandProperty
Identifies the PlayChangeAnimationCommand dependency property.
Declaration
public static readonly DependencyProperty PlayChangeAnimationCommandProperty
Field Value
DependencyProperty
PositionProperty
Identifies the Position dependency property.
Declaration
public static readonly DependencyProperty PositionProperty
Field Value
DependencyProperty
StrokeDashArrayProperty
Identifies the StrokeDashArray dependency property.
Declaration
public static readonly DependencyProperty StrokeDashArrayProperty
Field Value
DependencyProperty
StrokeProperty
Identifies the Stroke dependency property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
DependencyProperty
StrokeThicknessProperty
Identifies the StrokeThickness dependency property.
Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
DependencyProperty
TextAlignmentProperty
Identifies the TextAlignment dependency property.
Declaration
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
public Point AnchorPosition { get; set; }
Property Value
Point
BadgeType
Gets or sets the badge type.
Declaration
public BadgeType BadgeType { get; set; }
Property Value
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
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.
PlayChangeAnimationCommand
Gets or sets the PlayChangeAnimation command.
Declaration
public DelegateCommand PlayChangeAnimationCommand { get; set; }
Property Value
Position
Gets or sets the relative position of the badge to the element it is attached to.
Declaration
public Point Position { get; set; }
Property Value
Point
Stroke
Gets or sets the Stroke of the Geometry of the Badge control.
Declaration
public Brush Stroke { get; set; }
Property Value
Brush
StrokeDashArray
Gets or sets the stroke dash array of the badge.
Declaration
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public DoubleCollection StrokeDashArray { get; set; }
Property Value
DoubleCollection
StrokeThickness
Gets or sets the stroke thickness of the badge.
TextAlignment
Gets or sets the text alignment of the underlying TextBlock.
Declaration
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
public static RadBadge GetBadge(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
MeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
constraint
Size
Returns
Size
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnChangeAnimationRequested()
Called when change animation is about to play.
Declaration
protected virtual void OnChangeAnimationRequested()
OnCreateAutomationPeer()
Creates a RadBadgeAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnLoadAnimationRequested()
Called when play animation is about to play.
Declaration
protected virtual void OnLoadAnimationRequested()
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
e
DependencyPropertyChangedEventArgs
SetBadge(DependencyObject, RadBadge)
Sets the attached badge control of the element.
Declaration
public static void SetBadge(DependencyObject obj, RadBadge value)
Parameters
obj
DependencyObject
value