PrependTextBlock.xaml.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace PixiEditor.Views.UserControls
  16. {
  17. /// <summary>
  18. /// Interaction logic for PrependTextBlock.xaml
  19. /// </summary>
  20. public partial class PrependTextBlock : UserControl
  21. {
  22. public static readonly DependencyProperty TextProperty =
  23. DependencyProperty.Register(nameof(Text), typeof(string), typeof(PrependTextBlock));
  24. public string Text
  25. {
  26. get => (string)GetValue(TextProperty);
  27. set => SetValue(TextProperty, value);
  28. }
  29. public static readonly DependencyProperty PrependProperty =
  30. DependencyProperty.Register(nameof(Prepend), typeof(string), typeof(PrependTextBlock));
  31. public string Prepend
  32. {
  33. get => (string)GetValue(PrependProperty);
  34. set => SetValue(PrependProperty, value);
  35. }
  36. public static readonly DependencyProperty AppendProperty =
  37. DependencyProperty.Register(nameof(Append), typeof(string), typeof(PrependTextBlock));
  38. public string Append
  39. {
  40. get => (string)GetValue(AppendProperty);
  41. set => SetValue(AppendProperty, value);
  42. }
  43. public static readonly DependencyProperty PrependColorProperty =
  44. DependencyProperty.Register(nameof(PrependColor), typeof(Brush), typeof(PrependTextBlock));
  45. public Brush PrependColor
  46. {
  47. get => (Brush)GetValue(PrependColorProperty);
  48. set => SetValue(PrependColorProperty, value);
  49. }
  50. public static readonly DependencyProperty AppendColorProperty =
  51. DependencyProperty.Register(nameof(AppendColor), typeof(Brush), typeof(PrependTextBlock));
  52. public Brush AppendColor
  53. {
  54. get => (Brush)GetValue(AppendColorProperty);
  55. set => SetValue(AppendColorProperty, value);
  56. }
  57. public PrependTextBlock()
  58. {
  59. InitializeComponent();
  60. }
  61. }
  62. }