private void TouchEff_Completed(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { _currentState = _currentState == State.Collapsed ? State.Expanded : State.Collapsed; this.AbortAnimation("ExpandAnimation"); GotoState(_currentState); }
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); }
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); }); }
private void OnFacebookPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { if (_isSocialOpened) { AsyncRunner.Run(_context.OpenFacebookChat()); } OnSocialClicked(null, null); }
private void OnCallPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { var contact = GlobalSettings.Call; if (_isSocialOpened) { _context.CallHelp(contact); } OnSocialClicked(null, null); }
private void OnQuestionPicked(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { var mailBox = GlobalSettings.MailBox; if (_isSocialOpened) { _context.SendEmail(mailBox); } OnSocialClicked(null, null); }
private void Handle_TouchCompleted(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { DisplayAlert("Thank you", ":)", "OK"); }
void ThemeIcon_Pressed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { UpdateTheme(); ((IUpdatable)this.BindingContext).Update(); }
private void Completed(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { Application.Current.MainPage.DisplayAlert("Clicked on a square", "The Completed event was fired", "Cancel"); }
void TouchEff_Completed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { // needed for tap animation }
private void Handle_TouchCompleted(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { Debug.WriteLine($"~(>'.')> Test de animacion {num}"); //DisplayAlert("Thank you", ":)", "OK"); num++; }
private async void NextPage(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { await Navigation.PushAsync(new Page2()); }
private void Handle_TouchCompleted(TouchEffect.TouchView sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { DisplayAlert("BOOOM", ":(", "OOOOOPS"); }
void TouchEff_Completed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { Shell.Current.FlyoutIsPresented = true; }
public void Back_Tapped(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { Navigation.PopAsync(); }
void TouchEff_Completed(Xamarin.Forms.VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { }
private void RemoveEffect(VisualElement sender, TouchEffect.EventArgs.TouchCompletedEventArgs args) { removeEffectStack.Effects.Clear(); }