TCIRadioButton.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. namespace ComPDFKit.Controls.Asset.Styles
  9. {
  10. public class TCIRadioButton : RadioButton
  11. {
  12. public static readonly DependencyProperty TitleProperty =
  13. DependencyProperty.Register("Title", typeof(string), typeof(TCIRadioButton), new PropertyMetadata(string.Empty));
  14. public string Title
  15. {
  16. get => (string)GetValue(TitleProperty);
  17. set => SetValue(TitleProperty, value);
  18. }
  19. public static readonly DependencyProperty DescriptionProperty =
  20. DependencyProperty.Register("Description", typeof(string), typeof(TCIRadioButton), new PropertyMetadata(string.Empty));
  21. public string Description
  22. {
  23. get => (string)GetValue(DescriptionProperty);
  24. set => SetValue(DescriptionProperty, value);
  25. }
  26. public static readonly DependencyProperty TextWidthProperty =
  27. DependencyProperty.Register("TextWidth", typeof(double), typeof(TCIRadioButton), new PropertyMetadata());
  28. public double TextWidth
  29. {
  30. get => (double)GetValue(TextWidthProperty);
  31. set => SetValue(TextWidthProperty, value);
  32. }
  33. static TCIRadioButton()
  34. {
  35. DefaultStyleKeyProperty.OverrideMetadata(typeof(TCIRadioButton), new FrameworkPropertyMetadata(typeof(TCIRadioButton)));
  36. }
  37. }
  38. }