From 779b72c4abf5e9fdad27b0f52213de8cb83fa715 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Wed, 4 Dec 2019 22:53:50 +0800 Subject: [PATCH] fixed #247 --- src/Shared/HandyControl_Shared/Controls/Other/Badge.cs | 9 +++++++++ .../Themes/Styles/Base/BadgeBaseStyle.xaml | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs b/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs index b4a58d2a..b7268aa9 100644 --- a/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs +++ b/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs @@ -78,5 +78,14 @@ namespace HandyControl.Controls get => (Thickness)GetValue(BadgeMarginProperty); set => SetValue(BadgeMarginProperty, value); } + + public static readonly DependencyProperty ShowBadgeProperty = DependencyProperty.Register( + "ShowBadge", typeof(bool), typeof(Badge), new PropertyMetadata(ValueBoxes.TrueBox)); + + public bool ShowBadge + { + get => (bool) GetValue(ShowBadgeProperty); + set => SetValue(ShowBadgeProperty, value); + } } } \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/BadgeBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/BadgeBaseStyle.xaml index 627fa2b4..9bf504de 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/BadgeBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/BadgeBaseStyle.xaml @@ -11,7 +11,7 @@ - + @@ -33,14 +33,14 @@ - + - + @@ -62,7 +62,7 @@ - +