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. Finally started doing some WPF...

Finally started doing some WPF...

Scheduled Pinned Locked Moved The Lounge
csharpquestionlearningwpfwinforms
57 Posts 26 Posters 5 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.
  • Sander RosselS Sander Rossel

    Started reading this huge book[^] (yes, VB and I'm proud of it! So don't start...) ;) Learning the "zammel" stuff, forgetting all I know about Events and Properties and thinking some very advanced controls are standard WPF stuff then finding out I have some DevExpress stuff installed... :doh: I've been planning this for months, and I finally started! Any tips for a WinForms going WPF programmer? (and no, I don't find this a programming question) :)

    It's an OO world.

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

    If you have any ASP.NET in your background, this[^] might help a little bit to get you in the right mindset.

    Forgive your enemies - it messes with their heads

    My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

    Sander RosselS R realJSOPR 3 Replies Last reply
    0
    • L Lost User

      Ian Shlasko wrote:

      The code-behind is the glue that links the GUI to the model... Ideally, that's ALL it does... Realistically, the lines tend to blur a little with more complex applications.

      Espeacially when using things like infragistics[^]. [EDIT] Correct spelling of Infragistics... I wonder if that is what got me the 1 :((

      Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

      modified on Tuesday, August 30, 2011 10:14 AM

      I Offline
      I Offline
      Ian Shlasko
      wrote on last edited by
      #11

      Man, don't get me started... X|

      Proud to have finally moved to the A-Ark. Which one are you in?
      Author of the Guardians Saga (Sci-Fi/Fantasy novels)

      1 Reply Last reply
      0
      • Sander RosselS Sander Rossel

        Started reading this huge book[^] (yes, VB and I'm proud of it! So don't start...) ;) Learning the "zammel" stuff, forgetting all I know about Events and Properties and thinking some very advanced controls are standard WPF stuff then finding out I have some DevExpress stuff installed... :doh: I've been planning this for months, and I finally started! Any tips for a WinForms going WPF programmer? (and no, I don't find this a programming question) :)

        It's an OO world.

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #12

        Naerling wrote:

        Any tips for a WinForms going WPF programmer?

        personally I found it easier to think of XAML as an "ASPX" page instead of win controls...

        V.

        1 Reply Last reply
        0
        • Sander RosselS Sander Rossel

          Started reading this huge book[^] (yes, VB and I'm proud of it! So don't start...) ;) Learning the "zammel" stuff, forgetting all I know about Events and Properties and thinking some very advanced controls are standard WPF stuff then finding out I have some DevExpress stuff installed... :doh: I've been planning this for months, and I finally started! Any tips for a WinForms going WPF programmer? (and no, I don't find this a programming question) :)

          It's an OO world.

          V Offline
          V Offline
          Vark111
          wrote on last edited by
          #13

          Databinding, databinding, databinding. Databind everything. Databind your controls. Databind your labels. Databind your error messages. Databind your buttons. If you set a property on a control without databinding (or XAML), then that's a smell that you might be doing it wrong.

          Sander RosselS 1 Reply Last reply
          0
          • P Pete OHanlon

            If you have any ASP.NET in your background, this[^] might help a little bit to get you in the right mindset.

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

            Sander RosselS Offline
            Sander RosselS Offline
            Sander Rossel
            wrote on last edited by
            #14

            ASP.NET (or web development in general) is the other thing I should start with sometime... :^)

            It's an OO world.

            1 Reply Last reply
            0
            • V Vark111

              Databinding, databinding, databinding. Databind everything. Databind your controls. Databind your labels. Databind your error messages. Databind your buttons. If you set a property on a control without databinding (or XAML), then that's a smell that you might be doing it wrong.

              Sander RosselS Offline
              Sander RosselS Offline
              Sander Rossel
              wrote on last edited by
              #15

              Thanks. I'll keep that in mind! :)

              It's an OO world.

              W 1 Reply Last reply
              0
              • D DaveAuld

                May the force be with you... Everytime I go near WPF, I last about 30 minutes and say **** this! Maybe one day I will get past the hour mark (are there blue pills for WPF?). Hopefully, it will not end in :(( (well there might be a few to start with :sigh: )

                Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                Folding Stats: Team CodeProject

                Sander RosselS Offline
                Sander RosselS Offline
                Sander Rossel
                wrote on last edited by
                #16

                It can't be THAT bad... Right? :confused: Well, I'm still young and flexible so perhaps I can just sort of roll into it... Maybe ;p

                It's an OO world.

                realJSOPR 1 Reply Last reply
                0
                • P Pete OHanlon

                  If you have any ASP.NET in your background, this[^] might help a little bit to get you in the right mindset.

                  Forgive your enemies - it messes with their heads

                  My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                  R Offline
                  R Offline
                  Rage
                  wrote on last edited by
                  #17

                  Great author ;) And don't miss the suggested reading tips at the end of the article as well, if I may add.

                  1 Reply Last reply
                  0
                  • A Abhinav S

                    Naerling wrote:

                    Any tips for a WinForms going WPF programmer? (and no, I don't find this a programming question)

                    1. Do not, I repeat do not, go for the event programming model of Windows Form. 2) Always try and think about 'binding' properties.

                    Too much of heaven can bring you underground Heaven can always turn around Too much of heaven, our life is all hell bound Heaven, the kill that makes no sound

                    Sander RosselS Offline
                    Sander RosselS Offline
                    Sander Rossel
                    wrote on last edited by
                    #18

                    Abhinav S wrote:

                    1. Do not, I repeat do not, go for the event programming model of Windows Form.

                    I got that from the book... The Events model is quite a drag to master it seems :doh: Especially as VB programmer I am used to the Handles keyword at the end of a Method... Luckily I've done some C# too, to get a feeling with some non-VB approaches :)

                    Abhinav S wrote:

                    1. Always try and think about 'binding' properties.

                    I will!

                    It's an OO world.

                    1 Reply Last reply
                    0
                    • L Lost User

                      Ian Shlasko wrote:

                      The code-behind is the glue that links the GUI to the model... Ideally, that's ALL it does... Realistically, the lines tend to blur a little with more complex applications.

                      Espeacially when using things like infragistics[^]. [EDIT] Correct spelling of Infragistics... I wonder if that is what got me the 1 :((

                      Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                      modified on Tuesday, August 30, 2011 10:14 AM

                      R Offline
                      R Offline
                      Rage
                      wrote on last edited by
                      #19

                      Collin Jasnoch wrote:

                      infagistics[^].

                      I love your (subtlety ? lapsus ?) contraction: infamous U infragistics = infagistics.

                      L 1 Reply Last reply
                      0
                      • I Ian Shlasko

                        Naerling wrote:

                        Any tips for a WinForms going WPF programmer?

                        1. Forget everything you know about interfaces and design tiers. WPF is a completely different paradigm. 2) Learn to love XAML. It's weird and awkward at first, but once you get used to it, it's magic. 3) In a perfect world, your code-behind should NEVER* have to refer to a GUI control. Don't even assign names to your controls unless you need to refer to them from a trigger or storyboard. * There are, of course, unavoidable exceptions to this... Try to minimize them.

                        Proud to have finally moved to the A-Ark. Which one are you in?
                        Author of the Guardians Saga (Sci-Fi/Fantasy novels)

                        Sander RosselS Offline
                        Sander RosselS Offline
                        Sander Rossel
                        wrote on last edited by
                        #20

                        Ian Shlasko wrote:

                        Learn to love XAML. It's weird and awkward at first

                        That's an understatement! ;p But I'm managing :)

                        Ian Shlasko wrote:

                        In a perfect world, your code-behind should NEVER* have to refer to a GUI control.

                        I like knowing what it would be like in a perfect world. If I know how and try to write perfect code at least I don't end up with completely horrible code ;p Thanks for the tips!

                        It's an OO world.

                        1 Reply Last reply
                        0
                        • Sander RosselS Sander Rossel

                          Thanks. I'll keep that in mind! :)

                          It's an OO world.

                          W Offline
                          W Offline
                          Wayne Gaylard
                          wrote on last edited by
                          #21

                          Just remember Binding(in case you forgot) :laugh:

                          Live for today. Plan for tomorrow. Party tonight!

                          1 Reply Last reply
                          0
                          • Sander RosselS Sander Rossel

                            Started reading this huge book[^] (yes, VB and I'm proud of it! So don't start...) ;) Learning the "zammel" stuff, forgetting all I know about Events and Properties and thinking some very advanced controls are standard WPF stuff then finding out I have some DevExpress stuff installed... :doh: I've been planning this for months, and I finally started! Any tips for a WinForms going WPF programmer? (and no, I don't find this a programming question) :)

                            It's an OO world.

                            V Offline
                            V Offline
                            vonb
                            wrote on last edited by
                            #22

                            Good luck! I'm just converting a relatively big project from Winforms (it used to be excel 10 years ago...) XAML is great. Documentation is poor on official MSDN. I also use XBAP to make it Web easy. WCF (for data service) is also great. You will use a lot of dispatching, have a lot of crashes... Have fun!

                            1 Reply Last reply
                            0
                            • R Rage

                              Collin Jasnoch wrote:

                              infagistics[^].

                              I love your (subtlety ? lapsus ?) contraction: infamous U infragistics = infagistics.

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

                              Yeah typos suck.. but should they result in a 1 vote??

                              Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                              P 1 Reply Last reply
                              0
                              • L Lost User

                                Yeah typos suck.. but should they result in a 1 vote??

                                Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

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

                                Maybe an infragistics dev did it.

                                Forgive your enemies - it messes with their heads

                                My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                                1 Reply Last reply
                                0
                                • L Lost User

                                  Ian Shlasko wrote:

                                  1. Forget everything you know about interfaces and design tiers. WPF is a completely different paradigm.
                                  2. Learn to love XAML. It's weird and awkward at first, but once you get used to it, it's magic.
                                  3. In a perfect world, your code-behind should NEVER* have to refer to a GUI control. Don't even assign names to your controls unless you need to refer to them from a trigger or storyboard.

                                  1. Forget that you are programmer. Now you are computer graphics maker/script writer. 2. Learn not to hate XAML. 3. Write more code and XAML than necessary. Make it more and more complicated. But never write code-behind. Real man doesn't write code-behind!

                                  realJSOPR Offline
                                  realJSOPR Offline
                                  realJSOP
                                  wrote on last edited by
                                  #25

                                  Amen brother... I just posted an update to an article series of mine with a WPF app that creates charts. The entire chart is created in code instead of XAML (with the exception of a few control templates for tooltips). I hate XAML (which is probably going to make my WPF/Silverlight experience less than fulfilling).

                                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                  -----
                                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                  -----
                                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                  1 Reply Last reply
                                  0
                                  • L Lost User

                                    Ian Shlasko wrote:

                                    The code-behind is the glue that links the GUI to the model... Ideally, that's ALL it does... Realistically, the lines tend to blur a little with more complex applications.

                                    Espeacially when using things like infragistics[^]. [EDIT] Correct spelling of Infragistics... I wonder if that is what got me the 1 :((

                                    Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                                    modified on Tuesday, August 30, 2011 10:14 AM

                                    realJSOPR Offline
                                    realJSOPR Offline
                                    realJSOP
                                    wrote on last edited by
                                    #26

                                    I spell it Infrashitstix. I've used their stuff, and we scrapped it and moved to the Silverlight toolkit instead.

                                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                    -----
                                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                    -----
                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                    1 Reply Last reply
                                    0
                                    • Sander RosselS Sander Rossel

                                      It can't be THAT bad... Right? :confused: Well, I'm still young and flexible so perhaps I can just sort of roll into it... Maybe ;p

                                      It's an OO world.

                                      realJSOPR Offline
                                      realJSOPR Offline
                                      realJSOP
                                      wrote on last edited by
                                      #27

                                      Naerling wrote:

                                      It can't be THAT bad... Right?

                                      Yes, it's that bad.

                                      Naerling wrote:

                                      Well, I'm still young and flexible

                                      All that means is that you'll be able to more easily bend over backwards to make your app work the way you want it.

                                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                      -----
                                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                      -----
                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                      Sander RosselS 1 Reply Last reply
                                      0
                                      • P Pete OHanlon

                                        If you have any ASP.NET in your background, this[^] might help a little bit to get you in the right mindset.

                                        Forgive your enemies - it messes with their heads

                                        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                                        realJSOPR Offline
                                        realJSOPR Offline
                                        realJSOP
                                        wrote on last edited by
                                        #28

                                        Nope - won't help at all, with the possible exception of forming a closer bond with pointy brackets.

                                        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                        -----
                                        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                        -----
                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                        1 Reply Last reply
                                        0
                                        • realJSOPR realJSOP

                                          Naerling wrote:

                                          It can't be THAT bad... Right?

                                          Yes, it's that bad.

                                          Naerling wrote:

                                          Well, I'm still young and flexible

                                          All that means is that you'll be able to more easily bend over backwards to make your app work the way you want it.

                                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                          -----
                                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                          -----
                                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                          Sander RosselS Offline
                                          Sander RosselS Offline
                                          Sander Rossel
                                          wrote on last edited by
                                          #29

                                          John Simmons / outlaw programmer wrote:

                                          Yes, it's that bad.

                                          Recommendation to stay with WinForms? :~

                                          John Simmons / outlaw programmer wrote:

                                          All that means is that you'll be able to more easily bend over backwards

                                          I'm a programmer... I sit on my ass all day. The moment I try to bend (whichever direction) my back, shoulders and neck start to hurt and I know I just should've stayed in my chair ;p

                                          John Simmons / outlaw programmer wrote:

                                          to make your app work the way you want it.

                                          If I can make it work at all (especially in WPF) ;)

                                          It's an OO world.

                                          realJSOPR 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