public void HideMenu()
        {
//			if (!IsOpen)
//				return;
            EnsureInvokedOnMainThread(delegate {
                //isOpen = false;
                navigation.FinishSearch();
                closeButton.RemoveFromSuperview();
                shadowView.Frame = mainView.Frame;
                //UIView.AnimationWillEnd += hideComplete;
                UIView.BeginAnimations("slideMenu");
                UIView.SetAnimationDidStopSelector(new Selector("animationEnded"));
                //UIView.SetAnimationDuration(.5);
                UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
                var frame = this.View.Bounds;
                if (m_FlyMode == FlyoutMode.Left)
                {
                    frame.X = 0;
                }
                else if (m_FlyMode == FlyoutMode.Right)
                {
                    frame.X = 0;
                }
                else if (m_FlyMode == FlyoutMode.Top)
                {
                    frame.Y = 0;
                }

                setViewSize();
                SetLocation(frame);
                shadowView.Frame = frame;
                UIView.CommitAnimations();
            });
        }
Exemple #2
0
        public void HideMenu()
        {
//			if (!IsOpen)
//				return;
            EnsureInvokedOnMainThread(delegate
            {
                //isOpen = false;
                navigation.FinishSearch();
                closeButton.RemoveFromSuperview();
                shadowView.Frame  = mainView.Frame;
                var statusFrame   = statusImage.Frame;
                statusFrame.X     = mainView.Frame.X;
                statusImage.Frame = statusFrame;
                //UIView.AnimationWillEnd += hideComplete;
                UIView.Animate(.2, () =>
                {
                    UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
                    RectangleF frame = View.Bounds;
                    frame.X          = 0;
                    setViewSize();
                    SetLocation(frame);
                    shadowView.Frame  = frame;
                    statusFrame.X     = 0;
                    statusImage.Frame = statusFrame;
                }, hideComplete);
            });
        }
Exemple #3
0
        public void HideMenu()
        {
            isOpen = false;
            navigation.FinishSearch();
            closeButton.RemoveFromSuperview();
            //UIView.AnimationWillEnd += hideComplete;
            UIView.BeginAnimations("slideMenu");
            UIView.SetAnimationDidStopSelector(new Selector("animationEnded"));
            //UIView.SetAnimationDuration(.5);
            UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
            var frame = mainView.Frame;

            frame.X          = 0;
            mainView.Frame   = frame;
            shadowView.Frame = frame;
            UIView.CommitAnimations();
        }
        public void HideMenu()
        {
            if (mainView == null || mainView.Frame.X == 0 || ShouldStayOpen)
            {
                closeButton.RemoveFromSuperview();
                return;
            }

            EnsureInvokedOnMainThread(delegate
            {
                //isOpen = false;
                navigation.FinishSearch();
                closeButton.RemoveFromSuperview();
                UIView.Animate(.2, () =>
                {
                    UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
                    CGRect frame = GetViewBounds();
                    frame.X      = 0;
                    setViewSize();
                    SetLocation(frame);
                    shadowView.Frame = frame;
                }, hideComplete);
            });
        }