c# - FolderBrowserDialog on company network to select subfolder -
in wpf app user needs select folder, path in company network. use system.windows.forms.folderbrowserdialog
, following code gets executed on button click event:
folderbrowserdialog fbd = new folderbrowserdialog(); fbd.selectedpath = "\\\\company.net\\data\\_confidential"; dialogresult result = fbd.showdialog();
when folderbrowserdialog
opens, system automatically scans other network devices , causes following problem:
the network tree gets filled other devices , causes selectedpath
scroll away. pretty annoying when user starts searching special subfolder, because has scroll down or selection clicks can hit newly added device (lost focus).
how can avoid problem?
thoughts:
- can extend/overwrite
system.environment.specialfolder
enum , setfbd.rootfolder = system.environment.specialfolder.mysepcialnetworkpath;
- should access network folder dialog/control?
- should remove "browse..."
button
in view , instead scan whole\\\\company.net\\data\\_confidential
path , provide combobox/other selection control(e.g. own subfolder-tree)?
the folderbrowserdialog 'adopting' pc settings depending on how network discovery configured on pc/network. doing folder browsing experience consistent on other applications.
although see default behavior of folderbrowserdialog, may @ this: https://stackoverflow.com/a/15440926/5793786 solved issue similar yours @frank
Comments
Post a Comment