private void TapGestureRecognizer_Tapped(object sender, EventArgs e) { if (IsSearchbarVisible == true) { return; } if (EntryFrame.IsVisible == true) { EntryFrame.IsVisible = false; } else { EntryFrame.IsVisible = true; int transY = 0; //Good for Android //if (Device.RuntimePlatform == Device.iOS) // transY = 0; //Good for iOS if (EntryFrame.TranslationY != transY) { EntryFrame.TranslateTo(0, transY, 100); } // EntryFrame.TranslateTo(0, 0); Text = string.Empty; } }
private async void EntryFrameOnSwipedRight(object sender, SwipedEventArgs e) { if (EntryFrame.TranslationX < 0) { var entryFrameAnimationTask = EntryFrame.TranslateTo(0, EntryFrame.TranslationY); var participantsAnimationTask = ParticipantsFrame.TranslateTo(0, ParticipantsFrame.TranslationY); await Task.WhenAll(entryFrameAnimationTask, participantsAnimationTask); } }
private async void EntryFrameOnSwipedLeft(object sender, SwipedEventArgs e) { if (EntryFrame.TranslationX > -100) { ComputeEntryFrameTranslationIfNeeded(); ComputeParticipantsFrameTranslationIfNeeded(); var entryFrameAnimationTask = EntryFrame.TranslateTo(_entryFrameTranslationX, EntryFrame.TranslationY); var participantsAnimationTask = ParticipantsFrame.TranslateTo(_participantsFrameTranslationX, ParticipantsFrame.TranslationY); await Task.WhenAll(entryFrameAnimationTask, participantsAnimationTask); } }
private async void MessageCollectionViewOnTapped(object sender, EventArgs e) { if (EntryFrame.TranslationX > -100) { ComputeEntryFrameTranslationIfNeeded(); ComputeParticipantsFrameTranslationIfNeeded(); var entryFrameAnimationTask = EntryFrame.TranslateTo(_entryFrameTranslationX, EntryFrame.TranslationY); var participantsAnimationTask = ParticipantsFrame.TranslateTo(_participantsFrameTranslationX, ParticipantsFrame.TranslationY); await Task.WhenAll(entryFrameAnimationTask, participantsAnimationTask); return; } if (EntryFrame.TranslationX < 0) { var entryFrameAnimationTask = EntryFrame.TranslateTo(0, EntryFrame.TranslationY); var participantsAnimationTask = ParticipantsFrame.TranslateTo(0, ParticipantsFrame.TranslationY); await Task.WhenAll(entryFrameAnimationTask, participantsAnimationTask); } }