PointerUpThemeAnimation Class

Representa una animación preconfigurada que se ejecuta después de que el usuario puntea en un elemento y la acción de punteo se libera.

Herencia

Object
  DependencyObject
    Timeline
      PointerUpThemeAnimation

Sintaxis


public sealed class PointerUpThemeAnimation : Timeline


<PointerUpThemeAnimation .../>

Atributos

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

A continuación se indican los tipos de miembros de PointerUpThemeAnimation (Clase):

Constructores

A continuación se indican los constructores de PointerUpThemeAnimation (Clase).

ConstructorDescripción
PointerUpThemeAnimation Initializes a new instance of the PointerDownThemeAnimation class.

 

Eventos

A continuación se indican los eventos de PointerUpThemeAnimation (Clase).

EventoDescripción
Completed Occurs when the Storyboard object has completed playing. (Se hereda de Timeline)

 

Métodos

The PointerUpThemeAnimation Clase tiene estos métodos. También hereda métodos de Object Clase.

MétodoDescripción
ClearValue Clears the local value of a dependency property. (Se hereda de DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Se hereda de DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Se hereda de DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Se hereda de DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Se hereda de DependencyObject)

 

Propiedades

PointerUpThemeAnimationClase tiene estas propiedades.

PropiedadTipo de accesoDescripción

AutoReverse

Lectura/escrituraGets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration. (Se hereda de Timeline)

BeginTime

Lectura/escrituraGets or sets the time at which this Timeline should begin. (Se hereda de Timeline)

Dispatcher

De sólo lecturaGets the CoreDispatcher that this object is associated with. (Se hereda de DependencyObject)

Duration

Lectura/escrituraGets or sets the length of time for which this timeline plays, not counting repetitions. (Se hereda de Timeline)

FillBehavior

Lectura/escrituraGets or sets a value that specifies how the animation behaves after it reaches the end of its active period. (Se hereda de Timeline)

RepeatBehavior

Lectura/escrituraGets or sets the repeating behavior of this timeline. (Se hereda de Timeline)

SpeedRatio

Lectura/escrituraGets or sets the rate, relative to its parent, at which time progresses for this Timeline. (Se hereda de Timeline)

TargetName

Lectura/escrituraGets or sets the reference name of the control element being targeted.

TargetNameProperty

De sólo lecturaIdentifies the TargetName dependency property.

 

Comentarios

Observe que establecer la propiedad Duration no tiene ningún efecto sobre este objeto porque la duración está preconfigurada.

Ejemplos

A continuación se muestra un ejemplo de una plantilla de un control personalizado que usa las animaciones de tema PointerDown/Up.



<!-- Example template of a custom control that uses PointerDown/Up theme animations.
     The PointerUpThemeAnimation will be run when the control is in the PointerUp 
     state. -->
<ControlTemplate TargetType="local:TapControl">
    <Grid>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="TapStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="PointerDown">
                    <Storyboard>
                        <PointerDownThemeAnimation TargetName="contentRectangle" />
                    </Storyboard>
                </VisualState>    
                <VisualState x:Name="PointerUp">
                    <Storyboard>
                        <PointerUpThemeAnimation TargetName="contentRectangle" />
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Rectangle x:Name="contentRectangle" 
                    Width="100" 
                    Height="100" 
                    Fill="{TemplateBinding Background}" />
    </Grid>
</ControlTemplate>



public sealed class TapControl : Control
{
    public TapControl()
    {
        this.DefaultStyleKey = typeof(TapControl);
    }

    protected override void OnPointerPressed(PointerRoutedEventArgs e)
    {
        this.CapturePointer(e.Pointer);
        VisualStateManager.GoToState(this, "PointerDown", true);
    }

    protected override void OnPointerReleased(PointerRoutedEventArgs e)
    {
        VisualStateManager.GoToState(this, "PointerUp", true);
        this.ReleasePointerCapture(e.Pointer);
    }
}

Requisitos

Cliente mínimo admitido

Windows 8 [Solo aplicaciones de la Tienda Windows]

Servidor mínimo admitido

Windows Server 2012 [Solo aplicaciones de la Tienda Windows]

Espacio de nombres

Windows.UI.Xaml.Media.Animation
Windows::UI::Xaml::Media::Animation [C++]

Metadatos

Windows.winmd

Vea también

Timeline
Animar clics del puntero
Instrucciones y lista de comprobación para animaciones de clic del puntero

 

 

Mostrar:
© 2015 Microsoft