skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

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.

Inheritance
System.Object
RadBadge
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll

Syntax

[TelerikToolboxCategory("Common")]
public class RadBadge : ContentControl

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
System.Windows.DependencyProperty

BadgeProperty

Identifies the Badge attached property.

Declaration
public static readonly DependencyProperty BadgeProperty
Field Value
System.Windows.DependencyProperty

BadgeTypeProperty

Identifies the BadgeType dependency property.

Declaration
public static readonly DependencyProperty BadgeTypeProperty
Field Value
System.Windows.DependencyProperty

GeometryProperty

Identifies the Geometry dependency property.

Declaration
public static readonly DependencyProperty GeometryProperty
Field Value
System.Windows.DependencyProperty

InheritDataContextProperty

Identifies the InheritDataContext dependency property.

Declaration
public static readonly DependencyProperty InheritDataContextProperty
Field Value
System.Windows.DependencyProperty

PlayChangeAnimationCommandProperty

Identifies the PlayChangeAnimationCommand dependency property.

Declaration
public static readonly DependencyProperty PlayChangeAnimationCommandProperty
Field Value
System.Windows.DependencyProperty

PositionProperty

Identifies the Position dependency property.

Declaration
public static readonly DependencyProperty PositionProperty
Field Value
System.Windows.DependencyProperty

StrokeDashArrayProperty

Identifies the StrokeDashArray dependency property.

Declaration
public static readonly DependencyProperty StrokeDashArrayProperty
Field Value
System.Windows.DependencyProperty

StrokeProperty

Identifies the Stroke dependency property.

Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
System.Windows.DependencyProperty

StrokeThicknessProperty

Identifies the StrokeThickness dependency property.

Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
System.Windows.DependencyProperty

TextAlignmentProperty

Identifies the TextAlignment dependency property.

Declaration
public static readonly DependencyProperty TextAlignmentProperty
Field Value
System.Windows.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
System.Windows.Point

BadgeType

Gets or sets the badge type.

Declaration
public BadgeType BadgeType { get; set; }
Property Value
BadgeType

Geometry

Gets or sets the geometry of the badge.

Declaration
public Geometry Geometry { get; set; }
Property Value
System.Windows.Media.Geometry

InheritDataContext

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

Declaration
public bool InheritDataContext { get; set; }
Property Value
System.Boolean

PlayChangeAnimationCommand

Gets or sets the PlayChangeAnimation command.

Declaration
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
public Point Position { get; set; }
Property Value
System.Windows.Point

Stroke

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

Declaration
public Brush Stroke { get; set; }
Property Value
System.Windows.Media.Brush

StrokeDashArray

Gets or sets the stroke dash array of the badge.

Declaration
public DoubleCollection StrokeDashArray { get; set; }
Property Value
System.Windows.Media.DoubleCollection

StrokeThickness

Gets or sets the stroke thickness of the badge.

Declaration
public double StrokeThickness { get; set; }
Property Value
System.Double

TextAlignment

Gets or sets the text alignment of the underlying TextBlock.

Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
System.Windows.TextAlignment

Methods

GetBadge(DependencyObject)

Gets the attached badge control of the element.

Declaration
public static RadBadge GetBadge(DependencyObject obj)
Parameters
System.Windows.DependencyObject obj

Returns
RadBadge

MeasureOverride(Size)

Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
System.Windows.Size constraint

Returns
System.Windows.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
System.Windows.Automation.Peers.AutomationPeer

OnInitialized(EventArgs)

Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.

Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs e

The System.Windows.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
System.Windows.DependencyPropertyChangedEventArgs e

SetBadge(DependencyObject, RadBadge)

Sets the attached badge control of the element.

Declaration
public static void SetBadge(DependencyObject obj, RadBadge value)
Parameters
System.Windows.DependencyObject obj

RadBadge value

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.