private static void FolderBottom(object sender, ExecutedRoutedEventArgs e) { Main main = (Main)sender; Folder folder = main.SelectedFolder; if (folder != null) { folder.Bottom(); main.SelectedFolder = folder; EnsureFolderTreeDoesNotSelectRoot(main); } }