ToggleButtonAttach.cs 638 B

1234567891011121314
  1. using System.Windows;
  2. using HandyControl.Data;
  3. namespace HandyControl.Controls;
  4. public class ToggleButtonAttach
  5. {
  6. public static readonly DependencyProperty ShowLabelProperty = DependencyProperty.RegisterAttached(
  7. "ShowLabel", typeof(bool), typeof(ToggleButtonAttach), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
  8. public static void SetShowLabel(DependencyObject element, bool value) => element.SetValue(ShowLabelProperty, ValueBoxes.BooleanBox(value));
  9. public static bool GetShowLabel(DependencyObject element) => (bool) element.GetValue(ShowLabelProperty);
  10. }