Ejemplo n.º 1
0
        private void OpenSpecialFolder_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            SpecialFolderInfo specialFolderInfo = e.Parameter as SpecialFolderInfo;

            HandyControl.Controls.TabItem tabItem2 = new HandyControl.Controls.TabItem();
            tabItem2.Header = specialFolderInfo.FolderPath;
            FileExplorerView fileExplorerView = new FileExplorerView();

            tabItem2.Content = fileExplorerView;
            fileExplorerView.Navigate(specialFolderInfo.FolderPath);
            tabControl.Items.Add(tabItem2);
            tabControl.SelectedIndex = tabControl.Items.Count - 1;//选择最后一个
        }
Ejemplo n.º 2
0
        private void OpenLocalDriverCommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            LocalDriveInfo driveInfo = e.Parameter as LocalDriveInfo;

            HandyControl.Controls.TabItem tabItem2 = new HandyControl.Controls.TabItem();
            tabItem2.Header = driveInfo.Name;
            FileExplorerView fileExplorerView = new FileExplorerView();

            tabItem2.Content = fileExplorerView;
            fileExplorerView.Navigate(driveInfo.Name);
            tabControl.Items.Add(tabItem2);
            tabControl.SelectedIndex = tabControl.Items.Count - 1;//选择最后一个
        }