コード例 #1
0
        internal void ToggleTrailingSidebar()
        {
            NSSplitViewItem splitViewItem = (NSSplitViewItem)SplitViewItems.Last().Animator;

            TrailingSidebarViewWidthLayoutConstraint !.Active = false;
            NSAnimationContext.RunAnimation(changes: context => {
                context.Duration        = 3;
                splitViewItem.Collapsed = !splitViewItem.Collapsed;
            }, completionHandler: () => {
                TrailingSidebarViewWidthLayoutConstraint.Active = true;
            });
        }
コード例 #2
0
 void ClearControllers()
 {
     while (SplitViewItems.Length > 0)
     {
         var splitItem           = SplitViewItems.Last();
         var childVisualRenderer = splitItem.ViewController as ViewControllerWrapper;
         RemoveSplitViewItem(splitItem);
         IVisualElementRenderer render = null;
         if (childVisualRenderer.RendererWeakRef.TryGetTarget(out render))
         {
             render.Dispose();
         }
         childVisualRenderer.Dispose();
         childVisualRenderer = null;
     }
 }