What's new with WinForms | .NET Conf 2023

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Since we added WinForms to .NET in .NET Core 3.0 we've been making a lot of improvements for our developers. This session will go over some of these improvements in both the runtime and the Visual Studio WinForms designer. You'll see that WinForms is alive and well in .NET!
    Chapters:
    00:00 Intro
    00:08 Welcome
    00:42 WinForms - a brief history
    02:25 WinForms in .NET
    03:35 Improving the look and feel
    05:00 Demo
    13:18 New TaskDialog Button
    14:42 Visual Studio Experience
    15:59 DPI Unaware designing
    18:00 Demo
    21:26 Command Bindings in WinForms .NET
    23:31 Accessibility
    24:18 Tell us about your migration
    aka.ms/WinFormsFeedback
    Download .NET 8 - aka.ms/get-dotnet-8
    Hack Together - aka.ms/hacktogether/dotnet
    Learn collection - aka.ms/learn-dotnet-8
    .NET 8 Survey - aka.ms/dotnet-survey
    Local Events - aka.ms/dotnetconf-local-event
    Hero blog - aka.ms/dotnet8blog
    Blog: aka.ms/dotnet/blog
    Twitter: aka.ms/dotnet/twitter
    TikTok: aka.ms/dotnet/tiktok
    Mastodon: aka.ms/dotnet/mastodon
    LinkedIn: aka.ms/dotnet/linkedin
    Facebook: aka.ms/dotnet/facebook
    Docs: learn.microsoft.com/dotnet
    Forums: aka.ms/dotnet/forums
    🙋‍♀️Q&A: aka.ms/dotnet-qa
    👨‍🎓Microsoft Learn: aka.ms/learndotnet
    #dotnet
  • Věda a technologie

