namespace WPFluent.Controls; public class InfoBadge : System.Windows.Controls.Control { /// /// Identifies the dependency property. /// public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register( nameof(CornerRadius), typeof(CornerRadius), typeof(InfoBadge), new FrameworkPropertyMetadata( new CornerRadius(8), FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender)); /// /// Identifies the dependency property. /// public static readonly DependencyProperty IconProperty = DependencyProperty.Register( nameof(Icon), typeof(IconElement), typeof(InfoBadge), new PropertyMetadata(null, null, IconElement.Coerce)); /// /// Identifies the dependency property. /// public static readonly DependencyProperty SeverityProperty = DependencyProperty.Register( nameof(Severity), typeof(InfoBadgeSeverity), typeof(InfoBadge), new PropertyMetadata(InfoBadgeSeverity.Attention)); /// /// Identifies the dependency property. /// public static readonly DependencyProperty ValueProperty = DependencyProperty.Register( nameof(Value), typeof(string), typeof(InfoBadge), new PropertyMetadata(string.Empty)); /// /// Gets or sets the title of the . /// public CornerRadius CornerRadius { get => (CornerRadius)GetValue(CornerRadiusProperty); set => SetValue(CornerRadiusProperty, value); } /// /// Gets or sets displayed . /// [Bindable(true)] [Category("Appearance")] public IconElement? Icon { get => (IconElement?)GetValue(IconProperty); set => SetValue(IconProperty, value); } /// /// Gets or sets the title of the . /// public InfoBadgeSeverity Severity { get => (InfoBadgeSeverity)GetValue(SeverityProperty); set => SetValue(SeverityProperty, value); } /// /// Gets or sets the title of the . /// public string Value { get => (string)GetValue(ValueProperty); set => SetValue(ValueProperty, value); } }