Share via


MatrixAnimationUsingPath.IsAdditive 속성

정의

대상 속성의 현재 값을 이 애니메이션의 시작 값에 추가할지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

Boolean

대상 속성의 현재 값을 이 애니메이션의 시작 값에 추가해야 하는 경우 true이고, 그러지 않으면 false입니다. 기본값은 false입니다.

예제

다음 예제에서는 두 개의 비슷한 MatrixAnimationUsingPath 동일한 사각형에 애니메이션 효과를 애니메이션 합니다. 첫 번째 애니메이션의 IsAdditive 속성이 false, 항상 (0, 0)에서 사각형에 애니메이션을 적용할 되므로 애니메이션 시작 값입니다. 두 번째 애니메이션에 동일한 대상 값 (해당 PathGeometry 설정은 동일), 했지만 해당 IsAdditive 속성이 true; 결과적으로, 애니메이션이 적용 되는 경우에 어떤 위치에서 사각형에 애니메이션을 적용할 합니다.

<Page 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
  xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  mc:Ignorable="PresentationOptions">
  <StackPanel>
      
    <!-- The Rectangle that is animated across the screen by animating
         the MatrixTransform applied to the button. -->
    <Rectangle 
      Width="50" Height="20"
      Fill="Blue"
      HorizontalAlignment="Left"
      VerticalAlignment="Top">
      <Rectangle.RenderTransform>
        <MatrixTransform x:Name="myMatrixTransform">
          <MatrixTransform.Matrix >
            <Matrix OffsetX="10" OffsetY="100"/>
          </MatrixTransform.Matrix>
        </MatrixTransform>
      </Rectangle.RenderTransform>
    </Rectangle>
    
    <StackPanel Margin="0,200,0,0" Orientation="Horizontal">
    <Button Content="Animate with IsAdditive set to False"
      HorizontalAlignment="Left" Padding="5">
      <Button.Triggers>
        <EventTrigger RoutedEvent="Button.Click">
          <BeginStoryboard>
            <Storyboard>
            
              <!-- This animation always moves the 
                   rectangle back to (0,0). -->
              <MatrixAnimationUsingPath
                Storyboard.TargetName="myMatrixTransform"
                Storyboard.TargetProperty="Matrix"
                Duration="0:0:2" 
                DoesRotateWithTangent="True" 
                IsAdditive="False">
                <MatrixAnimationUsingPath.PathGeometry>
                  <PathGeometry 
                    Figures="M 0,0 C 35,0 135,0 160,100 180,190 285,200 310,100" />
                </MatrixAnimationUsingPath.PathGeometry>
              </MatrixAnimationUsingPath>
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Button.Triggers>   
    </Button>
    
     <Button Content="Animate with IsAdditive set to True"
      HorizontalAlignment="Left" 
      Padding="5">
      <Button.Triggers>
        <EventTrigger RoutedEvent="Button.Click">
          <BeginStoryboard>
            <Storyboard>
            
              <!-- This animation moves the rectangle from 
                   its current position. -->
              <MatrixAnimationUsingPath
                Storyboard.TargetName="myMatrixTransform"
                Storyboard.TargetProperty="Matrix"
                Duration="0:0:2" 
                DoesRotateWithTangent="True"
                IsAdditive="True">
                <MatrixAnimationUsingPath.PathGeometry>
                  <PathGeometry 
                    Figures="M 0,0 C 35,0 135,0 160,100 180,190 285,200 310,100" />
                </MatrixAnimationUsingPath.PathGeometry>
              </MatrixAnimationUsingPath>
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Button.Triggers>   
    </Button>   
    </StackPanel>
    
    
  </StackPanel>
</Page>

설명

종속성 속성 정보

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

참고

에 대 한 식별자 필드에서 제공 되므로이 종속성 속성 일반적이 지 않습니다 AnimationTimeline 되며 다양 한 파생된 클래스에서 공유 됩니다.

적용 대상