Beispiel #1
0
        private async void LeftAnimation()
        {
            IsAnimating = true;
            _centerControl.CenterToLeftAction();
            _rightControl.RightToCenterAction();
            _leftControl.LeftToRightAction();

            var control = _leftControl;

            _leftControl   = _centerControl;
            _centerControl = _rightControl;
            _rightControl  = control;

            await Task.Delay(200);

            IsAnimating = false;
        }
Beispiel #2
0
        public ScrollSwitchControl()
        {
            this.InitializeComponent();

            _leftControl   = Control1;
            _centerControl = Control2;
            _rightControl  = Control3;

            SizeChanged += MainPage_SizeChanged;


            ManipulationCompleted += The_ManipulationCompleted; //订阅手势滑动结束后的事件
            ManipulationStarted   += The_ManipulationStarted;   //订阅手势滑动结束后的事件
            ManipulationDelta     += The_ManipulationDelta;     //订阅手势滑动事件

            Messenger.Default.Register <string>(this, "ContentTextChanged", OnContentTextChanged);


            ViewModel = ViewModelInstance.Instance.BookContent;

            SizeChanged += ScrollSwitchControl_SizeChanged;
        }