C# Desktop Apps
-
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:
-
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:
There is one thing i will say to you. WPF is the Next Generation.
Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
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:
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;
andtxtName.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.
-
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:
I think you should try both atleast for practice level. than you are in better position to decide your self
-
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:
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?
-
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?
harold aptroot wrote:
- the drag 'n drop editor does not suck
Do you mean the wysiwyg editor for creating the actual forms?
-
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;
andtxtName.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.
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:
-
harold aptroot wrote:
- the drag 'n drop editor does not suck
Do you mean the wysiwyg editor for creating the actual forms?
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.
-
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:
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.
-
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.
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. :)
-
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.
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....
-
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.
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.
-
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....
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.
-
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. :)
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"
-
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.
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:
-
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.
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!