EntranceThemeTransition 클래스

정의

컨트롤이 처음 나타날 때 애니메이션 전환 동작을 제공합니다. 개별 개체 또는 개체의 컨테이너에서 사용할 수 있습니다. 후자의 경우 자식 요소는 동시에 모든 요소가 아닌 순서대로 보기에 애니메이션 효과를 갖습니다.

public ref class EntranceThemeTransition sealed : Transition
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class EntranceThemeTransition final : Transition
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class EntranceThemeTransition final : Transition
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class EntranceThemeTransition : Transition
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class EntranceThemeTransition : Transition
Public NotInheritable Class EntranceThemeTransition
Inherits Transition
<EntranceThemeTransition .../>
상속
Object Platform::Object IInspectable DependencyObject Transition EntranceThemeTransition
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

이 예제에서는 Button에 EntranceThemeTransition을 적용하는 방법을 보여 줍니다.

<Button Content="EntranceThemeTransition Button">
    <Button.Transitions>
        <TransitionCollection>
            
            <!-- This transition just uses the default behavior which is to
                 have the button animate into view from the right. You can
                 make it start from anywhere on the right by using the
                 FromHorizontalOffset property. If you'd rather see a vertical
                 animation, use the FromVerticalOffset property. -->
            <EntranceThemeTransition />
        </TransitionCollection>
    </Button.Transitions>
</Button>

여기서 EntranceThemeTransition은 스타일 리소스를 사용하여 적용됩니다.

<Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
    <Grid.Resources>
        <Style x:Key="DefaultButtonStyle" TargetType="Button">
            <Setter Property="Transitions">
                <Setter.Value>
                    <TransitionCollection>
                        <EntranceThemeTransition/>
                    </TransitionCollection>
                </Setter.Value>
            </Setter>
        </Style>
    </Grid.Resources>

    <Button Style="{StaticResource DefaultButtonStyle}" 
            Content="EntranceThemeTransition style applied" />

</Grid>

패널에서 EntranceThemeTransition 애니메이션을 설정하면 패널의 자식이 보기에 애니메이션 효과를 줄 때 자동으로 오프셋되어 시각적으로 매력적인 입구를 만듭니다.

여기서 사각형은 StackPanel에 추가되므로 단순히 제자리에 나타나는 것이 아니라 오른쪽 위에서 날아다닐 수 있습니다.

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Button Content="Add rectangle" Click="Button_Click"/>

    <StackPanel x:Name="panel1" HorizontalAlignment="Left" Margin="200">
        <StackPanel.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition 
                FromHorizontalOffset="200" 
                FromVerticalOffset="-200"/>
            </TransitionCollection>
        </StackPanel.ChildrenTransitions>
    </StackPanel>
</Grid>
private void Button_Click(object sender, RoutedEventArgs e)
{
    // Add a rectangle to the StackPanel.
    Rectangle r = new Rectangle();
    r.Width = 100;
    r.Height = 100;

    // Alternate colors as rectangles are added.
    if (panel1.Children.Count % 2 == 0)
    {
        r.Fill = new SolidColorBrush(Colors.Green);
    }
    else
    {
        r.Fill = new SolidColorBrush(Colors.Yellow);
    }
    panel1.Children.Add(r);
}

생성자

EntranceThemeTransition()

EntranceThemeTransition 클래스의 새 instance 초기화합니다.

속성

Dispatcher

이 개체가 연결된 CoreDispatcher 를 가져옵니다. CoreDispatcher는 코드가 비 UI 스레드에서 시작된 경우에도 UI 스레드에서 DependencyObject에 액세스할 수 있는 기능을 나타냅니다.

(다음에서 상속됨 DependencyObject)
FromHorizontalOffset

애니메이션이 활성화될 때 대상이 가로 방향으로 변환되는 거리를 가져오거나 설정합니다.

FromHorizontalOffsetProperty

FromHorizontalOffset 종속성 속성을 식별합니다.

FromVerticalOffset

애니메이션이 활성화될 때 대상이 세로 방향으로 변환되는 거리를 가져오거나 설정합니다.

FromVerticalOffsetProperty

FromVerticalOffset 종속성 속성을 식별합니다.

IsStaggeringEnabled

전환이 여러 항목의 렌더링을 지연하는지 또는 모든 항목을 한 번에 렌더링하는지 여부를 결정하는 값을 가져오거나 설정합니다.

IsStaggeringEnabledProperty

IsStaggeringEnabled 종속성 속성을 식별합니다.

메서드

ClearValue(DependencyProperty)

종속성 속성의 로컬 값을 지웁니다.

(다음에서 상속됨 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

애니메이션이 활성화되지 않은 경우 적용되는 종속성 속성에 대해 설정된 모든 기본 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
GetValue(DependencyProperty)

DependencyObject에서 종속성 속성의 현재 유효 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
ReadLocalValue(DependencyProperty)

로컬 값이 설정된 경우 종속성 속성의 로컬 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

DependencyObject instance 특정 DependencyProperty의 변경 내용을 수신 대기하기 위한 알림 함수를 등록합니다.

(다음에서 상속됨 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject에서 종속성 속성의 로컬 값을 설정합니다.

(다음에서 상속됨 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback을 호출하여 이전에 등록된 변경 알림을 취소합니다.

(다음에서 상속됨 DependencyObject)

적용 대상

추가 정보