private static bool ItemIsExpandable(IVsHierarchy hierarchy, uint itemId)
{
object property = null;
if (TryGetItemProperty(hierarchy, itemId, __VSHPROPID.VSHPROPID_Expandable, out property))
{
if (property.GetType() == typeof(bool))
{
return (bool)property;
}
return (int)property != 0;
}
return false;
}