2016-12-14 9 views
-1

WPFの高さと幅にアニメーションを追加しようとしましたWindow DoubleAnimationEnableDependentAnimationというプロパティを使用する必要があることがわかりました。このプロパティは、WPFプロジェクトでは有効になっていませんが、ユニバーサルウィンドウアプリケーションプロジェクトでのみ有効です。なぜですか?DoubleAnimationのEnableDependentAnimationプロパティがWPFに存在しない理由

答えて

0

WPFには「依存型」アニメーションの概念がないため、WPFで使用できるEnableDependentAnimationプロパティはありません。

<Window x:Class="WpfApplication1.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:WpfApplication1" 
    mc:Ignorable="d" 
    Title="Window1" Height="300" Width="300" x:Name="myWindow"> 
<Window.Triggers> 
    <EventTrigger RoutedEvent="Loaded"> 
     <EventTrigger.Actions> 
      <BeginStoryboard > 
       <Storyboard RepeatBehavior="Forever" AutoReverse="False"> 
        <DoubleAnimation Storyboard.TargetProperty = "Height" To="500" Duration="0:0:5"/> 
        <Storyboard RepeatBehavior="Forever" AutoReverse="False"> 
         <DoubleAnimation Storyboard.TargetProperty="Width" To="500" Duration="0:0:5"/> 
        </Storyboard> 
       </Storyboard> 
      </BeginStoryboard> 
     </EventTrigger.Actions> 
    </EventTrigger> 
</Window.Triggers> 

あなたはまだかかわらず、ウィンドウのサイズをアニメーション化でき

関連する問題