Exemple #1
0
 /// <summary>
 /// Toggles the menu open or closed.
 /// </summary>
 public void ToggleMenu()
 {
     if (IsOpen)
     {
         _sidebar.CloseMenu();
     }
     else
     {
         _sidebar.OpenMenu();
     }
 }
Exemple #2
0
 private void PanEndedTowardClose(Sidebar sidebar)
 {
     if (ContentViewController.View.Frame.X > -ContentViewController.View.Frame.Width / 2)
     {
         sidebar.CloseMenu();
     }
     else
     {
         UIView.Animate(
             Sidebar.SlideSpeed,
             0,
             UIViewAnimationOptions.CurveEaseInOut,
             () => { CloseAnimation(); HideDarkOverlay(); },
             () => { });
     }
 }
		private void PanEndedTowardClose(Sidebar sidebar) {
			if (ContentViewController.View.Frame.X > -ContentViewController.View.Frame.Width / 2) {
				sidebar.CloseMenu();
			} else {
				UIView.Animate(
					Sidebar.SlideSpeed, 
					0, 
					UIViewAnimationOptions.CurveEaseInOut,
					() => { CloseAnimation(); }, 
					() => { });
			}
		}