コード例 #1
0
        private void TouchEff_Completed(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
        {
            _currentState = _currentState == State.Collapsed ? State.Expanded : State.Collapsed;

            this.AbortAnimation("ExpandAnimation");
            GotoState(_currentState);
        }
コード例 #2
0
        private void OnSocialPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
        {
            var webView = new WebView();
            var page    = new ContentPage {
                Content = webView
            };

            switch (args.Parameter)
            {
            case "twitter":
                webView.Source = (BindingContext as MainViewModel)?.Twitter;
                page.Title     = "Twitter";
                break;

            case "linkedin":
                webView.Source = (BindingContext as MainViewModel)?.LinkedIn;
                page.Title     = "LinkedIn";
                break;

            case "instagram":
                webView.Source = (BindingContext as MainViewModel)?.Instagram;
                page.Title     = "Instagram";
                break;
            }
            OnSocialClicked(null, null);
            Navigation.PushAsync(page);
        }
コード例 #3
0
        private void OnSocialClicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
        {
            _tokenSource?.Cancel();
            _tokenSource = new CancellationTokenSource();
            var token = _tokenSource.Token;

            _isSocialOpened = !_isSocialOpened;
            var firstSocial = FirstSocial;
            var thirdSocial = ThirdSocial;

            if (_isSocialOpened)
            {
                firstSocial = ThirdSocial;
                thirdSocial = FirstSocial;
            }

            Device.BeginInvokeOnMainThread(async() =>
            {
                await firstSocial.ScaleTo(_isSocialOpened ? 1 : 0);
                if (token.IsCancellationRequested)
                {
                    return;
                }
                await SecondSocial.ScaleTo(_isSocialOpened ? 1 : 0);
                if (token.IsCancellationRequested)
                {
                    return;
                }
                await thirdSocial.ScaleTo(_isSocialOpened ? 1 : 0);
            });
        }
コード例 #4
0
 private void OnFacebookPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     if (_isSocialOpened)
     {
         AsyncRunner.Run(_context.OpenFacebookChat());
     }
     OnSocialClicked(null, null);
 }
コード例 #5
0
        private void OnCallPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
        {
            var contact = GlobalSettings.Call;

            if (_isSocialOpened)
            {
                _context.CallHelp(contact);
            }
            OnSocialClicked(null, null);
        }
コード例 #6
0
        private void OnQuestionPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
        {
            var mailBox = GlobalSettings.MailBox;

            if (_isSocialOpened)
            {
                _context.SendEmail(mailBox);
            }
            OnSocialClicked(null, null);
        }
コード例 #7
0
 private void Handle_TouchCompleted(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     DisplayAlert("Thank you", ":)", "OK");
 }
コード例 #8
0
 void ThemeIcon_Pressed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     UpdateTheme();
     ((IUpdatable)this.BindingContext).Update();
 }
コード例 #9
0
 private void Completed(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     Application.Current.MainPage.DisplayAlert("Clicked on a square", "The Completed event was fired", "Cancel");
 }
コード例 #10
0
 void TouchEff_Completed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     // needed for tap animation
 }
コード例 #11
0
 private void Handle_TouchCompleted(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     Debug.WriteLine($"~(>'.')> Test de animacion {num}");
     //DisplayAlert("Thank you", ":)", "OK");
     num++;
 }
コード例 #12
0
 private async void NextPage(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     await Navigation.PushAsync(new Page2());
 }
コード例 #13
0
 private void Handle_TouchCompleted(TouchEffect.TouchView sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     DisplayAlert("BOOOM", ":(", "OOOOOPS");
 }
コード例 #14
0
 void TouchEff_Completed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     Shell.Current.FlyoutIsPresented = true;
 }
コード例 #15
0
 public void Back_Tapped(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     Navigation.PopAsync();
 }
コード例 #16
0
 void TouchEff_Completed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
 }
コード例 #17
0
 private void RemoveEffect(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args)
 {
     removeEffectStack.Effects.Clear();
 }