DissolveElement.xaml.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 SHJX.Service.Librarys.MainLibrarys
  16. {
  17. /// <summary>
  18. /// DissolveElement.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class DissolveElement : UserControl
  21. {
  22. public DissolveElement()
  23. {
  24. InitializeComponent();
  25. }
  26. public double ProcessValue
  27. {
  28. get => (double)GetValue(ProcessValueProperty);
  29. set => SetValue(ProcessValueProperty, value);
  30. }
  31. public static readonly DependencyProperty ProcessValueProperty =
  32. DependencyProperty.Register(nameof(ProcessValue), typeof(double), typeof(DissolveElement),
  33. new UIPropertyMetadata(0.0, (obj, args) =>
  34. {
  35. var control = obj as DissolveElement;
  36. var path = control?.process_value;
  37. path.Value = (double)args.NewValue;
  38. }));
  39. public string DissolveText
  40. {
  41. get => (string)GetValue(DissolveTextProperty);
  42. set => SetValue(DissolveTextProperty, value);
  43. }
  44. public static readonly DependencyProperty DissolveTextProperty = DependencyProperty.Register(nameof(DissolveText), typeof(string), typeof(DissolveElement),
  45. new UIPropertyMetadata(string.Empty, (obj, args) =>
  46. {
  47. var control = obj as DissolveElement;
  48. var path = control?.txt_dissolve_show;
  49. path.Text = (string)args.NewValue;
  50. }));
  51. }
  52. }