Quantcast
Channel: Xamarin.Mac — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 1429

NSOutlineView Expand / Collapse item with animation from code

$
0
0

I have an outline view where I need to expand / collapse items when clicked anywhere on the row and I am being successful in doing that except the animation behavior is not same as when disclosure triangle is clicked to expand / collapse.

public override bool ShouldSelectItem(NSOutlineView outlineView, NSObject item)
{
    if (outlineView.IsItemExpanded(item)) 
    {
       outlineView.CollapseItem(item, false);
    }
    else
    {
       outlineView.ExpandItem(item, false);
    }
    return false;
}

Can someone help me write the missing code to achieve desired animation. Thanks in advance.


Viewing all articles
Browse latest Browse all 1429

Trending Articles