Share via


MatrixAnimationUsingPath.IsAngleCumulative 속성

정의

애니메이션 효과를 준 매트릭스의 회전 각도가 반복할 때마다 축적되는지 여부를 지정하는 값을 가져오거나 설정합니다.

public:
 property bool IsAngleCumulative { bool get(); void set(bool value); };
public bool IsAngleCumulative { get; set; }
member this.IsAngleCumulative : bool with get, set
Public Property IsAngleCumulative As Boolean

속성 값

true 애니메이션의 회전 각도가 반복해서 축적되어야 하는 경우 그러지 않은 경우 false합니다. 기본값은 false입니다.

예제

다음 예제에서는 두 개의 비슷한 MatrixAnimationUsingPath 동일한 사각형에 애니메이션 효과를 애니메이션 합니다. 모두 애니메이션 동일 PathGeometry 사각형은 오른쪽 화면을 따라 이동 하 고 모두 애니메이션을 4 번 반복으로 설정 됩니다 회전 시키는 설정 합니다. 첫 번째 애니메이션 IsAngleCumulative 속성 false이므로 사각형 애니메이션이 반복 되 면 원래 각도로 이동 합니다. 두 번째 애니메이션의 IsAngleCumulative 속성이 true; 결과적으로 사각형 각도 때 원래 값으로 다시 이동 하는 것이 아니라 여 애니메이션이 반복 됨을 높이려면 나타납니다.

<Page 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
  <StackPanel Margin="50">
      
    <!-- The Rectangle that is animated across the screen by animating
         the MatrixTransform applied to the button. -->
    <Rectangle 
      Width="75" Height="25"
      HorizontalAlignment="Left"
      VerticalAlignment="Top"
      Stroke="Black" StrokeThickness="1">
      <Rectangle.RenderTransform>
        <MatrixTransform x:Name="myMatrixTransform">
          <MatrixTransform.Matrix >
            <Matrix OffsetX="10" OffsetY="100"/>
          </MatrixTransform.Matrix>
        </MatrixTransform>
      </Rectangle.RenderTransform>
      <Rectangle.Fill>
        <LinearGradientBrush>
          <GradientStop Color="Lime" Offset="0.0" />
          <GradientStop Color="Gray" Offset="1.0" />
        </LinearGradientBrush>
      </Rectangle.Fill>
    </Rectangle>

    <!-- Shows the animation path. -->
    <Path
      Stroke="Black" StrokeThickness="5"
      Data="M 0,0 A 50,50 0 1 0 100,0" />
    
    <StackPanel Margin="0,200,0,0" Orientation="Horizontal">
    <Button Content="Animate with IsAngleCumulative set to False"
      HorizontalAlignment="Left" Padding="5">
      <Button.Triggers>
        <EventTrigger RoutedEvent="Button.Click">
          <BeginStoryboard>
            <Storyboard>

              <!-- The angle generated by this animation does not
                   accumulate over repetitions. As a result, 
                   the rectangle appears to jump back to its 
                   starting angle when the animation repeats.  -->
              <MatrixAnimationUsingPath
                Storyboard.TargetName="myMatrixTransform"
                Storyboard.TargetProperty="Matrix"
                Duration="0:0:2" 
                RepeatBehavior="4x" 
                IsOffsetCumulative="True" 
                IsAngleCumulative="False"
                DoesRotateWithTangent="True">
                <MatrixAnimationUsingPath.PathGeometry>
                  <PathGeometry Figures="M 0,0 A 50,50 0 1 0 100,0" />
                </MatrixAnimationUsingPath.PathGeometry>
              </MatrixAnimationUsingPath>
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Button.Triggers>   
    </Button>
    
     <Button Content="Animate with IsAngleCumulative set to True"
      HorizontalAlignment="Left" 
      Padding="5">
      <Button.Triggers>
        <EventTrigger RoutedEvent="Button.Click">
          <BeginStoryboard>
            <Storyboard>
            
              <!-- The angle generated by this animation accumulates
                   over repetitions. As a result, the rectangle's
                   rotation appears seamless.  -->
              <MatrixAnimationUsingPath
                Storyboard.TargetName="myMatrixTransform"
                Storyboard.TargetProperty="Matrix"
                Duration="0:0:2" 
                RepeatBehavior="4x" 
                IsOffsetCumulative="True" 
                IsAngleCumulative="True"
                DoesRotateWithTangent="True">
                <MatrixAnimationUsingPath.PathGeometry>
                  <PathGeometry Figures="M 0,0 A 50,50 0 1 0 100,0" />
                </MatrixAnimationUsingPath.PathGeometry>
              </MatrixAnimationUsingPath>
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Button.Triggers>   
    </Button>   
    </StackPanel>
    
    
  </StackPanel>
</Page>

설명

이 속성 설정 된 경우 true, 여 애니메이션이 반복 됨에 따라 애니메이션된 매트릭스의 회전 각도 누적 됩니다. 경로 작은 호 경우 누적 각도로 회전을 다시 시작 하지 않고 각 반복을 사용 하 여 지속적으로 회전 하려면 개체를 발생 합니다. 함께 사용할 경우는 IsOffsetCumulativetrue, 개체 (지정한 경로)에 따라 바운스 해당 하는 동안 전도에 나타날 수 있습니다. 관련 내용은 IsOffsetCumulative를 참조하십시오.

경우이 속성을 설정 해도 효과가 없습니다 DoesRotateWithTangentfalse합니다.

이 속성에 따라 애니메이션 매트릭스의 각도 애니메이션이 반복 하는 경우 누적 되는지 여부를 결정 해당 RepeatBehavior ; 설정 되지는지 않습니다 오프셋이 애니메이션이 다시 시작 되 면 누적 합니다. 애니메이션에 이전 애니메이션의 값 빌드 방법에 대 한 자세한 내용은 참조 하세요. IsAdditive합니다.

종속성 속성 정보

식별자 필드 IsAngleCumulativeProperty
메타 데이터 속성 설정 true 없음

적용 대상

추가 정보