GaugeControl.xaml.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. using Aitex.Core.UI.ControlDataContext;
  15. namespace Aitex.Core.UI.Control
  16. {
  17. /// <summary>
  18. /// GaugeControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class GaugeControl : UserControl
  21. {
  22. public static readonly DependencyProperty DeviceDataProperty = DependencyProperty.Register(
  23. "DeviceData", typeof(GaugeItem), typeof(GaugeControl),
  24. new FrameworkPropertyMetadata(new GaugeItem(), FrameworkPropertyMetadataOptions.AffectsRender));
  25. public GaugeItem DeviceData
  26. {
  27. get
  28. {
  29. return (GaugeItem)this.GetValue(DeviceDataProperty);
  30. }
  31. set
  32. {
  33. this.SetValue(DeviceDataProperty, value);
  34. }
  35. }
  36. public GaugeControl()
  37. {
  38. InitializeComponent();
  39. }
  40. }
  41. }