-
-
Save anonymous/6db7eb3ec374496bcfc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// This function will result in holding what tree view item (childItem) to delete from the Children of another tree view (baseItem) | |
/// </summary> | |
/// <param name="baseItem">The "root" TV item</param> | |
/// <param name="childItem">The item to remove from the root's children</param> | |
/// <returns></returns> | |
private void DeleteItem(ref TVBaseItem baseItem, ref TVBaseItem childItem) | |
{ | |
TVBaseItem parentToRemoveChildren = null; | |
while (!(baseItem is WorkspaceViewModel) && baseItem.Children.Count <= 1) | |
{ | |
parentToRemoveChildren = baseItem; | |
baseItem = baseItem.Parent; | |
} | |
childItem = parentToRemoveChildren; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment