/// <summary> /// Callback method when someone tries to modify the PulseDepth property. This will verify /// the source is this object. If someone tries to set the value without a binding, the source /// will be the location of the object and not this object. Set the new value for the pulse depth. /// Value is in meters. /// </summary> /// <param name="source">Location this property was changed.</param> /// <param name="e">Old and new value for the property.</param> public static void OnWpBlankPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { // Get the source (this object) PulseAnime pulseAnime = source as PulseAnime; // Get the new value float value = (float)e.NewValue; // This would be null if the source was not PulseAnime if (pulseAnime != null) { //// Set the value pulseAnime.SetWpBlank(value); } }
/// <summary> /// Callback method when someone tries to modify the PulseDepth property. This will verify /// the source is this object. If someone tries to set the value without a binding, the source /// will be the location of the object and not this object. Set the new value for the pulse depth. /// Value is in meters. /// </summary> /// <param name="source">Location this property was changed.</param> /// <param name="e">Old and new value for the property.</param> public static void OnDepthToBottomPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { // Get the source (this object) PulseAnime pulseAnime = source as PulseAnime; // Get the new value double value = (double)e.NewValue; // This would be null if the source was not PulseAnime if (pulseAnime != null) { //// Set the value pulseAnime.SetDepthToBottom(value); } }