CollapseGroup
(
String groupName,
Boolean redrawGroupImmediately
)
{
Debug.Assert( !String.IsNullOrEmpty(groupName) );
AssertValid();
CheckIfLayingOutGraph("CollapseGroup");
IGraph oGraph = this.Graph;
if ( !GroupUtil.GraphHasGroups(oGraph) )
{
return;
}
GroupInfo oGroupToCollapse;
try
{
oGroupToCollapse = GroupUtil.GetGroups(oGraph).Single(
oGroupInfo => oGroupInfo.Name == groupName);
}
catch (InvalidOperationException)
{
// There is no such group, or there are two or more such groups.
return;
}
CollapseGroupInternal(oGroupToCollapse, redrawGroupImmediately);
}