-
You owe it to yourself to use WPF
Ok, unlike some of you sporting MPV's and company sponsored MSDN subscriptions I had to be content with the trial versions of Expression Studio. And what can I say.................... WOW. For all you guys creating clunky custom controls its time to give up and embrace change. The only thing we need is a sponsored MSDN subscription for me..... eh I mean express version... yeah thats right.
Anyhoo, Ive got 30 days to play with this software and a week off starting monday. Guess who is going to go tutorial happy! Oh yes me.
Note: Expression Studio is 30 day trial and you need at least VS 2008 standard to do what the screenie shows.... wait for it. . . . . . . . .
http://img297.imageshack.us/img297/5170/wowpr1.th.jpg
Yes, what your seeing is correct. That is indeed VS professional and Expression Blend working on the same project in tandem with instant updates!! And yes that is my new funky button with a nice gradient!
Now, seriously though. This is a major step in .net development. For the first time ever you can have properly skinned windows and make your software look like many commercial applications out there. The days of RAD development solely for boring commercial applications are slipping by!
Techgnome, you know you want it, Il get your tutorials, just you wait.
Rep+ for enthusiasm eh!
-
Re: You owe it to yourself to use WPF
What exactly is Expression Studio? Is it a programming/web design tool? Or is it used for project system methodologies (example: RAD, SDLC or FFD)?
-
Re: You owe it to yourself to use WPF
Hmm, Its actually a suite of tools. The too most important being Blend and Design. Expression Design is basicly a vector art program. WPF is trying to achieve resolution independence and vector artwork makes this easier. Now as for expression blend. This one is a little different to understand. Basically when all said and done it is an UI development program for making WPF windows look better. This means you would do all your programming in Visual Studio including your basic form design if needed. You can then open up the same solution in blend and fine tune the UI detail or make more elegant controls. The best part is blend works in sync with visual studio. I'm writing a small article on this tomorrow to give a more complete understanding.
-
Re: You owe it to yourself to use WPF
I would love to use WPF and have tried several times but there are just too many problems with it at the moment in my opinion... The whole XAML markup for the designer aspect is just a huge pain in the ass for me
EDIT: oh and if you live in the UK or Ireland you can buy Expression Studio for less than £50 (for home use only though) provided you know someone who is still at school :P
http://www.software4students.co.uk/M...2-details.aspx
-
Re: You owe it to yourself to use WPF
Thanks for the link, Il check it out. What problems are you facing. You see Ive learned a lot of ZAMAL before expression came out so I find XAMAL quite intuitive.
For instance the fact that XML containment rules apply I do not need add code for showing my runtime controls, I just parse the XAMAL. This also means I can store a whole form and its controls in a database as XAMAL and parse on the fly.
I know microsoft are taking the whole "you dont need to even know XAMAL" as their mantra but If you spend a week learning the basics you quickly realise how effective XAMAL is at truely uncoupling the UI from the rest of the application.
Also I much prefer:
<Button name="Test" Height="50" Width="50">Hello Kiddies<\Button>
Than
Dim MyButton as New Button
Button.Text = "Hello Kiddies"
Button.Height = 50
Button.Width = 50
-
Re: You owe it to yourself to use WPF
Also Chris that Site does say the UK but not the Republic of Ireland! Pity.
-
Re: You owe it to yourself to use WPF
Damn, sorry I thought it was the whole of Ireland.
As for your XAML example versus your .NET example, I actually much prefer the .NET way. I guess its always going to be down to personal preference.
It wasnt just the XAML that stressed me out with WPF though, it was stupid things like not being able to edit any page in a tab control other than the first one in the designer (believe this has been fixed in SP1 though) and the progress bar's style property being changed to some ridiculously unintuitive name and the lack of a DGV control. Just loads of little things like that, that added up to me getting more and more frustrated with it and eventually giving up.
-
Re: You owe it to yourself to use WPF
Quote:
Originally Posted by chris128
Damn, sorry I thought it was the whole of Ireland.
As for your XAML example versus your .NET example, I actually much prefer the .NET way. I guess its always going to be down to personal preference.
It wasnt just the XAML that stressed me out with WPF though, it was stupid things like not being able to edit any page in a tab control other than the first one in the designer (believe this has been fixed in SP1 though) and the progress bar's style property being changed to some ridiculously unintuitive name and the lack of a DGV control. Just loads of little things like that, that added up to me getting more and more frustrated with it and eventually giving up.
Same here
Also you add that I don't like writing html-style code, so and xaml is that style, the whole tagged property thing needs to be changed.
-
Re: You owe it to yourself to use WPF
Quote:
Originally Posted by DeanMc
...
Also I much prefer:
<Button name="Test" Height="50" Width="50">Hello Kiddies<\Button>
Than
Dim MyButton as New Button
Button.Text = "Hello Kiddies"
Button.Height = 50
Button.Width = 50
With .NET3.5 you can also do somethhing similar. ;)
vb.net Code:
Dim MyButton As New Button With {.Text = "Hello Kiddies", Height = 50, .Width = 50}
Pradeep :)
-
Re: You owe it to yourself to use WPF
Quote:
Originally Posted by Pradeep1210
With .NET3.5 you can also do somethhing similar. ;)
vb.net Code:
Dim MyButton As New Button With {.Text = "Hello Kiddies", Height = 50, .Width = 50}
Pradeep :)
Cool I didnt know you could do that (probably cos always set my projects to target 2.0... )
-
Re: You owe it to yourself to use WPF
You guys know resistance is futile. I didnt like it at first but thats because i thought it was winforms with xamal tacked on which of course is incorrect. Anyhoo, I will procceed with my tutorials and see if i can presuade some of you to the dark side!
-
Re: You owe it to yourself to use WPF
-
Re: You owe it to yourself to use WPF
WPF looks cool... but from some of my colleagues I've heard the Xml markup isn't the friendliest and I've also heard that it's not even finalized.
It seems like just another way of doing things. I have no problem working with GDI+ to do whatever I need.
I think a WPF like mechanism is the future but today? I don't think it's quite ready and universal enough.
-
Re: You owe it to yourself to use WPF
I agree, I just personally dont see why the UI needs to be separated from the VB code. I mean surely a large percentage of code that we all write is done to update the UI so it makes sense that you need to be able to work with the UI directly from the programming language... After all, for pretty much any windows forms app the whole purpose of it is to show someone data and manipulate that data based on what they click and press, so why try and distance the things that they click and press from the programming logic. Dont get me wrong, I know you can do things like change a label's text or whatever from VB code in a WPF project but the whole "separation" thing just seems unnecessary to me.
I guess it might be good for huge enterprise level business apps but for people like myself it doesnt seem to provide any benefits.
-
Re: You owe it to yourself to use WPF
Quote:
Originally Posted by chris128
Cool I didnt know you could do that (probably cos always set my projects to target 2.0... )
That syntax is compiled to MSIL code which means it doesn't matter what framework you're targeting as long as the compiler (the IDE) understands it.
I just tested this in a winForms app that targets the 2.0 Framework.
-
Re: You owe it to yourself to use WPF
oh right, cool, thanks for the info
-
Re: You owe it to yourself to use WPF
Quote:
Originally Posted by chris128
I agree, I just personally dont see why the UI needs to be separated from the VB code.
That's where I disagree with you. I think WPF is a great idea; I just don't think it's properly implemented. Just like the web, separating the UI with the Code gives you more freedom to change the look, feel and even control order. I just don't think WPF is what will get us to a separated layout.
-
Re: You owe it to yourself to use WPF
Here's why the UI needs to be separated from the code behind it. honestly, developers suck ad UIs - generally speaking - there are some exceptions. If it were up to developers, all our apps would be using 16-bit bmps and everythign would be button grey. Developers tend to think in terms of functionality, the prettification comes after... maybe... if it's in the budget. Then you've got those types that work the other way, boutting all the flash. bang and pop into the screens that don't do anything. and in many cases, if the shop is big enough, there's a graphic designer who can and is willing to develop the good looking UI but isn't a developer.
By lifting the UI and seperating it from the code, the developer can concentrate on the bits that make the thing go, and no worroy about that frame that looks confined like a can of sardines... that now becomes the GD's problem.... meanwhile the GD doesn't care where the data is coming from. that was the point behind WPF...there was this recognization that as developers, we generaly suck at designing effective UIs.
-tg
-
Re: You owe it to yourself to use WPF
Good comments guys. I think WPF IS the future. Remember WPF is a collection of technologies not just xamal. Of course it will need to be refined as with all new paradigm's but Microsoft are on the right track. I know xamal seems counter intuitive but it makes sense not because of the xamal itself but because it adheres to the rules of XML. This means that xamal works on different UI paradigms (windows, web) by just changing the containing "page".
As I said Im off next week so I will be working on my "Convert" tutorials and articles which should be fun!
Also Kas, I believe as of 3.5 SP1 Xamal has been taken out of beta, I could be wrong though.
Keep your thoughts comming guys, this topic clearly hasn't been discussed nearly enough!
-
Re: You owe it to yourself to use WPF
Kas, can I ask which parts you think are bad in WPF, just to gain some insight! Thanks!
-
Re: You owe it to yourself to use WPF
We've got it setup like that - there are a bunch of creative guys who sit there and make the forms in XAML. We can code for it. They can come back and change the form's look and feel without bothering us about it.
I also made an attempt at 'design' with a few coworkers with the TeamBuildTray for VSTS using WPF.
However, I wasn't so impressed with it as I was with WCF and WF.
-
Re: You owe it to yourself to use WPF
I agree but is that more because we naturally dont care for UI development, or as techgnome put it, if its all gun grey its a ok.
-
Re: You owe it to yourself to use WPF
Quote:
Originally Posted by DeanMc
Kas, can I ask which parts you think are bad in WPF, just to gain some insight! Thanks!
Like I mentioned before most of my opinions were based on the experiences some colleagues and friends had; I haven't gotten around to really getting into WPF.
-
Re: You owe it to yourself to use WPF
Ah cool. Can I just link to this post:
http://www.vbforums.com/showthread.php?t=553853
This would have been easily acheviable in WPF with a pop up control and a built in animation to change the opacity. No sleeping threads or hacks.
-
Re: You owe it to yourself to use WPF
OK Dean, you win! Your Irish charm has worked its magic. I am going to try and write my next program using WPF and every problem I have, every gripe or annoyance or error I encounter is coming your way! :D
-
Re: You owe it to yourself to use WPF
OK that didnt take long, problemo numero uno has arrived. I created my new WPF project, right clicked on the Window1.xaml file in solution explorer and went to Rename and then entered a new name with the .xaml extension. I re-open the form, all looks fine.
I hit F5 to run the app and I get the following exception:
Code:
Cannot locate resource 'window1.xaml'.
I assume this should be fairly easy to resolve... but you never know with WPF, probably take me all night.
EDIT: OK i got that one sorted, even though my form was no longer named Window1.xaml the project settings were still set to use Window1 as the startup item.
Next problem - I accidentally applied the BlurBitmapEffect to a control using the properties window in the designer... and now I cant remove it. What sort of designer lets you select a value from a combobox and then not allow you to go back to having nothing selected??
Dont need to know XAML my arse. lol
-
Re: You owe it to yourself to use WPF
Thats what I said you DO need to know xamal, ok you found the first one cool. The second one is a two part one, first of you should be using blend to apply affects like that and that is what I will be stressing, second go to your xamal file find the control and remove the BlurBitmapEffect tags.
-
Re: You owe it to yourself to use WPF
yeah I realised that but it still sucks not being able to do it from the designer lol I've got to be up in 6 hours, I should really go get some sleep but seeing how long I can last without WPF stressing me out is much more fun :) this WPF lark better revolutionise my life Dean!
-
Re: You owe it to yourself to use WPF
It will, heres a tutorial to keep you up with me (where on the same time zone!)
http://www.vbforums.com/showthread.p...28#post3422228
-
Re: You owe it to yourself to use WPF
haha thanks, I'm just using the Animation classes at the moment to make lots of stupid things happen :) at the moment when my form loads all of the buttons spin round 360 degrees :D haha just what you always wanted buttons to do
I do have a problem with animating the Opacity property though. It seems I can only access the panel/background's opacity and not the actual window itself (which you can do fine in normal VB.NET apps)
Try it yourself:
vb.net Code:
Dim FormCloseAnimation As New Animation.DoubleAnimation
FormCloseAnimation.From = 1
FormCloseAnimation.To = 0
FormCloseAnimation.Duration = New Duration(TimeSpan.FromSeconds(1))
Me.BeginAnimation(UIElement.OpacityProperty, FormCloseAnimation)
-
Re: You owe it to yourself to use WPF
How do you mean you cannot access it?
-
Re: You owe it to yourself to use WPF
Well try run that code that I just posted and you will see that the window itself does not turn transparent, just the background (which results in it turning black)
-
Re: You owe it to yourself to use WPF
Ah yes I get the same issue and I fink I know what is up, what GPU do you use?
-
Re: You owe it to yourself to use WPF
Nvidea Gforce 8500 GT apparently
-
Re: You owe it to yourself to use WPF
And I have the 8800GT. Are you by any chance using the drivers from nvidia or microsoft?
-
Re: You owe it to yourself to use WPF
-
Re: You owe it to yourself to use WPF
Good because that has nothing to do with it :)
See this:
AllowsTransparency If AllowsTransparency is set to True, the Window class allows other
windows to show through if the background is set to a transparent
color. If set to False (the default), the content behind the window
never shows through, and a transparent background is rendered as a
black background. This property allows you to create irregularly
shaped windows when it’s used in combination with a WindowStyle
of None, as you’ll see in the “Nonrectangular Windows” section.
-
Re: You owe it to yourself to use WPF
If you want to see something really cool that you can do with WPF and XAML... take a look at Beth Massi's article on using XML literals to create a data entry form ... then think a little bit outside the box and imagine the XML being stored in a database instead. WOAH! Now you've got the basis for something that is completely database driven, not just the data, but the UI as well.... how's that for customization?
-tg
-
Re: You owe it to yourself to use WPF
Now having said that I will be doing a vista glass tutorial late next week so we can have vista glass see through windows, yummy!
-
Re: You owe it to yourself to use WPF
Actually Techgnome, thats pretty cool and because you can parse xamal on the fly you could have many UI's for different circumstances, on thing to note though is because your parsing xamal from a file you get just that xamal, this means your application would be slower because the xamal in VS is actually compiled into bamal when you build you project.