chore: add show label property for toggle button.
This commit is contained in:
1 parent
34054286e7
commit
37d69e1906
5 files changed
+63
-57
No files matched your search
@@ -0,0 +1,14 @@
|
||||
using HandyControl.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace HandyControl.Controls;
|
||||
|
||||
public class ToggleButtonAttach
|
||||
{
|
||||
public static readonly DependencyProperty ShowLabelProperty = DependencyProperty.RegisterAttached(
|
||||
"ShowLabel", typeof(bool), typeof(ToggleButtonAttach), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
|
||||
|
||||
public static void SetShowLabel(DependencyObject element, bool value) => element.SetValue(ShowLabelProperty, ValueBoxes.BooleanBox(value));
|
||||
|
||||
public static bool GetShowLabel(DependencyObject element) => (bool) element.GetValue(ShowLabelProperty);
|
||||
}
|
||||
Reference in new issue
Block a user