private void CaptureSearchResultsListTouchDevice(TouchEventArgs touchEventArgs)
 {
     if (m_resultsList.CaptureTouch(touchEventArgs.TouchDevice))
     {
         m_searchResultsListCurrentTouchDevice = touchEventArgs.TouchDevice;
     }
 }
示例#2
0
        private void OnSearchResultsListTouchDown(object sender, TouchEventArgs touchEventArgs)
        {
            m_resultsList.CaptureTouch(touchEventArgs.TouchDevice);

            if (m_searchResultsListCurrentTouchDevice == null)
            {
                CaptureSearchResultsListTouchDevice(touchEventArgs);
            }
            else
            {
                touchEventArgs.Handled = true;
            }
        }
        private void listbox_PreviewTouchDown(object sender, TouchEventArgs e)
        {
            isMoving = false;
            storyboard.Seek(TimeSpan.FromMilliseconds(400));
            ListBox      listbox1 = (ListBox)sender;
            ScrollViewer sv       = FindVisualChild <ScrollViewer>(listbox1);

            isMouseDown = true;
            startX      = e.GetTouchPoint(this).Position.X;
            controlX    = e.GetTouchPoint(this).Position.X;
            // this.offsetLeft = sv.HorizontalOffset;
            offsetLeft = turnImageWhich * listbox1.Width;
            moveX      = 0;
            turnImage_Timer.Stop();
            //  listbox1.CaptureMouse();
            //textbox1.Text = "开始拖动" + offsetLeft;
            listbox1.CaptureTouch(e.TouchDevice);
            e.Handled = true;
        }