@@ -360,6 +360,26 @@ public void ExpandNode (ObjectValueNode node)
360360 NodeExpand ? . Invoke ( this , new ObjectValueNodeEventArgs ( node ) ) ;
361361 }
362362
363+ public override void ExpandItem ( NSObject item , bool expandChildren )
364+ {
365+ NSAnimationContext . BeginGrouping ( ) ;
366+ NSAnimationContext . CurrentContext . Duration = 0 ;
367+ base . ExpandItem ( item , expandChildren ) ;
368+ NSAnimationContext . EndGrouping ( ) ;
369+ OptimizeColumnSizes ( false ) ;
370+ OnResized ( ) ;
371+ }
372+
373+ public override void ExpandItem ( NSObject item )
374+ {
375+ NSAnimationContext . BeginGrouping ( ) ;
376+ NSAnimationContext . CurrentContext . Duration = 0 ;
377+ base . ExpandItem ( item ) ;
378+ NSAnimationContext . EndGrouping ( ) ;
379+ OptimizeColumnSizes ( false ) ;
380+ OnResized ( ) ;
381+ }
382+
363383 /// <summary>
364384 /// Triggered when the view tries to collapse a node.
365385 /// </summary>
@@ -368,6 +388,24 @@ public void ExpandNode (ObjectValueNode node)
368388 public void CollapseNode ( ObjectValueNode node )
369389 {
370390 NodeCollapse ? . Invoke ( this , new ObjectValueNodeEventArgs ( node ) ) ;
391+ }
392+
393+ public override void CollapseItem ( NSObject item , bool collapseChildren )
394+ {
395+ NSAnimationContext . BeginGrouping ( ) ;
396+ NSAnimationContext . CurrentContext . Duration = 0 ;
397+ base . CollapseItem ( item , collapseChildren ) ;
398+ NSAnimationContext . EndGrouping ( ) ;
399+ OptimizeColumnSizes ( false ) ;
400+ OnResized ( ) ;
401+ }
402+
403+ public override void CollapseItem ( NSObject item )
404+ {
405+ NSAnimationContext . BeginGrouping ( ) ;
406+ NSAnimationContext . CurrentContext . Duration = 0 ;
407+ base . CollapseItem ( item ) ;
408+ NSAnimationContext . EndGrouping ( ) ;
371409 OptimizeColumnSizes ( false ) ;
372410 OnResized ( ) ;
373411 }
@@ -554,9 +592,6 @@ public void OnNodeExpanded (ObjectValueNode node)
554592 ExpandItem ( item ) ;
555593 }
556594
557- OptimizeColumnSizes ( false ) ;
558- OnResized ( ) ;
559-
560595 // TODO: all this scrolling kind of seems awkward
561596 //if (path != null)
562597 // ScrollToCell (path, expCol, true, 0f, 0f);
0 commit comments