|
-
May 27th, 2009, 11:09 PM
#1
Thread Starter
Hyperactive Member
WPF in a nut shell
OK so it seems the last few days I have seen more and more talk about WPF.
What exaclty is it (I know it means Windows Presentation Foundation)? Do I have it? Am I already using it? I have VS2008 3.5sp1 and I only work on Windows Applications at this time, no web, asp or C.
I have actually seen many articles but never got the clear picture.
It would be nice to see an expert put up an FAQ on this.
If you find information helpful from any member, please take a second and rate their post. Its a nice gesture of your appreciation.
"I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison
Do illiterate people get the full effect of Alphabet Soup?
ADO FAQ 2005-2008 Masked Textbox Patch FoxPro Date MZ Tools Great Free Tool
-
May 27th, 2009, 11:14 PM
#2
Re: WPF in a nut shell
Maybe the WPF forum would be the place to post questions on WPF. I've asked the mods to move this. Please don't double post.
WPF is part of the .NET Framework from version 3.0. WPF applications can be built with VS 2008 or later, VB Express 2008 or later or Expression Blend. We won't count the extensions to VS 2005 as they didn't get past beta for WPF.
http://msdn.microsoft.com/en-us/library/ms754130.aspx
-
May 28th, 2009, 02:31 AM
#3
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 28th, 2009, 04:03 AM
#4
Re: WPF in a nut shell
Well im certainly not an expert, but I use WPF for all of my new projects so here's my description of it:
WPF is kind of like the next generation of winforms, only its not a true 'upgrade' from winforms because WPF has been built from scratch and as such is still lacking some features that winforms has had for years. As you may have gathered from the name, Windows Presentation Foundation, this platform is all about presentation. What I mean by that is, it centres a lot more on the visual aspects of a program than winforms does - one example of this is the fact that all controls in WPF are vector based, which means you can resize them in any way you want and they will always look clear and crisp. Whilst this doesnt sound like that much of a benefit, once you get using it you realise that this makes some things possible that you couldnt really do in winforms. A good example of this is animations, although you can animate things in winforms it never really looks that good does it and its always kind of a hack to make it work. WPF supports animations completely and even has its own Animation namespace where you can find animation classes such as Storyboard and DoubleAnimation. So if you want a progress bar to stretch, spin around, shrink and then fade away...you can do that with ease (although you wouldnt really want to, but thats just an example )
Whilst WPF does focus on the visual aspects, it still provides plenty of functionality for working with data etc and pretty much all of the normal .NET framework classes are there for you to use just as you would in winforms. There are some slight differences but these mainly relate to components and controls, not the data processing type of classes.
Another thing to note is that the user interface is actually developed using XAML code, so whilst you can still drag and drop controls from the toolbox onto your forms (now named Windows, not Forms) you can also edit any part of your interface using the XAML text editor in VS. I actually do most of my editing via XAML now to be honest, as the VS designer seems to mess a lot of things up when you drag n drop controls from the toolbox. Its not hard at all though, lets say I wanted a button on my window, all I would have to type in the XAML window would be:
<Button Name="Button1" Content="Click Me!" />
Oh and the controls are all completely customisable, you can replace any of the standard control templates and styles with your own. So if you want your buttons to have rounded corners, or have a black gloss effect, go for it its completely supported by WPF and with Expression Blend doesnt take long to do at all.
As for how you can go about getting started with WPF - if you have VS 2008 like you say then simply go to start a new project, make sure the target framework box in the corner is set to 3.5, select the Windows category and then you should see "WPF Application" as one of the possible project types.
I will warn you now though, it does take quite a bit of getting used to at first if you have been using Winforms for a while. A lot of the common property names are slightly different in WPF - for example a Button no longer has an "Enabled" property, it has an "IsEnabled" property. You will probably hate it for the first few weeks if you do try and use it, but after that initial struggle, if your anything like me, you will never want to go back to winforms 
Here's an example of an app made using WPF: http://community.devexpress.com/blog...0for%20WPF.png
and another:
http://www.istartedsomething.com/wp-.../lawson_1l.jpg
-
May 28th, 2009, 05:06 AM
#5
Frenzied Member
Re: WPF in a nut shell
The more I think about it the more I feel that WPF was never meant to take over from winforms but rather reach out and grab the people who where in between shrink wrap and custom software. These people tended to have pretty programs not just functional ones so providing these people with a design focused framework was the best way of getting them on board.
I also think that Microsoft is trying to start a revolution of sorts in the LOB type applications The fact is that most LOB applications are fugly as hell. This may not be a relevant reason to scrap winforms but it is one Microsoft seem to slowly be getting behind.
I don't think WPF will hit critical mass until way after 4.0 and 2010 is released as the current tools are too limiting to be widely accepted by the people who hold the purse strings.
-
Jun 4th, 2009, 10:48 AM
#6
Hyperactive Member
Re: WPF in a nut shell
Uhm, what is meant by LOB?
Thanks...
-
Jun 4th, 2009, 11:50 AM
#7
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|