Пример #1
0
        private void OnPointerUp(PointerEventArgs e)
        {
            BSplitterCJsInterop.releasePointerCapture(jsRuntimeCurrent, bSplitter.bsbSettings.ID, e.PointerId);
            DragMode = false;

            OnDragEnd?.Invoke(bSplitter.bsbSettings.index, (int)e.ClientX, (int)e.ClientY);
        }
Пример #2
0
        private void OnPointerDown(PointerEventArgs e)
        {
            BSplitterCJsInterop.SetPointerCapture(jsRuntimeCurrent, bSplitter.bsbSettings.ID, e.PointerId);
            DragMode = true;

            if (bsSettings.IsDiagonal)
            {
                bSplitter.PreviousPosition  = (int)e.ClientX;
                bSplitter.PreviousPosition2 = (int)e.ClientY;
            }
            else
            {
                if (bsSettings.VerticalOrHorizontal)
                {
                    bSplitter.PreviousPosition  = (int)e.ClientY;
                    bSplitter.PreviousPosition2 = (int)e.ClientX;
                }
                else
                {
                    bSplitter.PreviousPosition  = (int)e.ClientX;
                    bSplitter.PreviousPosition2 = (int)e.ClientY;
                }
            }


            OnDragStart?.Invoke(bSplitter.bsbSettings.index, (int)e.ClientX, (int)e.ClientY);
        }