12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Media;
- namespace Venus_Themes.UserControls
- {
- /// <summary>
- /// PendulumValve.xaml 的交互逻辑
- /// </summary>
- public partial class PendulumValve : UserControl
- {
- public PendulumValve()
- {
- InitializeComponent();
- }
- public static readonly DependencyProperty OpeningProperty = DependencyProperty.Register(
- "Opening", typeof(int), typeof(PendulumValve));
- public int Opening
- {
- get { return (int)this.GetValue(OpeningProperty); }
- set
- {
- this.SetValue(OpeningProperty, value);
- }
- }
- public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register(
- "IsOpen", typeof(bool), typeof(PendulumValve),new PropertyMetadata(false,new PropertyChangedCallback(OnPropertyChanged)));
- static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- if (Convert.ToBoolean(e.NewValue) == true)
- {
-
- }
- }
- public bool IsOpen
- {
- get
- {
- return (bool)this.GetValue(IsOpenProperty);
- }
- set
- {
- this.SetValue(IsOpenProperty, value);
- }
- }
- public static readonly DependencyProperty IsOpenColorProperty = DependencyProperty.Register(
- "IsOpenColor", typeof(SolidColorBrush), typeof(PendulumValve));
- public SolidColorBrush IsOpenColor
- {
- get
- {
- return (SolidColorBrush)this.GetValue(IsOpenColorProperty);
- }
- set
- {
- this.SetValue(IsOpenColorProperty, value);
- }
- }
- }
- }
|