ForceLayoutTheseVerticesOnly
(
ICollection<IVertex> oVerticesToLayOut,
String sLayoutTypeIsNullWarning
)
{
Debug.Assert(oVerticesToLayOut != null);
Debug.Assert( !String.IsNullOrEmpty(sLayoutTypeIsNullWarning) );
AssertValid();
if (oNodeXLControl.IsLayingOutGraph)
{
return;
}
if (LayoutIsNull)
{
ShowLayoutTypeIsNullWarning(sLayoutTypeIsNullWarning);
return;
}
// This method works by adding a value to the graph specifying that
// only the specified vertices should be laid out and all other
// vertices should be completely ignored.
//
// When the graph layout completes (which happens asynchronously),
// oNodeXLControl_GraphLaidOut() removes the value.
oNodeXLControl.Graph.SetValue(
ReservedMetadataKeys.LayOutTheseVerticesOnly, oVerticesToLayOut);
ForceLayout();
}