tags:

views:

181

answers:

4

Does WPF compiled code is bigger or smaller than Winform compiled code? Does WPF generates more code behind that Winform does? I have a Winform App and I want to make a new version on WPF. Customers get the updates of this app by dowloading it. So my question is, If I make the application now on WPF just using the same screens how bigger can it be the compiled solution compared to the WinForm version.

( I'm not asking about performance, advantages or disadvantages, let's make is simpler. So far I have seen with small tests that WPF app are some kb bigger so the question is are those Kb added becuase of a different shell or wrapper that the WPF application embeds or will each of the WPF control embeds overhead MSIL code to the final .exe and .dlls files of the solution.)

+2  A: 

I did two projects with some controls...

compiled wpf = 52.3 KB

compiled winforms= 44.3 KB

so it looks like it will be heavier... hard to say ho much heavier.. depends on your project

Luiscencio
Yes, it is hard to say. I've done the same test. The application dlls are over 20Mbs now with WINFORM.... I woud like to tell how much will they be under WPF.
jmayor
There are two options here, the WPF app is bigger because of a bigger shell that is added to the .exe file or is the WPF going to keep increasing by the amount of controls and forms used in the application, That's what I would like to know.
jmayor
+1  A: 

It really depends on how you write your WPF application. Data binding, styles, and triggers can take you a long way with WPF; it's often possible to implement functionality that in WinForms would require a lot of code with close to none in WPF. If you just do a straight port of WinForms functionality, with lots of event handlers and code-behind and the like, you're not going to see this happen. If you use WPF properly, you might.

Robert Rossney
A: 

How often is it being downloaded?

Is the exe size the only concern? Wouldn't performance speed be of greater value. Yeah it might take you an extra 20 minutes to download upfront, but if you save a minute a day in performance your customers recoup the cost long term. Comparatively bandwidth is cheaper than the cost of slower performance over the course of time.

EDIT: Why was this voted down, it was a perfectly legit Q and predated the edit to the original question that added "I'm not asking about performance, advantages or disadvantages...".

jasonk
so wpf is more "efficient" than winforms?
Luiscencio
It sure as hell is in the large app I'm porting over from WinForms to WPF.
Robert Rossney
@Robert So it is saving you space with the new WPF version?
jmayor
I really couldn't tell you. I still have many features to port over from the WinForms version of the application. Also, I don't really care about how big the executable is.
Robert Rossney
A: 

I have two applications that are roughly equivalent, the WinForms version having slightly more functionaility. The sizes are:

WinForms: 1085Kb WPF: 1039Kb

So they're roughly equal. But like the other answerers have said: this depends on many factors, and shouldn't be the reason you're choosing WPF (I however would definitely choose WPF for new projects btw)

Groky
I'm not choosing WPF becuase of that fact, So far I have seen the oposite, WPF app were bigger and that's what was preventing me from jumping into WPF, been afraid that a huge Winform app turned into a WPF one will increase the app mb size dramaticaly.
jmayor