Timeline.Duration 속성

정의

반복을 계산하지 않고 이 타임라인이 재생되는 시간을 가져오거나 설정합니다.

public:
 property System::Windows::Duration Duration { System::Windows::Duration get(); void set(System::Windows::Duration value); };
public System.Windows.Duration Duration { get; set; }
member this.Duration : System.Windows.Duration with get, set
Public Property Duration As Duration

속성 값

타임라인의 간단한 기간: 이 타임라인이 단일 정방향 반복을 완료하는 데 걸리는 시간입니다. 기본값은 Automatic입니다.

예제

ParallelTimelineStoryboard 개체의 TimelineGroup 형식입니다. 기간 TimelineGroup 은 자식 타임라인의 기간에 따라 결정됩니다. 예를 들어 Storyboard 마지막 자식 타임라인()이 종료될 때이므로 아래는 6초(DoubleAnimation기간 6초)동안 실행됩니다.

메모

설명 목적으로만 제공되는 다음 예제에서 코드를 생략했습니다.

...
  <Storyboard>
    <DoubleAnimation Duration="0:0:2" …/>
    <DoubleAnimation Duration="0:0:4" BeginTime="0:0:2" …/>
  </Storyboard>
...

< 애니메이션의 > 예로는 ,DoubleAnimation, PointAnimation등이 있습니다ColorAnimation. 이러한 형식의 애니메이션에 대해 지정되지 않은 Duration 경우 1초 동안 실행됩니다.

...
  <!-- With no Duration specified, this animation will run for
       one second -->
  <DoubleAnimation .../>
...

AnimationUsingKeyFrame <의 > 예는 DoubleAnimationUsingKeyFramesPointAnimationUsingKeyFrames입니다. 이러한 유형의 애니메이션에 대해 지정되지 않은 Duration 경우 모든 키 프레임이 완료될 때까지 실행됩니다.

...
  <Storyboard>

    <!-- This key frame animation will end at 4.5 seconds
         Because that is when its last KeyFrame KeyTime ends. -->
    <DoubleAnimationUsingKeyFrames ...>
      <LinearDoubleKeyFrame ... KeyTime="0:0:3" />
      <DiscreteDoubleKeyFrame ... KeyTime="0:0:3.5" />
      <DiscreteDoubleKeyFrame ... KeyTime="0:0:4" />
      <DiscreteDoubleKeyFrame ... KeyTime="0:0:4.5" />
    </DoubleAnimationUsingKeyFrames>
  </Storyboard>
...

설명

타임라인의 간단한 기간은 반복을 포함하는 총 재생 시간과 단일 정방향 반복에 대한 시간을 구성합니다.

기본 기간 동작

값이 있는 Duration 구조체의 Automatic 동작은 타임라인 유형에 따라 달라집니다.

시간 표시줄 동작
Timeline 미정(Timeline 추상)
ParallelTimeline;

Storyboard;

TimelineGroup
자식 타임라인에 맞게 확장
< 형식>애니메이션("From/To/By" 또는 "기본" 애니메이션이라고 함) 1초
< 형식>AnimationUsingKeyFrames(키 프레임 애니메이션이라고 함) 모든 키 프레임 KeyTime 값의 합계

종속성 속성 정보

항목 가치
식별자 필드 DurationProperty
메타데이터 속성이 다음으로 설정됩니다. true None

적용 대상

추가 정보