Exemplo n.º 1
0
        /// <summary>
        /// Sets the interaction effect for a given element..
        /// </summary>
        public static void SetInteraction(DependencyObject element, InteractionEffectBase value)
        {
            if (element == null)
            {
                throw new ArgumentNullException(nameof(element));
            }

            element.SetValue(InteractionProperty, value);
        }
Exemplo n.º 2
0
        private static void BeginInteractionEffect(FrameworkElement target, PointerRoutedEventArgs args)
        {
            InteractionEffectBase effect = GetInteraction(target);

            if (effect == null)
            {
                return;
            }

            effect.OnPointerDown(target, args);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Cancels the effect currently applied to the given element.
        /// </summary>
        public static void CancelEffect(DependencyObject element)
        {
            if (element == null)
            {
                throw new ArgumentNullException(nameof(element));
            }

            InteractionEffectBase effect = GetInteraction(element);

            effect.CancelEffect();
        }