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;
            }
        }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        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);
            }
        }