Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. WPF - why?!

WPF - why?!

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studiowpfwinformsquestion
45 Posts 27 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

    So I have to write a new extension for VS, which means I have to deal with WPF... DataGrid in this case... Why's that WPF, that came to life to replace the ugly WinForms, is so ugly?

    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #18

    Kornfeld Eliyahu Peter wrote:

    ugly WinForms

    I imagine the original design goals to include things like functionality, accessability, discoverabilty and consistency. Not "look sexy".

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

    1 Reply Last reply
    0
    • E Eric Lynch

      Agreed. The framework incorporates some really great ideas and then falls flat in the implementation. My biggest complaint (vs WinForm) is that the design UI completely sucks by comparison. In VS, with WinForm, everything is drag-and-drop / point-and-click. With WPF, I need to constantly resort to editing the XML. There is no reason it needs to be this way. They really need to either get a better UI team or give the team they already have time to fix it. The other problem is the (effective) lack of immediate-mode graphics. I understand that for line-of-business apps this makes perfect sense. However, they should support a fall-back for graphic intensive applications. Try drawing and re-drawing a few thousand lines. Performance is fine in WinForm, but its frustratingly slow in WPF...even when you take advantage of all the WPF performance tweaks. To solve this performance issue, we're left playing with 3rd party work-arounds...using writeable bitmaps. They work great. This means there is absolutely no reason, other than arrogance, that MS can't incorporate some of these concepts into WPF...in a better supported/more seamless fashion. Also, provide better support for WinForm-style docking. Yes, I understand the other layouts are far more flexible and worth learning. I took the time. I still find them less intuitive. So, why punish WinForm developers making the transition? Keep the cool new layouts and add better support for docking layouts as well. As it stands now, for me, WPF is an interesting toy for occasional play. I use it when I want some really flexible layouts...in line-of-business apps. Or, when a customer requests it. Or, when I play with UWP. Otherwise, I still use WinForm. Its a real shame. I'd prefer to move full time to WPF, to ease the wear-and-tear switching back and forth causes on my poor brain. Come on MS...finish what you started!

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #19

      Eric Lynch wrote:

      I need to constantly resort to editing the XML

      XAML - I was full time in WPF and have never used drag and drop to get controls on a view :^) I had forgotten how easy winforms UI layout is. Thankfully I have never been into graphics, purely LOB work and I still run up against performance issues.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

        Granted - I saw some very nice looking ones... But! If you put a DataGrid on a form and bind it to some data, plus add some buttons to each row (template)... It looks awful...

        "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #20

        Kornfeld Eliyahu Peter wrote:

        plus add some buttons to each row

        Ah thinking like a web developer, I cannot remember when I last had buttons on each row. My VM knows precisely what row is selected so all I need is the action directive, also double click is your friend.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

          Granted - I saw some very nice looking ones... But! If you put a DataGrid on a form and bind it to some data, plus add some buttons to each row (template)... It looks awful...

          "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

          J Offline
          J Offline
          Jacquers
          wrote on last edited by
          #21

          Yes, the default look isn't very nice - it takes a bit of effort to style the app, but webpages are like that as well. You can get WPF themes or third part controls that look nice out of the box.

          1 Reply Last reply
          0
          • D dandy72

            Jacquers wrote:

            you can make some really nice looking apps.

            ...if you're willing to allocate the resources to do it. Otherwise WPF apps can be made to look every bit as ugly as WinForms-based apps. If your focus is not on the UI, then WPF adds a lot of cost (in terms of learning overhead) with very little return, IMO.

            J Offline
            J Offline
            Jacquers
            wrote on last edited by
            #22

            Yes, the default look isn't very nice - it takes a bit of effort to style the app, but webpages are like that as well. You can get WPF themes or third part controls that look nice out of the box.

            1 Reply Last reply
            0
            • E Eric Lynch

              Agreed. The framework incorporates some really great ideas and then falls flat in the implementation. My biggest complaint (vs WinForm) is that the design UI completely sucks by comparison. In VS, with WinForm, everything is drag-and-drop / point-and-click. With WPF, I need to constantly resort to editing the XML. There is no reason it needs to be this way. They really need to either get a better UI team or give the team they already have time to fix it. The other problem is the (effective) lack of immediate-mode graphics. I understand that for line-of-business apps this makes perfect sense. However, they should support a fall-back for graphic intensive applications. Try drawing and re-drawing a few thousand lines. Performance is fine in WinForm, but its frustratingly slow in WPF...even when you take advantage of all the WPF performance tweaks. To solve this performance issue, we're left playing with 3rd party work-arounds...using writeable bitmaps. They work great. This means there is absolutely no reason, other than arrogance, that MS can't incorporate some of these concepts into WPF...in a better supported/more seamless fashion. Also, provide better support for WinForm-style docking. Yes, I understand the other layouts are far more flexible and worth learning. I took the time. I still find them less intuitive. So, why punish WinForm developers making the transition? Keep the cool new layouts and add better support for docking layouts as well. As it stands now, for me, WPF is an interesting toy for occasional play. I use it when I want some really flexible layouts...in line-of-business apps. Or, when a customer requests it. Or, when I play with UWP. Otherwise, I still use WinForm. Its a real shame. I'd prefer to move full time to WPF, to ease the wear-and-tear switching back and forth causes on my poor brain. Come on MS...finish what you started!

              A Offline
              A Offline
              AndyStephens
              wrote on last edited by
              #23

              I've never used the UI designer, and do everything in XAML. Even Blend still scares the hell out of me to this day, and I'm a proficient WPF/XAML developer. Writing XAML is no different to a web developer writing HTML - nobody uses drag'n'drop interfaces on that platform. Admittedly it's easier to see your changes by just pressing F5 in the open browser window, rather than have to run the app...

              D 1 Reply Last reply
              0
              • E Eric Lynch

                Agreed. The framework incorporates some really great ideas and then falls flat in the implementation. My biggest complaint (vs WinForm) is that the design UI completely sucks by comparison. In VS, with WinForm, everything is drag-and-drop / point-and-click. With WPF, I need to constantly resort to editing the XML. There is no reason it needs to be this way. They really need to either get a better UI team or give the team they already have time to fix it. The other problem is the (effective) lack of immediate-mode graphics. I understand that for line-of-business apps this makes perfect sense. However, they should support a fall-back for graphic intensive applications. Try drawing and re-drawing a few thousand lines. Performance is fine in WinForm, but its frustratingly slow in WPF...even when you take advantage of all the WPF performance tweaks. To solve this performance issue, we're left playing with 3rd party work-arounds...using writeable bitmaps. They work great. This means there is absolutely no reason, other than arrogance, that MS can't incorporate some of these concepts into WPF...in a better supported/more seamless fashion. Also, provide better support for WinForm-style docking. Yes, I understand the other layouts are far more flexible and worth learning. I took the time. I still find them less intuitive. So, why punish WinForm developers making the transition? Keep the cool new layouts and add better support for docking layouts as well. As it stands now, for me, WPF is an interesting toy for occasional play. I use it when I want some really flexible layouts...in line-of-business apps. Or, when a customer requests it. Or, when I play with UWP. Otherwise, I still use WinForm. Its a real shame. I'd prefer to move full time to WPF, to ease the wear-and-tear switching back and forth causes on my poor brain. Come on MS...finish what you started!

                E Offline
                E Offline
                Eric R Johansson
                wrote on last edited by
                #24

                I'm currently working on a graphics intensive application as well. Redrawing using WPF took about 7 seconds. We're currently using a SharpDX based renderer instead and when we need to update ALL the primitives and redraw it takes about 25ms. WPF is based on Dx9(and needs to be updated to 12 tbh) so it shouldn't need to be this freaking slow!

                E 1 Reply Last reply
                0
                • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                  So I have to write a new extension for VS, which means I have to deal with WPF... DataGrid in this case... Why's that WPF, that came to life to replace the ugly WinForms, is so ugly?

                  "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                  J Offline
                  J Offline
                  John Torjo
                  wrote on last edited by
                  #25

                  The (wpf) UI designer is definitely horrible. And wpf does have a steeeep learning curve (trust me, 'been there). The funny thing is, to fully appreciate it, you need to use it (and actually compare it to Winforms) - and while at the beginning, you'll curse a lot (I did :D), when you start to "get" it, you'll use it for any non-trivial UI. The more you'll delve into it, the more you'll love it (granted, you'll still hate the UI designer :D). Two easy examples: animations, pixel shaders (i.e., Effects). When you actually start understanding how layout works in wpf, you'll be able to create controls that can simply blow your mind (which would be really really hard to implement in Winforms)! Best, John P.S. If (just if :D) you want to learn WPF, I recommend "WPF 4.5 Unleashed" - a lot of things don't seem to make any sense in WPF, until explained. Again, been there :)

                  -- Phot-Awe - Find the Photos you Love - FAST!

                  G F E 3 Replies Last reply
                  0
                  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                    So I have to write a new extension for VS, which means I have to deal with WPF... DataGrid in this case... Why's that WPF, that came to life to replace the ugly WinForms, is so ugly?

                    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                    J Offline
                    J Offline
                    Johnny J
                    wrote on last edited by
                    #26

                    Winforms isn't ugly in my opinion. WPF is, though! :doh:

                    Anything that is unrelated to elephants is irrelephant
                    Anonymous
                    -----
                    The problem with quotes on the internet is that you can never tell if they're genuine
                    Winston Churchill, 1944
                    -----
                    Never argue with a fool. Onlookers may not be able to tell the difference.
                    Mark Twain

                    F 1 Reply Last reply
                    0
                    • J John Torjo

                      The (wpf) UI designer is definitely horrible. And wpf does have a steeeep learning curve (trust me, 'been there). The funny thing is, to fully appreciate it, you need to use it (and actually compare it to Winforms) - and while at the beginning, you'll curse a lot (I did :D), when you start to "get" it, you'll use it for any non-trivial UI. The more you'll delve into it, the more you'll love it (granted, you'll still hate the UI designer :D). Two easy examples: animations, pixel shaders (i.e., Effects). When you actually start understanding how layout works in wpf, you'll be able to create controls that can simply blow your mind (which would be really really hard to implement in Winforms)! Best, John P.S. If (just if :D) you want to learn WPF, I recommend "WPF 4.5 Unleashed" - a lot of things don't seem to make any sense in WPF, until explained. Again, been there :)

                      -- Phot-Awe - Find the Photos you Love - FAST!

                      G Offline
                      G Offline
                      Gary Wheeler
                      wrote on last edited by
                      #27

                      Agreed, on all counts. I've been using WPF for ten years for UI on our products. Once you 'get it', you can do wonderfully useful things in your UI that would be next to impossible without it. And yes, the WPF designer is worthless. Between constant crashes and its incessant need to insert absolute constants everywhere, it's far easier to hand-code XAML.

                      Software Zen: delete this;

                      J 1 Reply Last reply
                      0
                      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                        So I have to write a new extension for VS, which means I have to deal with WPF... DataGrid in this case... Why's that WPF, that came to life to replace the ugly WinForms, is so ugly?

                        "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                        Richard DeemingR Online
                        Richard DeemingR Online
                        Richard Deeming
                        wrote on last edited by
                        #28

                        Maybe you should be using this[^] for your UI work. :-D


                        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                        M 1 Reply Last reply
                        0
                        • A AndyStephens

                          I've never used the UI designer, and do everything in XAML. Even Blend still scares the hell out of me to this day, and I'm a proficient WPF/XAML developer. Writing XAML is no different to a web developer writing HTML - nobody uses drag'n'drop interfaces on that platform. Admittedly it's easier to see your changes by just pressing F5 in the open browser window, rather than have to run the app...

                          D Offline
                          D Offline
                          Dan Neely
                          wrote on last edited by
                          #29

                          I haven't done anything in WPF for a while so I'm not sure if it works the same there, but while starting my 1st UWP app a few months ago I discovered that I could live edit the xaml while the app was running and have UI changes show up immediately in the app. On the plus side, no need for that pesky Alt-F-S, Alt-Tab, F5 to see changes; on the minus at times VS would interrupt the live editing to complain that a half typed bit of markup was generating a parse error.

                          Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                          1 Reply Last reply
                          0
                          • Richard DeemingR Richard Deeming

                            Maybe you should be using this[^] for your UI work. :-D


                            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                            M Offline
                            M Offline
                            Mark Shultz Iowa
                            wrote on last edited by
                            #30

                            I've been looking for something like this!

                            1 Reply Last reply
                            0
                            • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                              So I have to write a new extension for VS, which means I have to deal with WPF... DataGrid in this case... Why's that WPF, that came to life to replace the ugly WinForms, is so ugly?

                              "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                              V Offline
                              V Offline
                              VEMS
                              wrote on last edited by
                              #31

                              Thanks to all for not mentioning 'MVVM' ... wow ... rare.

                              1 Reply Last reply
                              0
                              • J John Torjo

                                The (wpf) UI designer is definitely horrible. And wpf does have a steeeep learning curve (trust me, 'been there). The funny thing is, to fully appreciate it, you need to use it (and actually compare it to Winforms) - and while at the beginning, you'll curse a lot (I did :D), when you start to "get" it, you'll use it for any non-trivial UI. The more you'll delve into it, the more you'll love it (granted, you'll still hate the UI designer :D). Two easy examples: animations, pixel shaders (i.e., Effects). When you actually start understanding how layout works in wpf, you'll be able to create controls that can simply blow your mind (which would be really really hard to implement in Winforms)! Best, John P.S. If (just if :D) you want to learn WPF, I recommend "WPF 4.5 Unleashed" - a lot of things don't seem to make any sense in WPF, until explained. Again, been there :)

                                -- Phot-Awe - Find the Photos you Love - FAST!

                                F Offline
                                F Offline
                                Foothill
                                wrote on last edited by
                                #32

                                I agree that the learning curve is quite steep and there still are things that you cannot do in the designer or XAML (or at least not intuitively). I have, from time to time, built entire controls with children in the code so I don't have XAML documents 1000+ lines long and nested enough to require a lot of horizontal scrolling. However, I still prefer it to WinForms.

                                if (Object.DividedByZero == true) { Universe.Implode(); }

                                1 Reply Last reply
                                0
                                • J Johnny J

                                  Winforms isn't ugly in my opinion. WPF is, though! :doh:

                                  Anything that is unrelated to elephants is irrelephant
                                  Anonymous
                                  -----
                                  The problem with quotes on the internet is that you can never tell if they're genuine
                                  Winston Churchill, 1944
                                  -----
                                  Never argue with a fool. Onlookers may not be able to tell the difference.
                                  Mark Twain

                                  F Offline
                                  F Offline
                                  Forogar
                                  wrote on last edited by
                                  #33

                                  I concur. I tried, really tried, to use WPF but it produced such an ugly and clunky UI that i implemented what I wanted in WinForms - quickly and easily with very smooth and beautiful results - and a few fancy effects while I was at it - also easily implemented and debugged as necessary. Bring back Winforms! I was about to say "All is Forgiven!" but there is nothing really to forgive. I think the "Winforms is Ugly" came from Microsoft Marketing Bozos to enable adoption of the terrible WPF!

                                  - I would love to change the world, but they won’t give me the source code.

                                  1 Reply Last reply
                                  0
                                  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                    So I have to write a new extension for VS, which means I have to deal with WPF... DataGrid in this case... Why's that WPF, that came to life to replace the ugly WinForms, is so ugly?

                                    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                                    M Offline
                                    M Offline
                                    Matt McGuire
                                    wrote on last edited by
                                    #34

                                    WPF compared to winforms feels half baked and inconsistent; documentation is, poor and I spend more time searching the web on how to do something so simple in winforms (like a checked listbox) that I'm not enjoying development anymore. UWP you can at least use win2d and get a graphics object like the GDI+ in winforms and draw natively when you need. I'm not saying winforms is perfect, and not everything in WPF is bad, I can just do way more work in a single day with winforms than WPF. It feels like the ones who created xaml looked at the web and tried to copy how that worked, to bring web devs to the desktop.

                                    J 1 Reply Last reply
                                    0
                                    • J John Torjo

                                      The (wpf) UI designer is definitely horrible. And wpf does have a steeeep learning curve (trust me, 'been there). The funny thing is, to fully appreciate it, you need to use it (and actually compare it to Winforms) - and while at the beginning, you'll curse a lot (I did :D), when you start to "get" it, you'll use it for any non-trivial UI. The more you'll delve into it, the more you'll love it (granted, you'll still hate the UI designer :D). Two easy examples: animations, pixel shaders (i.e., Effects). When you actually start understanding how layout works in wpf, you'll be able to create controls that can simply blow your mind (which would be really really hard to implement in Winforms)! Best, John P.S. If (just if :D) you want to learn WPF, I recommend "WPF 4.5 Unleashed" - a lot of things don't seem to make any sense in WPF, until explained. Again, been there :)

                                      -- Phot-Awe - Find the Photos you Love - FAST!

                                      E Offline
                                      E Offline
                                      Eytukan
                                      wrote on last edited by
                                      #35

                                      I'm sure it's Very true. Because all the experienced WPF developers say the same.

                                      Full Reset

                                      1 Reply Last reply
                                      0
                                      • E Eric R Johansson

                                        I'm currently working on a graphics intensive application as well. Redrawing using WPF took about 7 seconds. We're currently using a SharpDX based renderer instead and when we need to update ALL the primitives and redraw it takes about 25ms. WPF is based on Dx9(and needs to be updated to 12 tbh) so it shouldn't need to be this freaking slow!

                                        E Offline
                                        E Offline
                                        Eric Lynch
                                        wrote on last edited by
                                        #36

                                        Yeah, there is no reason it should be soooo painfully slow. Its significantly worse than any other presentation framework I've used. The excuse that its retained-mode vs immediate-mode doesn't really cut it. It does not seem to be a DX issue. I've written code directly accessing older versions of DX...without similar performance problems. Somebody at MS needs to meter the WPF code and find its major malfunction. Instead, all you see on the boards are apologists telling everyone they're simply "doing it wrong". This advice isn't entirely incorrect...people really do some dumb stuff. However, this advice doesn't explain away all of WPF's performance problems. They're very real...and not going away until someone at MS fixes them. Regrettably, there seems to be absolutely zero movement on that front.

                                        1 Reply Last reply
                                        0
                                        • E Eric Lynch

                                          Agreed. The framework incorporates some really great ideas and then falls flat in the implementation. My biggest complaint (vs WinForm) is that the design UI completely sucks by comparison. In VS, with WinForm, everything is drag-and-drop / point-and-click. With WPF, I need to constantly resort to editing the XML. There is no reason it needs to be this way. They really need to either get a better UI team or give the team they already have time to fix it. The other problem is the (effective) lack of immediate-mode graphics. I understand that for line-of-business apps this makes perfect sense. However, they should support a fall-back for graphic intensive applications. Try drawing and re-drawing a few thousand lines. Performance is fine in WinForm, but its frustratingly slow in WPF...even when you take advantage of all the WPF performance tweaks. To solve this performance issue, we're left playing with 3rd party work-arounds...using writeable bitmaps. They work great. This means there is absolutely no reason, other than arrogance, that MS can't incorporate some of these concepts into WPF...in a better supported/more seamless fashion. Also, provide better support for WinForm-style docking. Yes, I understand the other layouts are far more flexible and worth learning. I took the time. I still find them less intuitive. So, why punish WinForm developers making the transition? Keep the cool new layouts and add better support for docking layouts as well. As it stands now, for me, WPF is an interesting toy for occasional play. I use it when I want some really flexible layouts...in line-of-business apps. Or, when a customer requests it. Or, when I play with UWP. Otherwise, I still use WinForm. Its a real shame. I'd prefer to move full time to WPF, to ease the wear-and-tear switching back and forth causes on my poor brain. Come on MS...finish what you started!

                                          J Offline
                                          J Offline
                                          James Lonero
                                          wrote on last edited by
                                          #37

                                          "

                                          Quote:

                                          The framework incorporates some really great ideas and then falls flat in the implementation.

                                          I agree, to some extent. WPF uses the GPU instead of the CPU as WinForms does so rendering should be faster. But, in my case, I started with WinForms and before that MFC. Drag and dropping the controls was much easier and I spent less time on coding my window and more time on my application. There is a lot techniques you can do in WPF that you cannot do in WinForms to make a flashy presentation with great graphics, but WinForms is good for basic applications. I have found that I can get flashy usable controls from 3rd parties like Infragistics. To me, drag and drop is much easier whereas, in the project I'm currently working on, WPF is the workhorse for us, since we keep adding more and more to the controls and sub-controls. Xaml allows us to finely control what we show. If we were to do it programmatically in C#, then it would be similar to QT.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups