XNA Creators Club Online
Page 1 of 1 (7 items)
Sort Posts: Previous Next

Winforms or WPF?

Last post 05-08-2008 11:58 AM by lidgren. 6 replies.
  • 05-07-2008 5:34 PM

    Winforms or WPF?

    This may have been asked already, but which would you say would be the best API to use for XNA tools? I've used WPF but I have a feeling that Wnforms somehow meshes better with it but I've never used it before. To make things more confusing I tend to hear speculation on WPF replacing Winforms.

    I would just stick WPF without question but it makes me feel like I'm walking through a mine field whenever I'm programming. Im not really looking to which ever is more powerful but towards whichever will blend together with XNA the best.
  • 05-07-2008 5:42 PM In reply to

    Re: Winforms or WPF?

    I would stick to WinForms. WPF takes more processing to render and it's kind of a waste when you have other things going on. It looks a lot nicer, sure, but you're making tools so appearance should take back-seat to speed and functionality, in my opinion.

    Nick Gravelyn -- Microsoft XNA MVP
    Blog | XNA Wiki | FX-izer | EasyZip | Current Adventures | Next-Gen
  • 05-07-2008 5:42 PM In reply to

    Re: Winforms or WPF?

    There are plenty of samples that blend winforms with XNA render targets. I haven't seen any that blend WPF with XNA render targets, but I believe it can be done. However, it might be more work to get running than copying an existing WinForms sample.

    WPF also requires an unfortunately large download (250 MB or so) for Windows XP users who don't yet have the necessary .NET 3 runtime bits. That may not matter if you're only doing tools for yourself.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 05-07-2008 5:53 PM In reply to

    Re: Winforms or WPF?

    Well things seem to be appearing pretty unanimous. Winforms it is then!

    Thanks for the advice!
  • 05-07-2008 7:30 PM In reply to

    Re: Winforms or WPF?

    Anti:
    [WPF] makes me feel like I'm walking through a mine field whenever I'm programming.


    I was similarly shell shocked when I started using WPF. There are a few things I discovered that you need to keep in mind:

    1) It was designed with artists in mind. I'd like to think I'm pretty smart, but I can't operate complex art packages like Maya or Flash to save my life. Artists, many without formal training, are able to sort it out, so I must not be thinking correctly :-)

    2) It's definitely not VB-style forms. I was raised on VB, so I was often forcing myself into the VB mind set when laying out controls and wiring up logic.

    3) Writing a small, ugly app with it is a bit like killing a fly with an atomic bomb. That doesn't mean you can't write small apps with it, but it means that if you already know win forms and you already think that way and you need to build something small: stick with win forms. If you want to do something rich and beautiful and sexy, go with WPF. Once you wrap your head around the WPF way of doing things, you can use it like a tactical nuke.

    All that said, I'd like to encourage you to push as much logic into your model layer and to exploit data binding whenever possible. It will make your life easier if you ever want to switch!
    Brandon Bloom - Hey, I finally work here :-)
    Software Design Engineer
    XNA Community Game Platform
  • 05-08-2008 10:19 AM In reply to

    Re: Winforms or WPF?

    I think WPF can take over winform applications.

    Because WPF have lot of intrative features.

    Also you can have data bind facilities in WPF.

    Still WPF good in 2d grapics.It did not have rich 3d capabilty yet.

    In later varsion WPF relese with Direct 3d capability.

    Also for now XNA intragration not in WPF yet.

    Then  we can  use rich 3d envionmnt in our  desktop applications.

    i think it would be very interasting.

    As said in earlier reply ,for rendering model in the application in would take

    some memory.

    And it is like rendering 3d model in xna.

    I`v created example for using XNA as WPF.

    To the windows form i use 3d model.

    use A-Z to rotate.

    And this project still in alpha.

    http://www.codeplex.com/3DWINFORM

     

    imagine cup Game development Semifinalist

    http://uditha.wordpress.com/

    Imagine cup Game development Semi Finalist
    http://uditha.wordpress.com/

  • 05-08-2008 11:58 AM In reply to

    Re: Winforms or WPF?

    I agree, in general winforms works better with xna and has a much lower learning threshold than wpf. But for larger applications you should definately consider WPF as its much more scalable performance wise and, once you've gotten used to the sometimes-ass-backwards WPF way of doing things, you will have a leaner and meaner application.

Page 1 of 1 (7 items) Previous Next