|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
-
- namespace BPASmartClient.CustomResource.UserControls
- {
- /// <summary>
- /// HandValve.xaml 的交互逻辑
- /// </summary>
- public partial class HandValve : UserControl
- {
- public HandValve()
- {
- InitializeComponent();
- }
-
- public static readonly DependencyProperty OpenEnableProperty = DependencyProperty.Register("OpenEnable", typeof(bool), typeof(HandValve), new PropertyMetadata(true));
-
- public static readonly DependencyProperty EdgeColorProperty = DependencyProperty.Register("EdgeColor", typeof(Color), typeof(HandValve), new PropertyMetadata(Color.FromArgb(byte.MaxValue, 91, 92, 95)));
-
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(HandValve), new PropertyMetadata(""));
-
- /// <summary>
- /// 获取或设置当前的阀门的开关状态
- /// </summary>
- public bool OpenEnable
- {
- get
- {
- return (bool)GetValue(OpenEnableProperty);
- }
- set
- {
- SetValue(OpenEnableProperty, value);
- }
- }
-
- /// <summary>
- /// 边缘的颜色
- /// </summary>
- public Color EdgeColor
- {
- get
- {
- return (Color)GetValue(EdgeColorProperty);
- }
- set
- {
- SetValue(EdgeColorProperty, value);
- }
- }
-
- /// <summary>
- /// 获取或设置控件的显示颜色
- /// </summary>
- public string Text
- {
- get
- {
- return (string)GetValue(TextProperty);
- }
- set
- {
- SetValue(TextProperty, value);
- }
- }
- }
- }
|