28 lines
952 B
C#
28 lines
952 B
C#
namespace WPFluent.Controls;
|
|
|
|
/// <summary>
|
|
/// 用于突出显示项目、吸引注意力或标记状态。
|
|
/// </summary>
|
|
/// <example>
|
|
/// <code lang="xml"> /// <ui:Badge Appearance="Accent"> /// <TextBox Text="Hello" /> ///
|
|
/// </ui:Badge> ///</code>
|
|
/// </example>
|
|
public class Badge : System.Windows.Controls.ContentControl, IAppearanceControl
|
|
{
|
|
/// <summary>
|
|
/// Identifies the <see cref="Appearance"/> dependency property.
|
|
/// </summary>
|
|
public static readonly DependencyProperty AppearanceProperty = DependencyProperty.Register(
|
|
nameof(Appearance),
|
|
typeof(Controls.ControlAppearance),
|
|
typeof(Badge),
|
|
new PropertyMetadata(Controls.ControlAppearance.Primary));
|
|
|
|
/// <inheritdoc/>
|
|
public Controls.ControlAppearance Appearance
|
|
{
|
|
get => (Controls.ControlAppearance)GetValue(AppearanceProperty);
|
|
set => SetValue(AppearanceProperty, value);
|
|
}
|
|
}
|