add ShowEmpty prop for Empty control

This commit is contained in:
NaBian committed 2021-01-31 23:42:40 +08:00
1 parent cabd4bd12e
commit 378af385e4
4 files changed
+19 -1

No files matched your search

@@ -1,5 +1,6 @@
using System.Windows;
using System.Windows.Controls;
using HandyControl.Data;
namespace HandyControl.Controls
{
@@ -22,5 +23,14 @@ namespace HandyControl.Controls
get => GetValue(LogoProperty);
set => SetValue(LogoProperty, value);
}
public static readonly DependencyProperty ShowEmptyProperty = DependencyProperty.RegisterAttached(
"ShowEmpty", typeof(bool), typeof(Empty), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
public static void SetShowEmpty(DependencyObject element, bool value)
=> element.SetValue(ShowEmptyProperty, value);
public static bool GetShowEmpty(DependencyObject element)
=> (bool) element.GetValue(ShowEmptyProperty);
}
}