私は背後にあるコードでは、タイルのアニメーションを作成したい、またはあなたがこのGOLのためのプロジェクトを知っていれば、plsはストーリーボードでStackpanelの余白をアニメーション化するにはどうすればよいですか?
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
while(true){
Duration duration = new Duration(TimeSpan.FromSeconds(0.15));
// Create two DoubleAnimations and set their properties.
DoubleAnimation myDoubleAnimation1 = new DoubleAnimation();
myDoubleAnimation1.Duration = duration;
myDoubleAnimation1.From = -173
myDoubleAnimation1.To = 173;
Storyboard sb = new Storyboard();
sb.Duration = duration;
sb.Children.Add(myDoubleAnimation1);
Storyboard.SetTarget(myDoubleAnimation1, image);
// Set the attached properties of Canvas.Left and Canvas.Top
// to be the target properties of the two respective DoubleAnimations.
Storyboard.SetTargetProperty(myDoubleAnimation1, new PropertyPath(StackPanel.MarginProperty));
// Begin the animation.
sb.Begin();}
});
マージンの種類はダブルではありません(ダブルアニメーションを使用するものです)。 Marginプロパティの内容をアニメーション化する必要があります。これは、構造体であるため、行うことができないかどうかわかりません。あなたは何をしようとしているのですか。 –
ストーリーボードを無限ループの後に実際に作成していますか? – Clemens
[Animating Margin Bottom Silverlight](http://stackoverflow.com/questions/6507954/animating-margin-bottom-silverlight) – ColinE