Exemplo n.º 1
0
        /// <summary>
        /// The true property changed,update
        /// </summary>
        /// <param name="dependancy">The dependancy.</param>
        /// <param name="args">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
        private static void TrueColorPropertyChanged(DependencyObject dependancy, DependencyPropertyChangedEventArgs args)
        {
            BinaryDashboard instance = dependancy as BinaryDashboard;

            if (instance != null && instance.DashboardLoaded)
            {
                instance.OnPropertyChanged("TrueColor");
                instance.Animate();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The IsTrue property changed update the UI
        /// </summary>
        /// <param name="dependancy">The dependancy.</param>
        /// <param name="args">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
        private static void IsTruePropertyChanged(DependencyObject dependancy, DependencyPropertyChangedEventArgs args)
        {
            BinaryDashboard instance = dependancy as BinaryDashboard;

            if (instance != null && instance.DashboardLoaded)
            {
                double value = instance.IsTrue ? instance.Maximum : instance.Minimum;
                instance.SetValue(BinaryDashboard.ValueProperty, value);
                instance.OnPropertyChanged("IsTrue");
            }
        }