/// <summary> /// Provides derived classes an opportunity to handle changes /// to the BackgroundFx property. /// </summary> /// <param name="oldBackgroundFx">The old BackgroundFx value</param> /// <param name="newBackgroundFx">The new BackgroundFx value</param> private async void OnBackgroundFxChanged( CpuShaderEffect oldBackgroundFx, CpuShaderEffect newBackgroundFx) { if (_renderedGrid != null && _renderedGrid.ActualHeight > 0) { await this.UpdateFxAsync(); } }
/// <summary> /// Handles changes to the BackgroundFx property. /// </summary> /// <param name="d"> /// The <see cref="DependencyObject"/> on which /// the property has changed value. /// </param> /// <param name="e"> /// Event data that is issued by any event that /// tracks changes to the effective value of this property. /// </param> private static void OnBackgroundFxChanged( DependencyObject d, DependencyPropertyChangedEventArgs e) { var target = (FxContentControl)d; CpuShaderEffect oldBackgroundFx = (CpuShaderEffect)e.OldValue; CpuShaderEffect newBackgroundFx = target.BackgroundFx; target.OnBackgroundFxChanged(oldBackgroundFx, newBackgroundFx); }