优化更新代码,添加界面功能并整合
This commit is contained in:
33
WPFluent/Controls/Badge/Badge.cs
Normal file
33
WPFluent/Controls/Badge/Badge.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
|
||||
// https://docs.microsoft.com/en-us/fluent-ui/web-components/components/badge
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace WPFluent.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Used to highlight an item, attract attention or flag status.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// <code lang="xml"> /// <ui:Badge Appearance="Secondary"> /// <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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user