Re: [2008] [Question] WPF?
Quote:
Originally Posted by chris128
EDIT: Oh and yeah I am thinking of WPF as the next version of winforms because thats how people make it sound. Saying things like "the transition period" implies that we would transfer from winforms to WPF.
Yes, but you were complaining of lack of control support in the current version of WPF. The transitioning really comes into play by mixing WinForms and WPF, and as WPF matures, you will be able to get rid of the WinForm stuff.
Re: [2008] [Question] WPF?
Yeah I see what you mean. Still annoying that the controls that are available dont seem to have as much functionality as the controls in winforms but oh well.
I keep getting tempted to go back and try WPF again but every single time, anything I try just ends up reminding me why I havent stuck with it so far...
For example, I tried to follow a video tutorial on the MS website that involved just adding a few controls to the form and doing some basic stuff but even that got screwed up. I added two controls to my form and then after that it wouldnt let me add anymore... I dragged them in from the toolbox and the form just flashed grey and the controls didnt appear. I spent ages trying to get it to work and in the end just started again from scratch and this time it worked fine... Oh except the toolbox didnt get filled with items until I closed the form and re-opened it twice :S
EDIT: Oh and god knows how you reference controls on one form from a class in WPF! I tried for about 20 minutes and gave up. Anyone got any ideas?
Re: [2008] [Question] WPF?
Quote:
Originally Posted by chris128
EDIT: Oh and god knows how you reference controls on one form from a class in WPF! I tried for about 20 minutes and gave up. Anyone got any ideas?
reference controls on a form in a class? That has nothing to do with WinForms or WPF, it is all the same as it is just a language feature. If you want to reference a given control on a given form, from some random class, the random class needs a reference to the form (or at least the control) it wants to modify.
If you had a new WPF app, and stick a button on it (button1), you could write code like this:
Code:
Public Class TestClass
Public Sub ChangeButtonText(ByVal myForm As Window, ByVal Text As String)
DirectCast(myForm, Window1).Button1.Content = Text
End Sub
End Class
in your Window1 class
Code:
Class Window1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim myTestClass As New TestClass
myTestClass.ChangeButtonText(Me, "HELLO WORLD")
End Sub
End Class
this is the same as WinForms...
Re: [2008] [Question] WPF?
Well all I would do normally in a winform project would be something like this:
vb.net Code:
Class TestClass
Public Shared Sub ChangeText
Form1.TextBox1.Text = "test"
End Sub
End Class
but that does not work in a WPF project so it is not exactly the same as winforms...
Re: [2008] [Question] WPF?
That syntax is using a feature specific to VB and WinForms called "default instances". They actually only exist in .NET to make VB6 developers more comfortable, as they were the norm in the VB6 days. VB.NET actually dropped them in its first 2 releases, but added them back in, in 2005 because of the migration woes of VB6 developers.
So it is actually not the "standard" .NET way to do things.
Re: [2008] [Question] WPF?
Ah well like I said before, I only jumped on the VB bandwaggon at .NET 2.0 so these things are the norm for me and as such I had no reason to think things would be different in WPF. I just installed VS 2008 SP1 BETA and it has made a few improvements to the WPF designer (such as being able to sort properties alphabetically) but has also brought along its own set of problems...
Re: [2008] [Question] WPF?
well it is only a beta so things are likely to change when the RTM hits. To be honest if you really have these issues and problems with WPF (even if I don't see all of them as "issues") you should enter them in connect.
Connect is a feedback and bug reporting system that MS runs, and they actually WILL respond to every entry you put in there. You may not always like their response, such as "won't fix" for a bug you report, or "closed (by design)" for some issue you think is a bug, but they state is by design.
In any event, I use connect all the time to report bugs and feature requests, and I get very good feedback from MS when I do so. If you feel there is a problem or something lacking, go report it, and wait for their response. It usually happens within a few days (if not sooner).
If the features you want, are also features other people want, then MS will see the number of requests for a given feature, and will be more likely to implement it. Likewise if they see people having lots of the same issues with regards to a certain bug, that changes their priority on fixing such things.
The URL is
http://connect.microsoft.com/visualstudio
You can search all existing feedback first to make sure you don't duplicate an entry, you can also vote up someones existing feedback, or comment on it, if you are having a similar issue, or have more to add.
Re: [2008] [Question] WPF?
Cool, yea, my next attempt at WPF will be after the RTM comes out. As I said, I like how the GUI is disjoined from the application. It'll be interesting.
I'm in the same boat as Chris, I tried about three tutorials on MSDN's site and only got one of them, the simplest one, to actually work. One I was getting close to done and I dragged a form and next I know, all my controls disappeared off my form. I can only assume some bug/glitch in the IDE FUBAR'ed the underlying XAML code and broke it completely. I couldn't make enough heads or tails of the XAML to figure out what happened though.
Re: [2008] [Question] WPF?
Yes, there have been some problems with the designer. Most people developing full time in WPF actually use the XAML editor exclusively, and don't do any visual layouts via drag/drop controls like WinForms. More of a webpage type approach (since WYSIWYG editors for webpages never seems to get it right).
There is even a bug with WPF projects if you have option strict on. They missed it before it went RTM, but there is a type conversion error that happens when option strict is on. The IDE is smart enough to correctly propose the CTYPE() fix and apply it for you, but still annoying none the less.
They issued a KB article on it, but I think it is fixed in SP1 for 2008
http://support.microsoft.com/kb/945756
Re: [2008] [Question] WPF?
I still think even after SP1 the whole thing will seem quite unfinished... I know its only the first version of WPF etc etc but I think I speak for most people when I say I would rather wait longer for a decent stable version of it than have a buggy unfinished version sooner.
One other thing that I touched on earlier, Microsoft Expression Blend - doesnt anyone else think its a bit of a joke that to actually make decent animations and really nice looking GUIs with WPF you need to spend another £400 on some extra software? As far as I can tell you cant even make a reflection effect, which is something that like 80% of WPF examples seem to use, without using Blend.
Re: [2008] [Question] WPF?
I agree, as SP1 is not really going to bring too many new things to the table in terms of WPF as a technology. SP1 is not a service pack to WPF, it is a service pack to the Visual Studio development environment. So the improvements in the WPF sector are going to be focused on better development support in the IDE, faster XAML rendering, etc...
Re: [2008] [Question] WPF?
Yea, that irked me as well. I toyed around with Expression blend's trial version last time I tried to figure out WPF and while better than what VS could do, I don't see it worth the price MS is asking for it.
You're right about there are no decent WYSIWYG editors for webpages. The web is built on such a horrid nightmare of mish-moshed standards and additions to those standards, is it any wonder why Firefox and Internet Explorer, in their latest incarnations STILL have disparities displaying the exact same webpage the same way?!
My biggest concern is that WPF will have the same issues. If the Visual Studio IDE already is having problems constructing and building forms, and WPF is in it's "first version", then I'm expecting a spiral-of-death with buggy, glitchy behavior in the future that has to be painstakenly manually tweaked every time just to work exactly the way you want it to.
The web "standards" are far from adequate as standards go. Only recently have good feedback tests such as Acid2 and Acid3 come about to test the display and formatting engines of browsers. I'm just hoping it's not going to be the same for the "future replacement to Winforms."
Re: [2008] [Question] WPF?
Well you have to really look at the magnitude of a company like Microsoft, and the projects it undertakes. I really didn't get that either until I went out there for the first time 2 years ago, and learned a bit more about how they run. It is probably not too much different from any huge software house, but I am a sole developer, like many of you on this forum, so it is a much different environment for me.
Such is the products and technologies that make up WPF, VB, and Visual Studio, etc...
There are all these teams over at MS that work on specific things. So there is a VB team, but they don't actually implement features of the IDE. They may work with the IDE team to implement things specific to VB in the IDE, but it is still 2 different teams, that have 2 different sets of workers and managers, and it all goes all the way up to a common person who is a manager for the entire division or product group or whatever.
So they all have to collaborate and decide on what can work, what will work, what they have time to implement based on release dates which are planned way in advance, etc..
Many of us live in an environment for development where we can make a small change to a program, test it really quick to "assume" it works for everyone, and compile, and we are done. Over at MS, they are building the tools we use to build our tools. They have to account that people are going to try to use their software in all kinds of unthought-of ways, versus the apps we write which usually have general purpose "do this" type of functionality. It is just a totally different monster.
I remember asking someone on the IDE team about a feature I wanted to see implemented on intellisense. This was probably back in May. They said to me "That is a good idea, and we have already scheduled time in November to evaluate what changes we will plan for intellisense, so we will add that into our discussions". So that should give you an indication of the time spans that projects see over there, that they have to schedule time months in advance just to have meetings about possible features they might implement... its pretty crazy.
Re: [2008] [Question] WPF?
Yeah I mean I cant even comprehend that kind of thing, having never had any programming job in my life I dont even know what its like working for a small development team let alone a huge one.
How come you got to go over to the MS development headquarters then kleinma?
Re: [2008] [Question] WPF?
As you may notice th MVP designation in signature which gives us special access to developers at MS. But we should try to keep on topic. :)
Re: [2008] [Question] WPF?
I must admin that I do fail to see what potential benefits having a XAML method of creation has over the classic winforms. Ok WPF looks great and as a display technology its wonderful. But to the developer would will ever be the advantages of using it?
Currently to me the only real reason to use WPF on anything is to gain experience of it, so in 2 years time when its actually worth bothering with you can say on your CV that you've already got 2 yrs experience with it.
I do think it seems largely unfinished, which isnt surprising considering the size of the task, I would imagine it will be great in VB11 though.
Re: [2008] [Question] WPF?
Quote:
Originally Posted by chris128
Yeah I mean I cant even comprehend that kind of thing, having never had any programming job in my life I dont even know what its like working for a small development team let alone a huge one.
How come you got to go over to the MS development headquarters then kleinma?
There is a yearly summit for all MVPs to visit the Redmond campus. I have gone to 2 of them now. Being an MVP for a programming technology, you get to interact with many of the developer product teams while there. Probably my favorite presentation we had was from Paul Vick.. I am probably just a geek, but it is pretty cool to get a presentation done about the future of VB from none other than the lead architect for the language. Being a VB guy, to me it was cooler than the presentation that Anders gave (C#'s daddy).
Re: [2008] [Question] WPF?
Quote:
Originally Posted by Jay1b
I must admin that I do fail to see what potential benefits having a XAML method of creation has over the classic winforms. Ok WPF looks great and as a display technology its wonderful. But to the developer would will ever be the advantages of using it?
Currently to me the only real reason to use WPF on anything is to gain experience of it, so in 2 years time when its actually worth bothering with you can say on your CV that you've already got 2 yrs experience with it.
I do think it seems largely unfinished, which isnt surprising considering the size of the task, I would imagine it will be great in VB11 though.
A really good overview of WPF that is not some Microsoft whitepaper, or some how too article, is actually the wikipedia entry on it.
http://en.wikipedia.org/wiki/Windows...ion_Foundation
Re: [2008] [Question] WPF?
Thanks, I have read it previously.
But the currently method of dragging the controls on to the form could still be continued without going the XAML route, but with the WPF engine reading the winforms instead... Web development is a mess, I would hate application development to go the same way.
Re: [2008] [Question] WPF?
Yea I kinda hate the XAML as it reminds me of web dev. IMO the drag n drop should still have the same technique that winforms have for designing (like setting properties in the property grid and not in the xaml). Sure maybe for more advanced features you could access the xaml but there should be more vb code dependancy.
Re: [2008] [Question] WPF?
Quote:
Originally Posted by RobDog888
Yea I kinda hate the XAML as it reminds me of web dev. IMO the drag n drop should still have the same technique that winforms have for designing (like setting properties in the property grid and not in the xaml). Sure maybe for more advanced features you could access the xaml but there should be more vb code dependancy.
but then if there was more VB dependency in the designing of the windows then that would defeat the whole point of having a 'seperate' interface design system and then having "code-behind" that actually had the programming logic in ;)
EDIT: Dont get me wrong, I still hate WPF :P
Re: [2008] [Question] WPF?
Well in the sense that to design the GUI you still need vb and the xaml is is generated when you dnd but they could have done it too with a partial class instead.