public override void ItemDidCollapse(NSNotification notification) { //var outlineView = (NSOutlineView) notification.Object; if (!notification.UserInfo.TryGetValue(NSObjectKey, out var value)) { return; } var node = (value as MacObjectValueNode)?.Target; if (node == null) { return; } treeView.CollapseNode(node); }