1

I'm about to start the development of a desktop .NET/C# application which has been designed with a focus on "modern UI" style. For example, it's very similar to the GitHub for Windows client.

I have a strong experience in the creation of .NET interfaces using Winforms, but now I'm wondering what's the most effective way to create buttons, panels and other controls with that particular "flat" style. As you know, the default style of a Winforms application is something like this.

Is there something, like a collection of "Modern controls", ready to be used on .NET Framework 4?

TheUnexpected
  • 3,077
  • 6
  • 32
  • 62
  • 2
    You haven't mentioned WPF anywhere. Have you considered that? – rory.ap Apr 12 '16 at 15:29
  • 2
    @roryap read the title I believe the OP has mentioned `How to write Winforms applications in “Modern UI” style?` – MethodMan Apr 12 '16 at 15:29
  • 1
    Although not a concrete solution, if you insist on using WinForms, you can set a control's `FlatStyle` to Flat, and set the `FlatAppearance` property's `BorderSize` to 0. This will give you flat controls which can have their colour and font changed to look at least a little more modern – Alfie Goodacre Apr 12 '16 at 15:32
  • @MethodMan -- So? We shouldn't mention WPF then? – rory.ap Apr 12 '16 at 15:33
  • 2
    See [MetroFramework — Windows Modern UI for .NET WinForms Applications](http://thielj.github.io/MetroFramework/) – LarsTech Apr 12 '16 at 15:37
  • @LarsTech Interesting, did you ever try MetroFramework? Is it a stable library? – TheUnexpected Apr 12 '16 at 15:44
  • @alessandro.francesconi I have not, but it seems to be fairly popular. I wouldn't necessarily ignore the WPF noise since, if nothing else, Microsoft seems hellbent on making XAML programming a thing. – LarsTech Apr 12 '16 at 16:07

1 Answers1

10

I hate to say but the answer mos likely is "not at all". WinForms was in maintenance way before Modern UI was released. I am not sure any commercial control collection has what you need - and the standard controls definitely do not.

Start upgrading to WPF. You are QUITE late with this, and it has a LOT of better things in critical areas (such as databinding which had quite brutal holes in WinForms).

TomTom
  • 61,059
  • 10
  • 88
  • 148
  • Thanks, actually I already have some experience on WPF too and I was thinking to consider it soon. I thought Winforms had a sort of "official template" to make it look similar to modern WPF applications. – TheUnexpected Apr 13 '16 at 07:28
  • 1
    Definitely not. I can not really say I am sorry about that - WinForms had SERIOUS issues (mostly along data binding). WPF fixes a lot. It takes time to get used to and it is not without fault, but it is a lot more usable ;) – TomTom Apr 13 '16 at 07:29