Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 576 [details]
Screenshot showing the issues.
The custom widgets in the windows native dialogs don't lay out correctly. Also, the window icon is wrong, it should get the icon of the entry executable and use that. See attached screenshot.
The layout section is something I just recently discovered, and that seems to only affect Windows Vista/ 7. Working on that.
Commit 4b57638 fixes the icon issue; commits 5f851d3 and bf7471b fix the layout issues.
Thanks for fixing this!
I'm still seeing a few issues:
* The layout of the buttons and custom widgets isn't consistent with other Windows apps, e.g. Notepad and VS
* The initial size of the open/save dialogs is strange.
* When closing the open/save dialogs, they can be seen to resize smaller briefly before closing.
* On Win7, it does't seem to be using the Win7 or Vista version of the Open/Save dialog, it looks like the WinXP version.
My comments below:
* What issues are you observing on the custom widgets? They should be aligned to match the labels/comboboxes of the dialogs. I may me missing something, of course.
* The size of the dialogs is pre-defined, and there's only a hack to modify them. What are you observing specifically about them? Too big, too small?
* Regarding the closing/resize, is something I have no idea about, and which seems to be related to the dialogs being run on a separated thread. As soon as the Main method of MD is marked with STAThread and we can run the dialogs on the same thread, it should dissapear.
* Right, the dialogs are using the classic look, as the default dialog (WPF based) requires a different kind of approach to contain custom controls. There are a pair of ways to enable that, but that would obviously fail to work for users using Windows XP.
Created attachment 690 [details]
How the open file dialog appears in my Windows 7 setup
This is how it appears to me: http://screencast.com/t/a3S8EmJiVQ2
But notepad looks like this: http://screencast.com/t/Fnd4v7BeEi
And VS looks like this: http://screencast.com/t/rL5ETFBcnu
The placement of the buttons and the "file types" combo are very different.
Oh, indeed, that's related to the new layout used by the WPF based file dialogs. The way they the controls are currently aligned matches the alignment of the extra controls in the pre-Windows Vista/7 dialogs.
So, the issue here is basically the fact that the new WPF dialog may likely not be available under Windows XP systems. This is a question of only supporting the WPF dialogs and ignore the previous versions OR detect/mantain the two of them.
They're not WPF, they're just the Windows Vista / Win7 variants of the Win32 Common dialogs. WindowsPlatform already includes the Windows API Code Pack dll, which has a wrapper for them.
Tried one more time the API Code Pack under Windows XP, and it fails to run, complaining precisely about the need of Windows Vista and further.
So, I was saying, it's a matter of either dropping support for Windows XP, or keep support for the two of them -support for the classic under XP, and support for new one under Vista-.
If we're only going to maintain one, I'd suggest the Windows 7 one, and fall back to GTK+ for older systems. A pretty large proportion of Windows users have Win7 and it's increasing all the time, whereas WinXP is declining.
Sounds like a fair option -hopefully it's as you said and most users are already using Windows Vista and newer-.
I will cook the changes over the next weekend. Thanks for your feedback.
Awesome! Thanks for your contribution, I've been using MD on Windows a lot and it's really nice to have native dialogs :)
I've been a little busy, but I'm gonna summarize why IHMO I don't think the usage of the new file dialogs is gonna happen any time soon:
The only current way to customize the new controls is through the usage of Windows API Code Pack (not even the WPF api allows it). But this library has several issues:
* It doesn't allow the user to specify the layout of child controls. You can only add them and they will appear sequentially. Zero control over that, as mentioned in the docs. We end up with something like the thing in the attached screenshot.
* Once the controls have been added to the dialog, they can't be modified. This is specially troublesome for our combo boxes for the encoding/viewer, as we need them to change their contents on the fly. Destroying the old control and adding a new one fails as well.
Also, there's a chance to use any custom hack to properly display such child controls. The issue is that most of them stay as dirty hacks, and even the best one I found out there (below), probably can't be used, as the guy who wrote it mentions in the doc that he used a Reflector to see the internals of the MS impl (no details in the link, don't worry). On top of that, since it's counting on the internals, it seems to easily break from version to version (as stated in the comments section).
The last chance is to modify the Windows API code pack ourselves do update the controls and its contents -possible from the unmanaged code API-. It *seems* it's possible to take a look at the code and modify it, as the licence states. BUT the layout issue would remain, I'm afraid.
Hope this wasn't a long, long summary ;-)
Created attachment 910 [details]
Windows API CodePack dialog layout
Created attachment 911 [details]
Windows API CodePack dialog layout (correct)
Sorry, the last one was wrong ;-)
We have reimplemented the Windows native dialogs in our application. This should be better now.