folderbrowserdialog

How to use a FolderBrowserDialog from a WPF application with MVVM

房东的猫 提交于 2021-02-19 01:49:07
问题 I'm trying to use the FolderBrowserDialog from my WPF application - nothing fancy. I don't much care that it has the Windows Forms look to it. I found a question with a suitable answer (How to use a FolderBrowserDialog from a WPF application), except I'm using MVVM. This was the answer I "implemented", except I can't get the window object and I'm just calling ShowDialog() without any parameters. The problem is this: var dlg = new FolderBrowserDialog(); System.Windows.Forms.DialogResult result

List first few files in subfolders and return list with file names and folder names using VBScript [duplicate]

拟墨画扇 提交于 2021-01-07 02:44:39
问题 This question already has answers here : Recursively access subfolder files inside a folder (2 answers) Closed 4 months ago . The code that I currently have (given below), I prompt the user for the folder path then return the first 10 files from one folder. I then put the file names into a text file. I want to be able to list only 10 random "wav" files from each of the subfolders, then return the names of the files and its corresponding folder name to the text file. CODE Const WINDOW_HANDLE =

How to construct path for mtp devices (usable in folder browse dialog)?

烂漫一生 提交于 2021-01-04 06:41:50
问题 I implemented file transfer from windows pc to an android device, which is connected with MTP to the computer. The copy implementation is ready (I used this example: http://code.msdn.microsoft.com/windowsdesktop/Portable-Devices-COM-API-fd4a5f7d). Now I would like to improve UI, I would like to offer a folder selection dialog, where the user can select a MTP device folder, where I will save the file (CLSID_FileOpenDialog with FOS_PICKFOLDERS works nice). Note that simple file save dialog

How to reference System.Windows.Forms in .NET Core 3.0 for WPF apps?

陌路散爱 提交于 2020-11-26 07:03:11
问题 I'm migrating my WPF desktop app from .NET Framwork to Core 3.0. I was using System.Windows.Forms.FolderBrowserDialog() and am now stuck on how to add this reference to the Core project. There is no "System.Windows.Forms" NuGet package available, is there? Is there any alternative way to display the FolderBrowserDialog in the Core? Update I created the Core project using the default template and then copy pasted .cs and .xaml files into it. The .csproj file looks like this: <Project Sdk=

How to reference System.Windows.Forms in .NET Core 3.0 for WPF apps?

℡╲_俬逩灬. 提交于 2020-11-26 07:03:11
问题 I'm migrating my WPF desktop app from .NET Framwork to Core 3.0. I was using System.Windows.Forms.FolderBrowserDialog() and am now stuck on how to add this reference to the Core project. There is no "System.Windows.Forms" NuGet package available, is there? Is there any alternative way to display the FolderBrowserDialog in the Core? Update I created the Core project using the default template and then copy pasted .cs and .xaml files into it. The .csproj file looks like this: <Project Sdk=

FolderBrowser with textbox in VB.NET

久未见 提交于 2020-02-01 17:19:27
问题 This bounty has ended . Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 21 hours . Chad is looking for a canonical answer : “@Smith's answer works great for vb.net, but the code sample is very reluctant to run without throwing exceptions after having converted it via the Telerik converter. It would benefit the community to have the same useful class for use in C# projects as well without requiring a DLL include. My comments on @Smith's answer

Folder browse dialog not showing folders

China☆狼群 提交于 2020-01-15 09:42:08
问题 I have created an application compiled with .NET 3.5. and used the FolderBrowserDialog object. When a button is pressed I execute this code: FolderBrowserDialog fbd = new FolderBrowserDialog (); fbd.ShowDialog(); A Folder dialog is shown but I can't see any folders. The only thing I see are the buttons OK & Cancel (and create new folder button when the ShowNewFolderButton properyty is set to true). When I try the exact same code on a different form everything is working fine. Any ideas?? 回答1:

Windows Phone Folder Picker - Show files

喜欢而已 提交于 2020-01-06 12:47:18
问题 I have following code: //open folder picker ui FolderPicker openPicker = new FolderPicker(); openPicker.ViewMode = PickerViewMode.List; openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; //openPicker.FileTypeFilter.Add(".db"); openPicker.CommitButtonText = "Choose location"; openPicker.ContinuationData["Operation"] = "OpenFolder"; openPicker.PickFolderAndContinue(); This code works, but files arend't displayed; in all folders say: "This folder is empty", which is very

FolderBrowserDialog crashes the application

久未见 提交于 2020-01-04 07:01:28
问题 Whenever I call folderbrowserdialog.showDialog() my application crashes. I'm using the code that worked before for me, so it CAN NOT be the code. try { FolderBrowserDialog fbd = new FolderBrowserDialog(); fbd.RootFolder = Environment.SpecialFolder.Desktop; if (fbd.ShowDialog() == DialogResult.OK) { // this.Minecraft.Text = fbd.SelectedPath; } } catch { } It does not throw any error, no exception, there just pops up the little loading circle, then the app is gone, I noticed it with a different