2011-08-09 7 views

답변

1
Storyboard sb = new Storyboard(); 
sb.BeginTime = TimeSpan.FromSeconds(10); 
sb.Children.Add(new DoubleAnimation()); 
sb.Children.Add(new DoubleAnimation()); 
1
  Storyboard sb = new Storyboard(); 
      sb.BeginTime = TimeSpan.FromSeconds(10); 

        <DoubleAnimation 
        Storyboard.TargetName="myBrush1" 
        Storyboard.TargetProperty="RadiusX" 
        From="0" To="1" 
        Duration="0:0:20" 
        /> 
      //Equivalent code for the above is : 
      DoubleAnimation db = new DoubleAnimation(); 
      db.From = 0; 
      db.To = 1; 
      db.Duration = new Duration(TimeSpan.FromSeconds(20)); 
      Storyboard.SetTarget(db, myBrush1); 
      Storyboard.SetTargetProperty(db, RadiusX); 


        <DoubleAnimation 
        Storyboard.TargetName="myBrush1" 
        Storyboard.TargetProperty="RadiusY" 
        From="0" To="1" 
        Duration="0:0:20" 
        /> 
      //Equivalent code for the above is : 

      DoubleAnimation db1 = new DoubleAnimation(); 
      db1.From = 0; 
      db1.To = 1; 
      db1.Duration = new Duration(TimeSpan.FromSeconds(20)); 
      Storyboard.SetTarget(db, myBrush1); 
      Storyboard.SetTargetProperty(db, RadiusY); 
      //assigning both double animation to main Storyboard 
      sb.Children.Add(db); 
      sb.Children.Add(db1); 
      myBrush1.Resources.Add(storyboard); 
      sb.Begin(); 
+0

이 좀보십시오 – Shrivallabh

관련 문제