2016-08-31 20 views
1

プレゼンテーションのイメージをクリックした後でアニメーション(イメージ上)を開始し、5秒後にログインページに移動するスプラッシュ画面を作成したいと思います。アニメーションと遅延を伴うスプラッシュ画面

私はそれの解決策を見つけようとしましたが、答えは特定のプラータフォームに関連するものです。

私のアイデアは、十字形の上にコードすることです。

答えて

2

研究した後、私は... Xamarin公式ページ(animation'sサンプル)からの溶液と、(遅延のため)他のページは、私がサイトを覚えているドントこの質問を投稿

- 私を見つけました私はコミュニティにとって本当に面白いと思うので、答えてください。

  Button startButton = new Button() { Image = "splashlogo.png", BackgroundColor = Xamarin.Forms.Color.Transparent, HorizontalOptions = Xamarin.Forms.LayoutOptions.Center, Scale = 3.5}; 

      startButton.Clicked += async (object sender, EventArgs e) => 
      { 
       var parentAnimation = new Animation(); 
       var scaleUpAnimation = new Animation(v => startButton.Scale = v, 1, 2, Easing.SpringIn); 
       var rotateAnimation = new Animation(v => startButton.Rotation = v, 0, 360); 
       var scaleDownAnimation = new Animation(v => startButton.Scale = v, 2, 1, Easing.SpringOut); 

       parentAnimation.Add(0, 0.5, scaleUpAnimation); 
       parentAnimation.Add(0, 1, rotateAnimation); 
       parentAnimation.Add(0.5, 1, scaleDownAnimation); 

       parentAnimation.Commit(startButton, "ChildAnimations", 16, 4000, null); 
       await Task.Delay(5000); 
       await App.Current.MainPage.Navigation.PushModalAsync(new Login()); 
      }; 

       public static async Task Sleep(int ms) 
       { 
        await Task.Delay(ms); 
       } 
+0

ドラッグ&ドロップ機能を試してみませんか?はい、今すぐ100バウンシーを持っていると私の質問に答えてください。http://stackoverflow.com/q/39220188/3879847 –

関連する問題