ah, probably the first annoying Windows Mobile control. As a first time developer for Windows Mobile, I found this control, very very very inconvenient to use. I was actually developing something in Windows Mobile and I haven’t gone far on it and I have to use OpenFileDialog and that control crashes my plans.
would you like to say hello?
Who in Microsoft Windows Mobile team make some stupid control like that? I can’t browse for subfolders!! What a lazy developer! So I made up my mind and decided to make my own. I actually made 2 controls.
NETCFOpenFileDialog and NETCFFolderDialog
Here are the screen shots and Code Snippets.
NETCFOpenFileDialog + NETCFFolderDialog Control
the file extension automatically adds to File Type dropdown.
|Doesn’t look like the control familiar to you? |
NETCFOpenFileDialog.OpenFileDialog ofd = new NETCFOpenFileDialog.OpenFileDialog();
ofd.DefaultPath = @"\Windows\Start Menu\Programs";
ofd.Title = "Open File Test";
ofd.Filter = "JPG|*jpg;PNG|*.png;ALL FILES|*.*";
if (ofd.Filename != string.Empty)
txPath.Text = ofd.Filename;
NETCFFolderDialog.FolderDialog ofd = new NETCFFolderDialog.FolderDialog();
ofd.DefaultFolder = @"\Windows\Start Menu\Programs";
if (ofd.Folder != string.Empty)
txFolder.Text = ofd.Folder;
Download the binaries here