WPF(XAML,XBAP,.NET3.5)GUIプログラミング Part3 at TECH
WPF(XAML,XBAP,.NET3.5)GUIプログラミング Part3 - 暇つぶし2ch179:デフォルトの名無しさん
09/02/11 13:04:35
過疎ってる・・・

OpacitySliderはスライダーで、
 
RotateTransform rotate = new RotateTransform(0);
OpacitySlider.LayoutTransform = rotate;
 
DoubleAnimationUsingKeyFrames rotationAnimation
         = new System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames();
rotationAnimation.KeyFrames.Add(new LinearDoubleKeyFrame(0, TimeSpan.Zero));
rotationAnimation.KeyFrames.Add(new LinearDoubleKeyFrame(360, TimeSpan.FromSeconds(5)));
 
Storyboard rotationStoryBoard = new Storyboard();
rotationStoryBoard.RepeatBehavior = RepeatBehavior.Forever;
rotationStoryBoard.Children.Add(rotationAnimation);
Storyboard.SetTarget(rotationAnimation, OpacitySlider);
Storyboard.SetTargetProperty(rotationAnimation,
       new PropertyPath("(FrameworkElement.LayoutTransform).(RotateTransform.Angle)"));
rotationStoryBoard.Begin();
 
でスライダーは回転するんだけど、
 
Storyboard.SetTarget(rotationAnimation, rotate);
Storyboard.SetTargetProperty(rotationAnimation, new PropertyPath("Angle"));
 
って変更すると回転しなくなる。何でだか分かる人いる?ちなみにスライダーを回転させたいん
じゃなくて、別の問題を単純化したらこうなったんだけど。


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch