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. General Programming
  3. C#
  4. C# Desktop Apps

C# Desktop Apps

Scheduled Pinned Locked Moved C#
questioncsharpwinforms
16 Posts 5 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.
  • M Marc Firth

    After slacking on the C# front for a year or two, I've decided to have another look. Previously I used C# for the web, but now I'm looking into creating desktop apps. And I'd like to use one of the latest technologies (to save me having to learn another one in a year's time...). I'd also particularly like to target Windows 7 - but also be able to make some apps for XP. My question is: Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other? I really don't have a clue, so I'm hoping for a nudge in the right direction! :) Cheers.:thumbsup:

    Neonlight

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #3

    Marc Firth wrote:

    Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other?

    That's a tricky question, and not one that's easy to answer. First of all, let's address a misconception - WinForms aren't going to go away anytime soon, so learning them isn't going to be wasted effort. You'll still be able to develop desktop applications in them for a long time to come. Now, saying that, I'd choose WPF over WinForms for a number of reasons. 1. While WinForms isn't going away, it's not going to be actively improved by MS, so you're stuck with what you get. 2. WPF makes it easier to create data bound applications. Rather than having to write lots of string myValue = txtName.Text; and txtName.Text = dr[dr.GetOrdinal("MyValue")].ToString(); code, you can use two way databinding in WPF to good effect. 3. It's easy to change the look and feel of WPF applications. 4. If you want to move over to Silverlight, it's based on WPF so the transition is a lot easier. 5. Microsoft is actively targetting improving WPF, and is starting to use it in its own applications. 6. The infrastructure underlying WPF is a whole lot more powerful.

    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

    My blog | My articles | MoXAML PowerToys | Onyx

    M 1 Reply Last reply
    0
    • M Marc Firth

      After slacking on the C# front for a year or two, I've decided to have another look. Previously I used C# for the web, but now I'm looking into creating desktop apps. And I'd like to use one of the latest technologies (to save me having to learn another one in a year's time...). I'd also particularly like to target Windows 7 - but also be able to make some apps for XP. My question is: Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other? I really don't have a clue, so I'm hoping for a nudge in the right direction! :) Cheers.:thumbsup:

      Neonlight

      N Offline
      N Offline
      Nouman Bhatti
      wrote on last edited by
      #4

      I think you should try both atleast for practice level. than you are in better position to decide your self

      1 Reply Last reply
      0
      • M Marc Firth

        After slacking on the C# front for a year or two, I've decided to have another look. Previously I used C# for the web, but now I'm looking into creating desktop apps. And I'd like to use one of the latest technologies (to save me having to learn another one in a year's time...). I'd also particularly like to target Windows 7 - but also be able to make some apps for XP. My question is: Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other? I really don't have a clue, so I'm hoping for a nudge in the right direction! :) Cheers.:thumbsup:

        Neonlight

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

        Well, I'd do winforms, because 1) the drag 'n drop editor does not suck 2) existing code will fit it better because everyone is used to it 3) text rendering is not blurry and headache-inducing 4) you're not writing an advert so why does it have to look flashy?

        M 1 Reply Last reply
        0
        • L Lost User

          Well, I'd do winforms, because 1) the drag 'n drop editor does not suck 2) existing code will fit it better because everyone is used to it 3) text rendering is not blurry and headache-inducing 4) you're not writing an advert so why does it have to look flashy?

          M Offline
          M Offline
          Marc Firth
          wrote on last edited by
          #6

          harold aptroot wrote:

          1. the drag 'n drop editor does not suck

          Do you mean the wysiwyg editor for creating the actual forms?

          Neonlight

          P 1 Reply Last reply
          0
          • P Pete OHanlon

            Marc Firth wrote:

            Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other?

            That's a tricky question, and not one that's easy to answer. First of all, let's address a misconception - WinForms aren't going to go away anytime soon, so learning them isn't going to be wasted effort. You'll still be able to develop desktop applications in them for a long time to come. Now, saying that, I'd choose WPF over WinForms for a number of reasons. 1. While WinForms isn't going away, it's not going to be actively improved by MS, so you're stuck with what you get. 2. WPF makes it easier to create data bound applications. Rather than having to write lots of string myValue = txtName.Text; and txtName.Text = dr[dr.GetOrdinal("MyValue")].ToString(); code, you can use two way databinding in WPF to good effect. 3. It's easy to change the look and feel of WPF applications. 4. If you want to move over to Silverlight, it's based on WPF so the transition is a lot easier. 5. Microsoft is actively targetting improving WPF, and is starting to use it in its own applications. 6. The infrastructure underlying WPF is a whole lot more powerful.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            M Offline
            M Offline
            Marc Firth
            wrote on last edited by
            #7

            Rated 5 - Good Answer! Thanks.

            Pete O'Hanlon wrote:

            1. While WinForms isn't going away, it's not going to be actively improved by MS

            That's quite a big one I think. Whilst I'm sure there are a range of controls, code and tutorials available - I am looking at future expandability. So WPF looks like the way to go. Plus I've strong skills in web design (PHP,HTML,CSS,etc), so what I've seen of XAML is looking quite useful for GUIs and I think it'll be quite familiar. I think WPF is the way to go for me... Thanks again. :thumbsup:

            Neonlight

            P 1 Reply Last reply
            0
            • M Marc Firth

              harold aptroot wrote:

              1. the drag 'n drop editor does not suck

              Do you mean the wysiwyg editor for creating the actual forms?

              Neonlight

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #8

              He does - the editor isn't brilliant - that's why a lot of people developing in WPF also use Blend. It doesn't bother me though, as I prefer to use the code editor when creating WPF forms pretty. The blurry text issue is a problem in the current version of WPF, but the next version uses a significantly enhanced version of the font renderer, and it's a lot clearer. I forgot to mention - WPF uses DirectX natively, whereas WinForms uses GDI+ natively. This means that you can do things like 3D in applications that would be hard (if not damn near impossible) to do in WinForms.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              M 2 Replies Last reply
              0
              • M Marc Firth

                Rated 5 - Good Answer! Thanks.

                Pete O'Hanlon wrote:

                1. While WinForms isn't going away, it's not going to be actively improved by MS

                That's quite a big one I think. Whilst I'm sure there are a range of controls, code and tutorials available - I am looking at future expandability. So WPF looks like the way to go. Plus I've strong skills in web design (PHP,HTML,CSS,etc), so what I've seen of XAML is looking quite useful for GUIs and I think it'll be quite familiar. I think WPF is the way to go for me... Thanks again. :thumbsup:

                Neonlight

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #9

                Marc Firth wrote:

                Plus I've strong skills in web design (PHP,HTML,CSS,etc), so what I've seen of XAML is looking quite useful for GUIs and I think it'll be quite familiar.

                That's why I wrote this[^] article. If you're a web developer, WPF is a lot easier to get your head round.

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                M 1 Reply Last reply
                0
                • P Pete OHanlon

                  He does - the editor isn't brilliant - that's why a lot of people developing in WPF also use Blend. It doesn't bother me though, as I prefer to use the code editor when creating WPF forms pretty. The blurry text issue is a problem in the current version of WPF, but the next version uses a significantly enhanced version of the font renderer, and it's a lot clearer. I forgot to mention - WPF uses DirectX natively, whereas WinForms uses GDI+ natively. This means that you can do things like 3D in applications that would be hard (if not damn near impossible) to do in WinForms.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  M Offline
                  M Offline
                  Marc Firth
                  wrote on last edited by
                  #10

                  Pete O'Hanlon wrote:

                  I forgot to mention - WPF uses DirectX natively, whereas WinForms uses GDI+ natively. This means that you can do things like 3D in applications that would be hard (if not damn near impossible) to do in WinForms.

                  That's another reason to use WPF. Although I'm not looking at a 3D app right now - it is something I want to look at in the future. :)

                  Neonlight

                  L 1 Reply Last reply
                  0
                  • P Pete OHanlon

                    He does - the editor isn't brilliant - that's why a lot of people developing in WPF also use Blend. It doesn't bother me though, as I prefer to use the code editor when creating WPF forms pretty. The blurry text issue is a problem in the current version of WPF, but the next version uses a significantly enhanced version of the font renderer, and it's a lot clearer. I forgot to mention - WPF uses DirectX natively, whereas WinForms uses GDI+ natively. This means that you can do things like 3D in applications that would be hard (if not damn near impossible) to do in WinForms.

                    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                    My blog | My articles | MoXAML PowerToys | Onyx

                    M Offline
                    M Offline
                    Marc Firth
                    wrote on last edited by
                    #11

                    Do you have to use XAML for GUI's - or will a WPF form use defaults if no GUI is coded? Think I've got a good few hours of tutorial hunting ahead of me....

                    Neonlight

                    P 1 Reply Last reply
                    0
                    • P Pete OHanlon

                      Marc Firth wrote:

                      Plus I've strong skills in web design (PHP,HTML,CSS,etc), so what I've seen of XAML is looking quite useful for GUIs and I think it'll be quite familiar.

                      That's why I wrote this[^] article. If you're a web developer, WPF is a lot easier to get your head round.

                      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                      My blog | My articles | MoXAML PowerToys | Onyx

                      M Offline
                      M Offline
                      Marc Firth
                      wrote on last edited by
                      #12

                      Good article too. I used the beta/alpha version of MS blend and web and thought they were great. But they were too buggy at the time to keep learning on - maybe I should take your advice and invest.

                      Neonlight

                      1 Reply Last reply
                      0
                      • M Marc Firth

                        Do you have to use XAML for GUI's - or will a WPF form use defaults if no GUI is coded? Think I've got a good few hours of tutorial hunting ahead of me....

                        Neonlight

                        P Offline
                        P Offline
                        Pete OHanlon
                        wrote on last edited by
                        #13

                        You can write your GUIs in straightforward C# if you want - there's no rule that says it has to be written in XAML. Reading your question, I suspect what you're asking is do you have to restyle the controls or does WPF apply defaults if you haven't. If this is the case, WPF provides a default look and feel that you can change as much or as little as you like.

                        Marc Firth wrote:

                        Think I've got a good few hours of tutorial hunting ahead of me....

                        OK - you need to buy WPF Unleashed [^]by Adam Nathan and Pro WPF[^] by Matt MacDonald. On top of that, you can read up on this stuff in articles and blogs by my fellow WPF Disciples like Sacha Barber, Karl Shifflett, Josh Smith and Marlon Grech.

                        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                        My blog | My articles | MoXAML PowerToys | Onyx

                        M 2 Replies Last reply
                        0
                        • M Marc Firth

                          Pete O'Hanlon wrote:

                          I forgot to mention - WPF uses DirectX natively, whereas WinForms uses GDI+ natively. This means that you can do things like 3D in applications that would be hard (if not damn near impossible) to do in WinForms.

                          That's another reason to use WPF. Although I'm not looking at a 3D app right now - it is something I want to look at in the future. :)

                          Neonlight

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

                          You could always host a DirectX viewport in your winforms app, you just need an empty panel for it. That's the only good place for 3D that I can think of - if you just use it randomly for buttons or something like that it would just look flashy and "like an ad"

                          1 Reply Last reply
                          0
                          • P Pete OHanlon

                            You can write your GUIs in straightforward C# if you want - there's no rule that says it has to be written in XAML. Reading your question, I suspect what you're asking is do you have to restyle the controls or does WPF apply defaults if you haven't. If this is the case, WPF provides a default look and feel that you can change as much or as little as you like.

                            Marc Firth wrote:

                            Think I've got a good few hours of tutorial hunting ahead of me....

                            OK - you need to buy WPF Unleashed [^]by Adam Nathan and Pro WPF[^] by Matt MacDonald. On top of that, you can read up on this stuff in articles and blogs by my fellow WPF Disciples like Sacha Barber, Karl Shifflett, Josh Smith and Marlon Grech.

                            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                            My blog | My articles | MoXAML PowerToys | Onyx

                            M Offline
                            M Offline
                            Marc Firth
                            wrote on last edited by
                            #15

                            Pete O'Hanlon wrote:

                            OK - you need to buy WPF Unleashed [^]by Adam Nathan and Pro WPF[^] by Matt MacDonald.

                            Sold. :-D

                            Pete O'Hanlon wrote:

                            Karl Shifflett,

                            Not related to Chris Shifflett [^] is he? (Chris is probably the best PHP security expert I know of) I had a quick look at your blog, will definately revisit. Thanks again :thumbsup:

                            Neonlight

                            1 Reply Last reply
                            0
                            • P Pete OHanlon

                              You can write your GUIs in straightforward C# if you want - there's no rule that says it has to be written in XAML. Reading your question, I suspect what you're asking is do you have to restyle the controls or does WPF apply defaults if you haven't. If this is the case, WPF provides a default look and feel that you can change as much or as little as you like.

                              Marc Firth wrote:

                              Think I've got a good few hours of tutorial hunting ahead of me....

                              OK - you need to buy WPF Unleashed [^]by Adam Nathan and Pro WPF[^] by Matt MacDonald. On top of that, you can read up on this stuff in articles and blogs by my fellow WPF Disciples like Sacha Barber, Karl Shifflett, Josh Smith and Marlon Grech.

                              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                              My blog | My articles | MoXAML PowerToys | Onyx

                              M Offline
                              M Offline
                              Marc Firth
                              wrote on last edited by
                              #16

                              Pete O'Hanlon wrote:

                              OK - you need to buy WPF Unleashed [^]by Adam Nathan and Pro WPF[^] by Matt MacDonald.

                              The books have arrived. Excellent Recommendations. Makes it all look easy! Especially Pro WCF. Thanks!

                              Neonlight

                              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