Exemple #1
0
        private static void ShadowProperty_Changed(
            DependencyObject element, DependencyPropertyChangedEventArgs e)
        {
            // Called whenever a property which defines the shadow changes.
            // e.g. the attached Shadow property itself, or an element's elevation.
            // In either case, update the calculated drop shadow values for the element.
            ThemeShadow themeShadow = GetShadow(element);

            if (themeShadow != null)
            {
                themeShadow.UpdateCurrentDropShadowValuesForElement(element);
            }
        }
 /// <summary>
 /// Sets the value of the <see cref="ShadowProperty"/> attached dependency property
 /// for a given <see cref="DependencyObject"/>.
 /// </summary>
 /// <param name="obj">
 /// The <see cref="DependencyObject"/> for which the local value of the
 /// <see cref="ShadowProperty"/> attached dependency property
 /// should be set.
 /// </param>
 /// <param name="value">
 /// The new value for the dependency property.
 /// </param>
 public static void SetShadow(DependencyObject obj, ThemeShadow value) =>
 obj.SetValue(ShadowProperty, value);