src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/Utils/NodeShapeExtensions.cs
/// <summary>
/// Ensures that a <see cref="NodeShape"/> has a particular expanded or collapsed state
/// </summary>
/// <param name="nodeShape">the <see cref="NodeShape"/> on which to ensure the state</param>
/// <param name="expanded">if true, ensure that nodeShape is expanded, if false esnure that it is collapsed</param>
Ensures that a  has a particular expanded or collapsed state
Ensures that a has a particular expanded or collapsed state
public static void EnsureExpandedState(this NodeShape nodeShape, bool expanded)
        {
            if (nodeShape.IsExpanded != expanded)
            {
                using (var txn = nodeShape.Store.TransactionManager.BeginTransaction())
                {
                    nodeShape.IsExpanded = expanded;
                    txn.Commit();
                }
            }
        }
public static void EnsureExpandedState ( this NodeShape nodeShape , bool expanded ) { if ( nodeShape . IsExpanded != expanded ) { using ( var txn = nodeShape . Store . TransactionManager . BeginTransaction ( ) ) { nodeShape . IsExpanded = expanded ; txn . Commit ( ) ; } } }
Ensures that a  has a particular expanded or collapsed state
Ensures that a has a particular expanded or collapsed state
NodeShape
this
expanded
bool
if true, ensure that nodeShape is expanded, if false esnure that it is collapsed
if true ensure that nodeShape is expanded if false esnure that it is collapsed
nodeShape
the  on which to ensure the state
the on which to ensure the state