src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/VirtualTreeControl.cs
/// <summary>
///     Helper function to call ToggleState and SynchronizeState as needed
/// </summary>
/// <param name="toggleRow">The row to toggle</param>
/// <param name="toggleColumn">The (native) column to toggle</param>
/// <returns>The changes from the initial ToggleState call</returns>
Helper function to call ToggleState and SynchronizeState as needed
Helper function to call ToggleState and SynchronizeState as needed
private StateRefreshChanges ToggleAndSynchronizeState(int toggleRow, int toggleColumn)
        {
            var changes = myTree.ToggleState(toggleRow, toggleColumn);
            if ((changes != StateRefreshChanges.None)
                &&
                GetStyleFlag(VTCStyleFlags.MultiSelect)
                &&
                (IsSelected(toggleRow))
                &&
                (SelectedItemCount > 1))
            {
                var iter = CreateSelectedItemEnumerator();
                if (iter != null)
                {
                    var info = myTree.GetItemInfo(toggleRow, toggleColumn, false);
                    myTree.SynchronizeState(iter, info.Branch, info.Row, info.Column);
                }
            }
            return changes;
        }
private StateRefreshChanges ToggleAndSynchronizeState ( int toggleRow , int toggleColumn ) { var changes = myTree . ToggleState ( toggleRow , toggleColumn ) ; if ( ( changes != StateRefreshChanges . None ) && GetStyleFlag ( VTCStyleFlags . MultiSelect ) && ( IsSelected ( toggleRow ) ) && ( SelectedItemCount > 1 ) ) { var iter = CreateSelectedItemEnumerator ( ) ; if ( iter != null ) { var info = myTree . GetItemInfo ( toggleRow , toggleColumn , false ) ; myTree . SynchronizeState ( iter , info . Branch , info . Row , info . Column ) ; } } return changes ; }
Helper function to call ToggleState and SynchronizeState as needed
Helper function to call ToggleState and SynchronizeState as needed
// Synchronize the selection state for all other toggleable items.
The changes from the initial ToggleState call
The changes from the initial ToggleState call
toggleRow
int
The row to toggle
The row to toggle
toggleColumn
int
The (native) column to toggle
The ( native ) column to toggle