Reputation: 641
I have an WinForms application and started to convert it into WPF. To have less work, my idea was to let the old dialog windows be WinForms. In the VS2010-designer the dialogs looks normal (with .NET 3.5/4.0 controls) but if I run my program all WinForms controls change into an old style and it looks like .NET 2.0 (I think you know what I mean, that grey bevel style for all controls...)
What happens there? Any ways to fix that?
Upvotes: 3
Views: 882
Reputation: 16439
You have to call System.Windows.Forms.Application.EnableVisualStyles()
to enable the system style for Windows Forms.
The WinForms project template contain that call by default; the WPF template is missing it as WPF controls do not need it.
Upvotes: 7