|
- 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.Academy.CustomControls
- {
- /// <summary>
- /// ValveWithCommandState.xaml 的交互逻辑
- /// </summary>
- public partial class ValveWithCommandState : UserControl
- {
- public ValveWithCommandState()
- {
- InitializeComponent();
- }
-
-
-
- public bool OpenEnable
- {
- get { return (bool)GetValue(OpenEnableProperty); }
- set { SetValue(OpenEnableProperty, value); }
- }
- /// <summary>
- /// 阀门开关状态
- /// </summary>
- public static readonly DependencyProperty OpenEnableProperty =
- DependencyProperty.Register("OpenEnable", typeof(bool), typeof(ValveWithCommandState), new PropertyMetadata(false));
-
-
-
- public Color EdgeColor
- {
- get { return (Color)GetValue(EdgeColorProperty); }
- set { SetValue(EdgeColorProperty, value); }
- }
- /// <summary>
- /// 阀门颜色
- /// </summary>
- public static readonly DependencyProperty EdgeColorProperty =
- DependencyProperty.Register("EdgeColor", typeof(Color), typeof(ValveWithCommandState), new PropertyMetadata(Color.FromArgb(byte.MaxValue, 91, 92, 95)));
-
-
-
-
-
- public Brush CommandColor
- {
- get { return (Brush)GetValue(CommandColorProperty); }
- set { SetValue(CommandColorProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for CommandColor. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty CommandColorProperty =
- DependencyProperty.Register("CommandColor", typeof(Brush), typeof(ValveWithCommandState), new PropertyMetadata(Brushes.Red));
-
-
- }
- }
|