Komentáře • 111

  • @jcddcjjcdnz
    @jcddcjjcdnz Před 8 měsíci +42

    Love the attention Winforms is getting.

  • @TheExtinctSpecie
    @TheExtinctSpecie Před 8 měsíci +28

    Big fan of the changes. Glad winforms is getting some love

  • @kirbyman1kanden7pf
    @kirbyman1kanden7pf Před 2 měsíci +2

    Windows Forms is old faithful, reliable as hell, it does the job, and the control layout system is very simple, been using it a VERY VERY long time and will continue to do so.

  • @JakobSagatowski
    @JakobSagatowski Před 8 měsíci +17

    The Winforms GUI editor is still to this day amazing. WinForms has been the saviour in a few scientific projects I've been involved in, thanks to the huge amount of great resources and thanks to how easy it is to setup and get going. Thanks ❤

  • @mohdotnet
    @mohdotnet Před 8 měsíci +17

    Quite happy winforms is not dead.
    Love this tech

  • @josefromspace
    @josefromspace Před 8 měsíci +15

    Great to see WinForms (and its team) still growing and strong! 😃

  • @blackeducationacademy
    @blackeducationacademy Před 8 měsíci +11

    WinForms in 2023 yeeees🎉🎉🎉🎉

  • @dirkschannel5817
    @dirkschannel5817 Před 8 měsíci +9

    Thanks for the updates :-) The longevity of WinForms is a value in an of it self.

  • @Malekzadeh88
    @Malekzadeh88 Před 7 měsíci +3

    Feels like I lost my beloved reliable friend through the storms of new technologies over the years and now I found out that he is Ok and ones again got attention he deserved to grow. Missed you buddy🤜 #WinForms

  • @rotgertesla
    @rotgertesla Před 8 měsíci +12

    still using winforms in my new projects

  • @MrFEMGM
    @MrFEMGM Před 7 měsíci +3

    Is a great job! WInforms is a very fast development tool, which is great for many use cases. Thanks.

  • @randompep
    @randompep Před 8 měsíci +5

    Glad to see it's still around and alive. Used them for desktop apps like 15 years ago, and it seems they're still alive and kicking 🙂

  • @DanielMendozaDev
    @DanielMendozaDev Před 8 měsíci +17

    LOVED the DPIUnaware feature!
    We’ve lost literal days of work because a dev/designer forgot to run VS at 100% scaling and moves all the complex controls within a form or two. This change is a godsend.

    • @dotnetdevni
      @dotnetdevni Před 8 měsíci

      Thats been there for a few months it gives u a warning

    • @klausloffelmann9833
      @klausloffelmann9833 Před 8 měsíci

      @@dotnetdevni The warning we show for a while, that's true. The option to force the Designer into DPIUnaware, though, has only lately been introduced. It's new in 17.9.

    • @dotnetdevni
      @dotnetdevni Před 8 měsíci

      did u ever raise it as an issue

    • @90sRock131
      @90sRock131 Před 7 měsíci

      literal days huh? As opposed to losing illiteral days? The days had to be literal for you to lose them?

    • @Neme112
      @Neme112 Před 4 měsíci

      Why don't they just fix the bug in the designer that's causing the coordinates and sizes to change, instead of running the designer as DPI unaware as a workaround? This is such an ugly hack (and literally ugly because of the blurriness).

  • @DD-jz3wn
    @DD-jz3wn Před 8 měsíci +12

    Love Winforms!

  • @cheebadigga4092
    @cheebadigga4092 Před 8 měsíci +5

    Thank you! Default font and DPI unaware mode is exactly what I was missing.

  • @anm3037
    @anm3037 Před 8 měsíci +9

    This is the best program of the NET Conf 2023 … thanks. Is dark mode possible in WinForm now?

  • @jd31068
    @jd31068 Před 6 měsíci +1

    Thanks for keeping these alive. VB! VB! VB! ❤

  • @volante3005
    @volante3005 Před 6 měsíci

    Grazie per supportare ed evolvere Winforms e WPF. Per lo sviluppo su Windows rimangono insostituibili. ❤ Aspettiamo su Winforms che si possa effettuare il designer con DPI elevati, e che si possa completare il pieno supporto su DPI elevati su Windows. 🎉

  • @cernunox
    @cernunox Před 8 měsíci +1

    Is nice to see WinForms getting some love!

  • @roquemocan
    @roquemocan Před 8 měsíci +5

    WinForms is the FASTEST way to do a Line of Business application (maybe not the prettiest, granted)

  • @Tolg
    @Tolg Před 5 měsíci

    Very excited about this!

  • @michaelkhalsa
    @michaelkhalsa Před 8 měsíci +2

    Thank you! I am really looking forward to trying the dpi unaware feature, as this has always been a pain. Still in net 4.8, but this inspires me to migrate.

    • @90sRock131
      @90sRock131 Před 7 měsíci

      @@AaricAaiden What the hell you talking about? What was blurry? He said nothing about anything being blurry, not to mention we're already checking out the channel, otherwise we wouldn't be able to comment.

  • @acodersjourney
    @acodersjourney Před 8 měsíci +2

    Kudos for your hard work. Your channel is top-notch.

  • @jose-sebastian-garcia
    @jose-sebastian-garcia Před 8 měsíci +7

    Lo ideal para mi sería winforms con los features de wpf, no quiero escribir xml, quiero ubicar los controles donde quiero, ajustarlos bien, dar esquinas redondeadas, animaciones etc... pero en la estructura de winforms que es más amigable.

  • @vm123
    @vm123 Před 8 měsíci +2

    Loving winforms

  • @MichealColhoun
    @MichealColhoun Před 8 měsíci +5

    That dpi unaware setting is a big deal. It was such a pain.

  • @Cheesyonmytoasty
    @Cheesyonmytoasty Před 26 dny

    Winforms GUI is awesome, so glad we've gone full circle from the other clunky UI's

  • @ecblanco
    @ecblanco Před 8 měsíci

    24:47 - I needed this 10+ years ago.

  • @user-yb8ck6cf2m
    @user-yb8ck6cf2m Před 8 měsíci +2

    WinForms (heart).

  • @samirassaf3987
    @samirassaf3987 Před 8 měsíci +2

    I ❤ winforms

  • @valera924
    @valera924 Před 8 měsíci +3

    Wow! It's still alive

  • @wilsonmori949
    @wilsonmori949 Před 8 měsíci +2

    😍

  • @user-pc9mp6kv4h
    @user-pc9mp6kv4h Před 8 měsíci +7

    What about WPF??

    • @ecblanco
      @ecblanco Před 8 měsíci

      24:47 is basically putting WPF on maintainance mode...

    • @kiereluurs1243
      @kiereluurs1243 Před 8 měsíci

      GIY.

    • @jongeduard
      @jongeduard Před 8 měsíci +2

      I really think it was about time that WinForms got the extra attention this year, all just really long awaited improvements and fixes.
      And yes WPF of course has issues too (I believe it, since everything always needs more things) but is really mature and already always got tons of love. It was even loved so much that all kinds of future GUI frameworks where based on XAML too. :)
      Personally, if things will eventually end up in such a way that WPF eventually gets no longer development, you probably like to take a look at Avalonia, which is in many ways based on WPF, but cross platform and more advanced. It's also not so difficulet to port WPF projects to Avalonia too.
      And it's that it's not developed by Microsoft only, but if you ask me Avalonia is technically a lot better designed than the MAUI project in many ways, building a lot of things up from low level instead of trying to build on top of all kinds of existing frameworks, making it a lot more lightweight and performant.

    • @user-pc9mp6kv4h
      @user-pc9mp6kv4h Před 8 měsíci

      @@jongeduard Interesting avalonia i'll try it, i have projects using materialdesign may is possible to use this library in avalonia?? may you can recomend me some tutorials to start on avalonia? i'm really interested :D

    • @jongeduard
      @jongeduard Před 8 měsíci

      @@user-pc9mp6kv4h Personally I have never used it yet, but googling for it immediately brings me to Material.Avalonia project and related information. And it's also mentioned on the official Avalonia UI website under the category Themes under Styling.
      You really want to look at this website anyway, when you indeed consider using it.
      There is a special chapter about migrating from WPF and the differences with Avalonia. That's already really great in my opinion.

  • @somke
    @somke Před 8 měsíci +1

    I wonder about that little demo shown in the end when bindings was explained that showed dark mode, specially the listview with dark headers, thats weird, how they did it

    • @klausloffelmann9833
      @klausloffelmann9833 Před 8 měsíci +3

      It was a DataGridView, not a ListView. And there is actually no magic behind it. You can do most of the coloring requirements for dark mode today with the standard WinForms tools. The only area, where it is REALLY difficult to get it proper is the theming of the scroll bars. But...we are working on finding solutions for that (without any promises on timelines, but _with_ the promises of our full dedication!)

    • @somke
      @somke Před 8 měsíci

      @@klausloffelmann9833 Ah, it was a DGV, that explains it. Good to know there will be some light at some point. Keep it up! Thanks for the reply

  • @enriquebenedicto9429
    @enriquebenedicto9429 Před 8 měsíci

    Somewhat unrelated to the main topic. But what view is she using @ 5:45 in order to Drag & Drop code from the left portion of what seems to be the Toolbox, and into the code? I created a WinForms project and couldn't get that to show up.
    Thanks.

    • @enriquebenedicto9429
      @enriquebenedicto9429 Před 8 měsíci +1

      ok. Looks like it's just some custom scripts or something, where she can drag the her own code into anything.

    • @merriemcgaw4820
      @merriemcgaw4820 Před 8 měsíci +2

      I didn’t do anything special, I had my ToolBox open when I was in code view, and then literally dragged my code onto the ToolBox. I then renamed a couple of them but that’s all! You can always keep snippets on your ToolBox.

    • @enriquebenedicto9429
      @enriquebenedicto9429 Před 8 měsíci +2

      @@merriemcgaw4820 I was unaware of that little trick. Very cool.
      This is why one learns so much more when working in an environment where everyone around you is a programmer.
      When you work in isolation, the next best thing is to watch videos off people just programming. And, sometimes, you just pick up little off-topic things like that.
      Thanks for the info!

  • @90sRock131
    @90sRock131 Před 7 měsíci

    Having an issue with this. The picture boxes look fine on one machine but they look stretched vertically on another machine. I have the DPI unaware option set properly.

    • @merriemcgaw4820
      @merriemcgaw4820 Před 6 měsíci +1

      Please file VS Feedback item - we can interact directly with you there and help find a solution to your problem.

  • @dotnetdevni
    @dotnetdevni Před 8 měsíci +3

    What would help is more material design considerations to make the apps look more windows 11 folder dialog is good but the rest of app still looks dated

    • @90sRock131
      @90sRock131 Před 7 měsíci +1

      I farted.

    • @Neme112
      @Neme112 Před 4 měsíci

      This isn't WPF. WinForms isn't rendering the buttons and controls on its own. It can't just change the style. It's using the native Windows controls. It's Windows itself that needs to update the styles of controls to match Windows 11 style. But they probably won't because they don't care about the inconsistent styles.

  • @stringyGG
    @stringyGG Před 8 měsíci +3

    For the love of god I hope the designer performance is better this update.

    • @mariuskoen1
      @mariuskoen1 Před 8 měsíci

      Agree, form design load long even with only one button and toolbox also sometimes empty until you restart visual studio

    • @klausloffelmann9833
      @klausloffelmann9833 Před 8 měsíci +3

      @@mariuskoen1The first Form will always need longer to show up compared to the In-Proc-Designer, since the Server Process needs to be brought up. But: Yes, there is room for improvement. And it's super-high on our priority issue list.

    • @stringyGG
      @stringyGG Před 8 měsíci

      @@mariuskoen1 I just 'Repair' the tool box and it works again.
      I have contemplated quitting my job multiple times trying to use the designer since moving to core. At this point I'd rather find another job that doesn't use WinForms. Each property change on an item, saving from the designer, loading the designers just takes 10s of seconds.
      I usually just end up editing the x.designer.cs file for property changes.

  • @SIR_Studios786
    @SIR_Studios786 Před 8 měsíci

    Need good list of value (LOV) control, like oracle forms, it still missing in win forms, we always have to custom made it ...

  • @S3Kglitches
    @S3Kglitches Před 8 měsíci

    What are Snap layouts?

  • @playtheblues
    @playtheblues Před 8 měsíci +4

    urgh...seeing those Vista-styled form buttons (min/max/close) in design mode makes me sad...

    • @klausloffelmann9833
      @klausloffelmann9833 Před 8 měsíci +4

      Me, too. Unfortunately, that's a Windows issue and not a WinForms issue. When you parent a whole Window as a child window to another Window, then it renders the title bar and the system controls in the style of an MDI Window. And that API in Windows 10, 11 (contrast to Windows Server, btw), never got updated. Now, theoretically, we could take over the painting of the non-client area of a Window, but that's difficult, because these days, that rendering is done by the Desktop Windows Manager, and it's really difficult to get that synced correctly. There are other ways, and we're thinking about doing them - but then again, there are other WinForms issues more pressuring, so...yeah. But I feel you. I really do. I hate it, too.

    • @playtheblues
      @playtheblues Před 7 měsíci

      @@klausloffelmann9833 Thanks for the reply. I would love to see WinForms improve the MDI child forms, and potentially have built-in support for tabbing child forms in the parent window - that would be such a great improvement. In the short term would be great to update the styling of child-form control buttons to at least style in the modern way.

  • @nelsonazolukwamprojects
    @nelsonazolukwamprojects Před 7 měsíci +1

    What is the support for Windows 7 and 10 like? Still works on both?

    • @AaricAaiden
      @AaricAaiden Před 7 měsíci

      Hi, check out the channel to watch amazing tutorials on windows forms customization. thanks, me later.

  • @larts
    @larts Před 8 měsíci

    i want the visual studio design!!!

    • @merriemcgaw4820
      @merriemcgaw4820 Před 8 měsíci +1

      Check out the preview features in VS 2022 17.9 Preview 1. There’s a preview feature for “Experimental Control…” (or similar) and that gives you access to new themes!

    • @larts
      @larts Před 8 měsíci

      @@merriemcgaw4820 oooohhh

  • @cliffnote
    @cliffnote Před 5 měsíci +1

    As a WinForms developer since the beginning, I must say I'm very disappointed that the "very exciting" improvements is the ability to inherit a default font!! How about upgrading the look and feel a little?? I mean we're still stuck with square boxes, buttons, dialogs, etc. on every control! Unless you spend a bunch of money on 3rd Party designers, WinForm apps still look they were created in the 90's!! And when has any improvements in the look and options of the DataGridView been updated?? At least MS is not ditching it, I guess that's a big plus!

  • @benny-shen
    @benny-shen Před 8 měsíci +3

    I am stuck at .net framework, since .net 8 doesn't support windows 7

    • @thechrisgate
      @thechrisgate Před 8 měsíci

      no system u should use window bcoz it is easy to hack

    • @rotgertesla
      @rotgertesla Před 8 měsíci

      Interesting, I wasnt aware of that

  • @GuildOfCalamity
    @GuildOfCalamity Před 8 měsíci +1

    Now all you need to do is add a visual designer to WinUI3.... not sure why you took it away?
    I just created a new WinForms project using .NET8 and the controls still look like Windows98... does anyone know when they will release improved control styles?

    • @merriemcgaw4820
      @merriemcgaw4820 Před 8 měsíci

      Our default templates enable Visual Styles so that it looks to the current common controls version. Did you use a WinForms template? C# or VB?

    • @klausloffelmann9833
      @klausloffelmann9833 Před 8 měsíci +1

      In addition to what Merrie wrote: WinUI never had a Visual Designer, and will most likely not get it. And the same paradigm that WinForms uses for its design approach also doesn't really apply to WinUI, cause it's XAML based (although, that is an ongoing debate). In a distant future, I might see a XamlIslandHost in WinForms, though, when we would see a further growing demand from the community for that.

  • @user-pc9mp6kv4h
    @user-pc9mp6kv4h Před 8 měsíci +1

    How yo make My visual studio looks like they vídeo?

    • @tahareeh
      @tahareeh Před 8 měsíci

      install the preview version of visual studio and enable experimental features

    • @user-pc9mp6kv4h
      @user-pc9mp6kv4h Před 8 měsíci +2

      @@tahareeh thanks You very much :D. It looks better than they old one

    • @tahareeh
      @tahareeh Před 8 měsíci

      @@user-pc9mp6kv4h much better yes, you welcome

  • @tudothanh0402
    @tudothanh0402 Před 8 měsíci

    How about WPF

  • @flove7808
    @flove7808 Před 8 měsíci

    Comic Sans is not dead. 🎉

    • @merriemcgaw4820
      @merriemcgaw4820 Před 8 měsíci +2

      Comic Sans will never die! Just like WinForms😉

  • @razakalsharafy4708
    @razakalsharafy4708 Před 8 měsíci +2

    Ahhh .... I really miss Borland's Turbo Pascal/C++ Builder or Clipper. Maybe going to Delphi will be my salvation. I keep feeling MS is not serious about programming tools.

    • @Selbstzensur
      @Selbstzensur Před 7 měsíci +1

      I came from delphi. I'm happy to be in C# Land. From my pov delphi as a programming language is years behind c#.

    • @razakalsharafy4708
      @razakalsharafy4708 Před 7 měsíci +1

      @@Selbstzensur Could u give more details on how C# is ahead of Delphi? I recall Turbo Pascal was ahead of MS Compilers (C++/Basic/...etc.) .
      Let me point out one issue. We used to program in Win Framework with drag-n-drop interface after VB6 was dumped and that was dumped too. Now we have to move to Core/MAUI with no UI. Where is the advance on that? Business yes, but not in favor of developer.
      Compilers suppose to be tools to help develop App but we spend lot of time learning the tools/making libraries and after a while its dumped for something new.
      The next logical step should be App Builder not another language or some enhancements.

    • @Selbstzensur
      @Selbstzensur Před 7 měsíci

      @@razakalsharafy4708 from my point of view, i worked at the last point with delphi 10.2, object pascal as a language is not on developing like like java or c# from the language aspect itself. Their were no functional programming aspects. The adventage of Core/Maui is from my pov the XAML integration and the use of the MVVM Design pattern, so that you are able as a developer to have less cohesion and write tests. But if my boss would tell me go to core maui, i would tell him, no, we should use avolonia, because of the skia renderer, so that we can get a deterministic render expierience on every plattform.

  • @mariuskoen1
    @mariuskoen1 Před 8 měsíci

    I still love winforms, I got quite sad when you guys mentioned you were mothballing it 😞

    • @klausloffelmann9833
      @klausloffelmann9833 Před 8 měsíci +2

      I think we never actually said that! :-)

    • @mariuskoen1
      @mariuskoen1 Před 8 měsíci +2

      @@klausloffelmann9833 then I'm happy again ☺️

  • @ArmandoAlejandro2014
    @ArmandoAlejandro2014 Před 8 měsíci +4

    Winforms development is still around?

    • @dirkschannel5817
      @dirkschannel5817 Před 8 měsíci +6

      They are everywhere. Like WebForms the silent majority that works in enterprise legacy code. If MS doesn't kill it, Winforms will be around in 20 years

    • @roquemocan
      @roquemocan Před 8 měsíci +2

      If I want to develop a system fast, and not have all the issues of a web page (maintaining state, etc.), Winforms, is, for me, the way to go

    • @rotgertesla
      @rotgertesla Před 8 měsíci +5

      All my new project are with winforms

    • @kirbyman1kanden7pf
      @kirbyman1kanden7pf Před 2 měsíci

      ​@@rotgerteslamine too

  • @candinhosilveira2047
    @candinhosilveira2047 Před 8 měsíci

    Whats'new for WPF?

    • @199772AVVI
      @199772AVVI Před 8 měsíci +1

      Like... Nothing :D WPF is basically dead for MS :(
      WPF. Supports OpenFolderDialog and Enabled HW Acceleration in RDP

    • @S3Kglitches
      @S3Kglitches Před 8 měsíci +3

      WPF has been outsourced to India to a team which doesn't understand it

    • @thechrisgate
      @thechrisgate Před 8 měsíci +1

      @@S3Kglitches lol

    • @kiereluurs1243
      @kiereluurs1243 Před 8 měsíci

      GIY.

  • @Neme112
    @Neme112 Před 4 měsíci

    Why don't you just fix the bug in the designer that's causing the coordinates and sizes to change, instead of running the designer as DPI unaware as a workaround? This is such an ugly hack (and literally ugly because of the blurriness).