Thread: 2008 WPF designer

  1. #1
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607

    2008 WPF designer

    I'm in the process of learning WPF and switching from WinForms over to WPF. Honestly WPF, at the outset, feels like a huge step backwards in terms of the designer provided with Visual Studio. I feel like I'm trying to design interfaces from a command line tool or an external editor. I really do not want to have to type out lines of XAML to merely get my control to appear how I want and to data bind it.

    Is anyone else using WPF or learning it? Perhaps you could give me some tips or a starting point. I purchased two new books and one of them is Pro C# WPF in VS 2008 (I could not find the 2010 version) and it shows all kinds of XAML. Copying and pasting XAML from various sites or book feels like I'm hobbling together a GUI without knowing anything about why or how it works.
    Last edited by VirtualAce; 12-09-2010 at 06:35 PM.

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    The C# on VS 2008 book is unfortunately leading through the wrong path. It's with VS 2010 that Microsoft included a powerful WPF designer -- the missing piece that was delaying WPF adoption by us.

    In any case, from my readings ( I too am starting pretty much what you are doing), WPF forces us into a new and different workflow than what we were accustomed before in terms of UI design. XAML is indeed an unavoidable and constant presence on anything but the simplest UIs. I think you will have to wrap your mind around that eventually. There's no avoiding it. Although certainly with VS 2010 coding in XAML is a lot less prevalent.

    That said, the workflow can be one of two options. More to the business side of development with simple and largely unstyled UIs, you'll want to VS 2010 own designer. A small tutorial showing the process can be found here. For more advanced and stylized UIs I think the best option is to integrate Expression Blend into your workflow. That's what the big players in WPF design are doing.

    Can't really advise on books yet, since I'm yet to actually start shopping. My family budget is pretty much busted for the rest of the year. Only in February will I start thinking about that.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I'm not sure why Microsoft does this with almost every new tech release. It is not that WPF is terrible after getting into it some but it is that the initial 'taste' of laying out forms was a very bad one. Microsoft often pushes tech long before their tools for the tech are ready. They could probably save money by pushing it when it is the right time and the infrastructure is there to support it and I believe adoption of the technology and various company rollouts would go a lot smoother. You would think they know how to rollout products after having being doing it for nearly 30 years but it still seems they really don't. Apple definitely has MS beat when it comes to the methods of rolling out and introducing new technology. It seems that MS's approach is the old school you will eventually have to use it so it really does not matter when or if the infrastructure and tools are there. They really need to get out of this mindset to be sucessful when introducing new interesting technologies.

    XAML is actually quite simple for many reasons and is very close to something I have already been doing. I'm excited to start working with WPF but I'm not ready to give Windows Forms the old heave-ho. In fact knowing both will probably make my skill set that much more marketable.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I agree entirely. I find WPF/XAML pretty much essential these days, particularly if one wants to delve into web applications and Silverlight. But also on the desktop (consumer software, graphically intensive software, applications integrating skinning features, dynamic UIs). I'm expecially excited about possibilities in educational software... an area I'm mostly interested on.

    However, Windows Forms still is a fast, productive and well understood method for UIs that don't require any of the WPF exclusive features. I intend to keep both in my bag. Especially because I did some investments into 3rd party components; an investment that I'm not willing to see go to waste.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I was talking with a colleague today about this (he's the C# brainiac of the team) and he recommended you two books:

    Apress - Pro C# 2010 and the .NET 4 Platform, 5th Edition, by Andrew Troelsen. It's a huge book (I have the C# 2008 4th edition) and he says in this 5th edition Andrew goes into a lot more detail about WPF which makes for a great starters book. Since this is also perhaps the best C# book I have read, I definitely agree with him. Particularly if it's true WPF gets a lot more coverage in this new edition.

    Apress - Pro WPF in C# 2010, 3rd Edition, by Matthew MacDonald. He says this is pretty much the WPF bible out there. Another thick book running well over 1000 pages and covering pretty much anything you want to know and all those things you didn't think you wanted to know. I don't know this book personally. But two things: It's from Apress -- their books are simply some of the best -- and I don't usually question Rodrigo (my colleague) advise. Ever. He's that good

    Choose the first or the second based on how deep you want to go. The second book is intended for deep WPF development.
    Last edited by Mario F.; 12-12-2010 at 03:43 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    I've been using WPF for quite some time now, and I absolutely love it. I think it is leaps and bounds beyond Winforms. I love the ability to design the UI just as if I am designing a document in HTML or XML. It just makes things...easy.

    Sure, in the past you could drag and drop stuff onto your form, but that always felt very ad-hoc and changed from IDE to IDE. XAML gives you a very precise and easy way to define your UI without actually touching your code, which I love.

    Anyways, WPF (like all things) does take some time to learn, but once you learn it I don't think there is any going back. I really do love it a lot. I think it's one thing that Microsoft has done well (Silverlight included)
    My Website

    "Circular logic is good because it is."

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by DavidP View Post
    Sure, in the past you could drag and drop stuff onto your form, but that always felt very ad-hoc and changed from IDE to IDE. XAML gives you a very precise and easy way to define your UI without actually touching your code, which I love.
    Note that starting with VS 2010 you get back to RAD development for WPF if you so wish. Necessarily, you can then tweak your XAML... which I suppose everyone does. But just to point out that WPF is RAD-friendly as long as the IDE provides the necessary environment; which VS 2010 seems to have done.

    I think it's one thing that Microsoft has done well (Silverlight included)
    Silverlight is starting to grow on me. I'll concede here. But Silverlight 5 decision to support P/Invoke and COM interoperability still seems to me an absurd and dangerous idea that Microsoft may regret (as many of the users who requested for it).
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    At the last few Microsoft tech'ed conferences, Silverlight was a non-mention, as was WPF. Even at the last Microsoft PDC, they didn't mention Silverlight.

    I suggest having a read up about the war within Microsoft about Silverlight/WPF and HTML5. It seems the Windows team really want to see HTML5 come out on top (and who wouldn't).

    Having used Silverlight all day at work, I'll steer clear. I see why it's nice, but it has its problems -- and is trying to fill a hole that doesn't exist, even Microsoft has seen this.

    WPF is awesome (and ideas from Microsoft research -- Prism anyone?), although has its problems.

    The way I see it going down:
    * Drop support for Silverlight on other platforms, including older Windows platforms
    * Drop legacy Silverlight support
    * Sweep Silverlight under the rug in favor of HTML5
    Last edited by zacs7; 12-13-2010 at 06:50 PM.

  9. #9
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I've seen this same issue being debated something like a month ago somewhere I can't quite remember; I thinks Ars. But I can't quite get it. Mostly I don't understand how can Silverlight compare to HTML 5. HTML 5 is not -- and never will be -- a catch-all answer to web applications. Not at the level of what Silverlight can achieve. Technologies like Silverlight or Adobe's Flash/Flex/Air can exist on top of HTML 5 to enrich it. And that's it. HTML 5 is simply not capable of replacing them.

    I don't read into Microsoft noisy silence about Silverlight the same way others do. For once I do trust the word of a Microsoft senior executive on this issue, because it makes all sense to me. Dropping Silverlight in favor of HTML 5 is... I don't know, like saying we aren't going to put images on a website because people can read. It's downplaying the experience.

    Not that I mean Silverlight is one essential technology. By all means, it's not. But it's an upgrade over HTML 5 capabilities that some companies and developers are taking very seriously. I suspect much of the "Microsoft is going to drop Silverlight" is unsubstantiated rumor -- an overreaction to Bob Muglia's faux pas at the PDC this year.


    EDIT: And as for HTML 5, let me tell you... a) It's left to be seen if indeed this will be cross compatible across all systems and b) it's still a long way from being delivered. These are two major problems. The first is no surprise to any of us who have been through such experiences as browser wars or the horrid adoption of HTML 3 standards (by everyone!), back when. HTML 5 is such a big shift from earlier standards that I sincerely doubt the widespread adoption will be a smooth road for web developers who will not have to contend with every browser maker and their mum having their own ideas on how to implement the standard. As for the second problem, god knows when the W3C ever releases something finished and in working condition for adoption. This hasn't been an institution with an history it should be proud of. But in any case, it's not next year, it's not in 2 years. Maybe 3, perhaps 4. More likely 5 or 6 for us to have at least a Proposed Candidate standard. It was Ian Hickson himself that said that the W3C Recommendation stage is only expected by around 2022. Is anyone seriously thinking we can just drop non conflicting technologies and just wait?
    Last edited by Mario F.; 12-13-2010 at 07:47 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #10
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    The way I see it going down:
    * Drop support for Silverlight on other platforms, including older Windows platforms
    * Drop legacy Silverlight support
    * Sweep Silverlight under the rug in favor of HTML5
    Silverlight is the main development platform for Windows Phone 7. I don't think they are just going to sweep it under a rug.

    Question: With Novell being bought out, what is Microsoft doing about Silverlight on Linux? Novell was developing Moonlight...is Moonlight part of the IP that Microsoft came away with when Novell was bought out by the company who's-name-I-don't-know?
    My Website

    "Circular logic is good because it is."

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    We don't know yet. The IP list hasn't been revealed. But Novell says the recent deal will have no impact (at the end of the article).
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    After doing a simple app (in relations to another application i am developing) today with WPF (my first WPF app ever) I can say i really think this is the way to go. The layout is nice and easy and IMO makes it more modular, the data-binding is just awesome and makes the life so much easier.

    At a first glance I must say it is much more flexible than regular winforms, which is always nice.
    Last edited by Shakti; 12-16-2010 at 05:29 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. textButton array using Microsoft Visual Designer
    By stef1966 in forum C# Programming
    Replies: 4
    Last Post: 10-10-2006, 07:31 AM
  2. Game Designer vs Game Programmer
    By the dead tree in forum Game Programming
    Replies: 8
    Last Post: 04-28-2005, 09:17 PM