What's new with WinForms | .NET Conf 2023

Поделиться
HTML-код
  • Опубликовано: 2 июн 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
  • НаукаНаука

Комментарии • 110

  • @jcddcjjcdnz
    @jcddcjjcdnz 6 месяцев назад +41

    Love the attention Winforms is getting.

  • @JakobSagatowski
    @JakobSagatowski 6 месяцев назад +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 6 месяцев назад +16

    Quite happy winforms is not dead.
    Love this tech

  • @TheExtinctSpecie
    @TheExtinctSpecie 6 месяцев назад +27

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

  • @josefromspace
    @josefromspace 6 месяцев назад +15

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

  • @blackeducationacademy
    @blackeducationacademy 6 месяцев назад +11

    WinForms in 2023 yeeees🎉🎉🎉🎉

  • @kirbyman1kanden7pf
    @kirbyman1kanden7pf 9 дней назад +1

    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.

  • @dirkschannel5817
    @dirkschannel5817 6 месяцев назад +9

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

  • @Malekzadeh88
    @Malekzadeh88 5 месяцев назад +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

  • @MrFEMGM
    @MrFEMGM 6 месяцев назад +3

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

  • @anm3037
    @anm3037 6 месяцев назад +9

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

  • @rotgertesla
    @rotgertesla 6 месяцев назад +12

    still using winforms in my new projects

  • @DanielMendozaDev
    @DanielMendozaDev 6 месяцев назад +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 6 месяцев назад

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

    • @klausloffelmann9833
      @klausloffelmann9833 6 месяцев назад

      @@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 6 месяцев назад

      did u ever raise it as an issue

    • @90sRock131
      @90sRock131 5 месяцев назад

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

    • @Neme112
      @Neme112 2 месяца назад

      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).

  • @cheebadigga4092
    @cheebadigga4092 6 месяцев назад +5

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

  • @randompep
    @randompep 6 месяцев назад +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 🙂

  • @DD-jz3wn
    @DD-jz3wn 6 месяцев назад +12

    Love Winforms!

  • @volante3005
    @volante3005 4 месяца назад

    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. 🎉

  • @jd31068
    @jd31068 4 месяца назад +1

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

  • @roquemocan
    @roquemocan 6 месяцев назад +5

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

  • @cernunox
    @cernunox 6 месяцев назад +1

    Is nice to see WinForms getting some love!

  • @jose-sebastian-garcia
    @jose-sebastian-garcia 6 месяцев назад +6

    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.

  • @acodersjourney
    @acodersjourney 6 месяцев назад +2

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

  • @Tolg
    @Tolg 3 месяца назад

    Very excited about this!

  • @MichealColhoun
    @MichealColhoun 6 месяцев назад +5

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

  • @michaelkhalsa
    @michaelkhalsa 6 месяцев назад +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 5 месяцев назад

      @@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.

  • @vm123
    @vm123 6 месяцев назад +2

    Loving winforms

  • @ecblanco
    @ecblanco 6 месяцев назад

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

  • @user-yb8ck6cf2m
    @user-yb8ck6cf2m 6 месяцев назад +2

    WinForms (heart).

  • @enriquebenedicto9429
    @enriquebenedicto9429 6 месяцев назад

    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 6 месяцев назад +1

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

    • @merriemcgaw4820
      @merriemcgaw4820 6 месяцев назад +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 6 месяцев назад +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!

  • @valera924
    @valera924 6 месяцев назад +3

    Wow! It's still alive

  • @samirassaf3987
    @samirassaf3987 6 месяцев назад +2

    I ❤ winforms

  • @90sRock131
    @90sRock131 5 месяцев назад

    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 5 месяцев назад +1

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

  • @somke
    @somke 6 месяцев назад +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 6 месяцев назад +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 6 месяцев назад

      @@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

  • @S3Kglitches
    @S3Kglitches 6 месяцев назад

    What are Snap layouts?

  • @SIR_Studios786
    @SIR_Studios786 6 месяцев назад

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

  • @nelsonazolukwam9250
    @nelsonazolukwam9250 6 месяцев назад +1

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

    • @AaricAaiden
      @AaricAaiden 5 месяцев назад

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

  • @dotnetdevni
    @dotnetdevni 6 месяцев назад +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 5 месяцев назад +1

      I farted.

    • @Neme112
      @Neme112 2 месяца назад

      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.

  • @wilsonmori949
    @wilsonmori949 6 месяцев назад +2

    😍

  • @benny-shen
    @benny-shen 6 месяцев назад +3

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

    • @thechrisgate
      @thechrisgate 6 месяцев назад

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

    • @rotgertesla
      @rotgertesla 6 месяцев назад

      Interesting, I wasnt aware of that

  • @stringyGG
    @stringyGG 6 месяцев назад +3

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

    • @mariuskoen1
      @mariuskoen1 6 месяцев назад

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

    • @klausloffelmann9833
      @klausloffelmann9833 6 месяцев назад +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 6 месяцев назад

      @@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.

  • @user-pc9mp6kv4h
    @user-pc9mp6kv4h 6 месяцев назад +7

    What about WPF??

    • @ecblanco
      @ecblanco 6 месяцев назад

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

    • @kiereluurs1243
      @kiereluurs1243 6 месяцев назад

      GIY.

    • @jongeduard
      @jongeduard 6 месяцев назад +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 6 месяцев назад

      @@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 6 месяцев назад

      @@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.

  • @GuildOfCalamity
    @GuildOfCalamity 6 месяцев назад +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 6 месяцев назад

      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 6 месяцев назад +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.

  • @larts
    @larts 6 месяцев назад

    i want the visual studio design!!!

    • @merriemcgaw4820
      @merriemcgaw4820 6 месяцев назад +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 6 месяцев назад

      @@merriemcgaw4820 oooohhh

  • @user-pc9mp6kv4h
    @user-pc9mp6kv4h 6 месяцев назад +1

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

    • @tahareeh
      @tahareeh 6 месяцев назад

      install the preview version of visual studio and enable experimental features

    • @user-pc9mp6kv4h
      @user-pc9mp6kv4h 6 месяцев назад +2

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

    • @tahareeh
      @tahareeh 6 месяцев назад

      @@user-pc9mp6kv4h much better yes, you welcome

  • @tudothanh0402
    @tudothanh0402 6 месяцев назад

    How about WPF

  • @cliffnote
    @cliffnote 3 месяца назад +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!

  • @playtheblues
    @playtheblues 6 месяцев назад +4

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

    • @klausloffelmann9833
      @klausloffelmann9833 6 месяцев назад +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 6 месяцев назад

      @@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.

  • @candinhosilveira2047
    @candinhosilveira2047 6 месяцев назад

    Whats'new for WPF?

    • @199772AVVI
      @199772AVVI 6 месяцев назад +1

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

    • @S3Kglitches
      @S3Kglitches 6 месяцев назад +3

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

    • @thechrisgate
      @thechrisgate 6 месяцев назад +1

      @@S3Kglitches lol

    • @kiereluurs1243
      @kiereluurs1243 6 месяцев назад

      GIY.

  • @ArmandoAlejandro2014
    @ArmandoAlejandro2014 6 месяцев назад +4

    Winforms development is still around?

    • @dirkschannel5817
      @dirkschannel5817 6 месяцев назад +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 6 месяцев назад +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 6 месяцев назад +5

      All my new project are with winforms

    • @kirbyman1kanden7pf
      @kirbyman1kanden7pf 9 дней назад

      ​@@rotgerteslamine too

  • @flove7808
    @flove7808 6 месяцев назад

    Comic Sans is not dead. 🎉

    • @merriemcgaw4820
      @merriemcgaw4820 6 месяцев назад +2

      Comic Sans will never die! Just like WinForms😉

  • @razakalsharafy4708
    @razakalsharafy4708 6 месяцев назад +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 5 месяцев назад +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 5 месяцев назад +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 5 месяцев назад

      @@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 6 месяцев назад

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

    • @klausloffelmann9833
      @klausloffelmann9833 6 месяцев назад +2

      I think we never actually said that! :-)

    • @mariuskoen1
      @mariuskoen1 6 месяцев назад +2

      @@klausloffelmann9833 then I'm happy again ☺️

  • @Neme112
    @Neme112 2 месяца назад

    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).