コード例 #1
0
ファイル: CommentPage.xaml.cs プロジェクト: fzany/Confession
        private void dragView_DragEnd(object sender, EventArgs e)
        {
            DraggableView view = (DraggableView)sender;
            string        Guid = view.ClassId;

            if (view.DragDirection == DragDirectionType.Horizontal & view.DragMode == DragMode.Touch)
            {
                if (AppConstants.GetSwipe(Guid, view.DragValue))
                {
                    current_context.OnQuoteCommand.Execute(Guid);
                }
            }
        }
コード例 #2
0
        private void dragView_DragEnd(object sender, EventArgs e)
        {
            DraggableView view   = (DraggableView)sender;
            string        chatID = view.ClassId;

            if (view.DragDirection == DragDirectionType.Horizontal & view.DragMode == DragMode.Touch)
            {
                if (this.Parent.Parent.Parent.BindingContext is ChatPageViewModel parent_page_model)
                {
                    //DependencyService.Get<IMessage>().ShortAlert($"Outgoing: {view.DragValue}");
                    if (AppConstants.GetSwipe(chatID, view.DragValue))
                    {
                        parent_page_model.OnQuoteCommand.Execute(chatID);
                        (this.Parent.Parent.Parent as ChatPage).FocusCommand.Execute(null);
                    }
                }
            }
        }