As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have been programming in java for a couple of years now. Not long ago i decided that it was time to make a change and learn C#.
Now since it both visual studio and C# is new to me i have decided that since i have to learn it anyway i might learn the newest tools there is.
However i am unable to find out what GUI liberay to use. my first search indicated that WPF is the newest "lib" for creating microsoft UI many other threads gave an indication of that this might not be the case.
Therefore i am asking you guys what is the newest UI "lib" for C# and what would you advice me to use?
As pointed out by Giedrius, either Windows Forms or WPF.
Personally, i would start with Forms for a few weeks, get to know the environment, then move on to WPF and the lovely world of XAML.
WPF is the right technology if you are targeting users with good machines. It leverage the power of graphics card and supports vector graphics. You will get good development speed with the XAML system and much more
If you are looking for any third party controls you can evaluate Infrajistics or Telerik.But depends on your UI requirements.
In terms of newest technologies then WPF is certainly the one I'd recommend you learn, but there is quite a level of interoperability between WPF and WinForms, i.e. you can host WinForm controls in WPF and (I think) vice versa.
One thing to be aware of is that WPF is a completely different beast to winforms - you can still do the usual drag and drop, but for fancy stuff you need to be changing the XAML and that can take some getting your head around.
Edit - it's worth taking the effort to learn WPF though because once you have then you'll be producing rich interfaces with ease.
For anything prior to Windows 8 then the latest is WPF. As of Windows 8 you have Metro (name changed I know) but then you could still use your newly aquired XAML skills (picked up from WPF) or start getting into HTML 5 and CSS 3 which would also stand you in good stead for web-based applications.
Win Forms is older than WPF but still well loved / established and can be useful in places. Like most things, choose the right tool for the job.
There are two main flavors of GUI (not counting web): WPF and Windows Forms. WPF is much more recent and if you have no experience on Windows Forms, WPF may be recommended GUI alternative.
Now WPF may have several "flavours" - it is kind of different in abilities in desktop applications, silverlight applications and windows store applications, desktop applications having most of the features, other two has limited set, mostly because of performance and security reasons (for example you can't render UI to image in windows store applications, but in desktop applications you can).
WPF has better hardware acceleration support, has better binding and async/threading support, is much more flexible, many elements look may be changed very easily - which can't be done so easy in Windows Forms, like combo box - you can change color in Windows Forms very easily, but if you will need rounded edges, that will be hard one.
Also WPF can be used in MVVM pattern easily, which is quite a challenge in Windows Forms.
Windows Forms on the other hand is little bit easier to learn + plus it has very good third party components - like Telerik, Devexpress. Both vendors have components for WPF also, but they ain't as good as Windows Forms ones, mostly because they were designed using Windows Forms knowledge, which doesn't fit WPF.
I recommend you to learn html, css and js. As I know you can build Microsoft Windows 8 .net applications using these languages. Check here and also it would be useful if you'll decide to make web application, where all these languages are using also.
If you don't want to limit your self with Windows 8, than try WPF. Applications on WPF will be able to run on any machine with .net framework version you used for application.
GL
As others have pointed out, WPF is the way to go.
One thing that has not been mentioned is that, (since you have java experience) you can think of WPF versus other technologies (such as winforms) the same way you can think of JavaFX versus previous java UI technologies (such as Swing).
Actually, JavaFX seems like a really poor copy of WPF. the language used to define the UI is XML-based (like XAML is), it has (much poorer) support for DataBinding, and many other similarities.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've developed Windows Forms applications for 5 years now. A lot of people say that I should look into WPF. I have a few questions about WPF vs Windows Forms to determine which one is best. WPF is newer than Windows Forms and many people say it'll be the future. Others say that Windows Forms is older and therefor more secure. I am not sure what will be the future. I have googled advantages and disadvantages, but I hope that you can give me a more in dept answer to these questions:
Which one is better based upon performance?
What are the top advantages of using WPF instead of Windows Forms?
What are the top advantages of using Windows Forms instead of WPF?
Which one is more used/liked by businesses?
How hard is it to switch from Windows Forms to WPF?
Which parts of WPF should I definitely look into?
There is no meaning to say that WPF is better than windows forms or vice versa. It depends on many factors:
What kind of UI you are building.
Obviously, the complexity of the views you are designing will factor in to performance on both platforms. They have different layout and rendering pipelines.
How effectively you optimize for performance on each platform.
Advantages of using WPF instead of Windows forms:
XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.).
It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP).
Databinding, which allows you to get a more clean separation of data and layout.
Uses hardware acceleration for drawing the GUI, for better performance.
Top advantages of using Windows forms instead of WPF:
WPF's in-box control suite is far more limited than that of WinForms.
There's greater support in the 3rd-party control space for WinForms. (That's changing, but for now by advantage of time, WinForms has greater support in the community.)
The major drawback of WPF is that Mono doesn't really support it for cross-platform (e.g., it doesn't work on Linux and Mac). Originally, Xamarian/Novella said they weren't going to implement it due to the complexity of implementation. I haven't seen anything to the contrary. Not saying it isn't, but their recommendation is to write model classes and then do a OS-specific front end. Even with WPF being open sourced, it may be built on something that isn't easily ported.
https://social.msdn.microsoft.com/Forums/en-US/e134134a-352f-435b-943a-eda7a2b14fc0/wpf-vs-windows-forms-2015?forum=wpf
Depends upon your learning ability.
Which parts of WPF should I definitely look into?
XAML: Learn about XAML and how it is used in WPF applications.
Layout: Learn about layout panels and how they are used to construct user interfaces.
Data binding: Learn how WPF data binding works and how it can be used.
Data templates and triggers: Learn how data templates and triggers work and how they can be used.
Styles: Learn about how UIs can be styled in WPF.
For more information refer below mentioned URL
Windows Form Vs WPF Windows
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Ok friends, I'm a C# WPF .net developer and have been working pretty much exclusively with UI development in one language or another for the last 15 years. The last 7 have been with C# and I have to admit that I am spoiled.
So, the question is: How do I get started, and what tools are best to use? I see that MonoTouch is out there, but it looks like it is now called Xamarin. What about PhoneGap, Titanium, Appcelorator? Are there others I haven't heard of yet?
I am just wanting to break into Android Development and/or iPad/iTouch development, but don't want to go native. I would like to leverage my C# skills, preferably WPF, but I have no idea which tools support that for Android/iPad/iTouch development.
Which ones integrate with Visual Studio?
Anybody who has REAL EXPERIENCE with any of the above, or one that I haven't heard of, please chime in and point me in the right direction.
I really appreciate it.
Phonegap works by having a web view loading a html & javascript application, so, you wouldn't be using C#, and the results usually are a far shot from a native app.
In contrast, mono touch compiles your C# code so it can run natively on your mobile platform, and since they implement a wrapper around the native libraries you are suposed to be able to write applications as good as if you had gone native. On your case i think that would be pretty much the best way around.
By the way, Mono Touch doesn't remove the requirement of having a mac to develop iOS applications.
One of the best technologies is the Mono for Android/iOS framework - specifically for the fact that you can target 3 platforms just by coding for the one. Of course UI is independent so you'll still need to learn each platforms Design patterns etc... But here
http://xamarin.com/?gclid=CM_agZWFgLYCFUvHtAodeDYADw
The best place to start
If you're coming from WPF and familiar with the MVVM pattern you will find loads of js frameworks that share the same approach (KnockoutJs is a good one), basically this is what you'll be using if you want to go with a cross platform solution like PhoneGap wich is nothing more than wrapper for a webapp, and a few apis to access your device.
Personally I find PhoneGap a good solution only if you want to access the features of your device within a simple application.
As soon you start to add pages to it the feeling lack of responsiveness will make you wonder why you didn't go native from the start.
I would go for Xamarin. The Xamarin 2.0 has Visual Studio integration. You can write code for iOS or Android on Visual Studio 2012 (I am a ReSharper fan :) ).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm planning to write a Windows app to help myself with some exploratory testing tasks (note taking, data generation, defect logging) and I've got stuck at the early stage of choosing a framework/language. My sole experience is with web development and from what I can see, WinForms, WPF, Silverlight, Swing etc are all simultaneously obsolete and thriving depending on who you ask.
While my main aim is to create the app, obviously I'd like to learn something useful while doing so rather than picking up skills with something that's never going to be seen on a project at work. Which Java or C# frameworks would people recommend learning?
Note: consider when this answer was posted (2012). Since then, things have changed a bit, for example Silverlight has been deprecated.
Native Applications
For employment:
Well, nowadays most companies (at least most companies from Oman and the UAE, where I live) are slowly migrating to the cloud. However there are still some opportunities for native app development. The most demanding framework nowadays, is, ( no.. not WPF ), it's Windows Forms!
Why plain old Windows Forms instead of the awesome WPF? One reason, legacy apps. Nowadays most companies only start small scale GUI Application projects, mainly Business applications. For that, WPF will be very expensive since they already have a work-force experienced in Windows Forms, and a lot of legacy code, however for WPF they will have to create a new code-base, and that's pretty risky. So the best thing to keep you employed is Windows Forms.
For new projects: However, if by 'worth learning', you mean, new, ambitious and glamorous. Then WPF may be the best choice for you. It depends on what your requirements are, really.
The Cloud
Now, for the cloud. Java FX and Silverlight are both currently head to head. However Java FX may have an edge since it supports a greater number of platforms. But then again, Silverlight has all the power and resources of Microsoft behind it, and it's ideal for Windows Phone development.
Comparison
For a comparison, here's what you get by each toolkit:
Windows Presentation Foundation:
The power and resources of Microsoft
Ideal for creating new Desktop Applications
Eye candy
Awesome API
XAML, best way to separate design from logic
Create Apps for the Cloud (but they only work on Windows with .NET though)
Windows Phone can run a subset of WPF
Windows Forms:
Used to possess the power and resources of Microsoft, now WPF has that
Ideal for maintaining legacy applications
A well-trained workforce, if you're an entrepreneur
Pretty mature API
Supports more platforms than WPF (through Mono)
Java FX:
Create Apps for the Cloud
Backed by Oracle
Pretty nice API
Cross-platform, runs on most PCs, smart phones are a problem.
Silverlight:
Create Apps for the Cloud
Backed by Microsoft
Pretty awesome API
XAML
Cross-platform, runs on Mac and PC, runs on Windows Phone.
GTK#:
Cross-platform, runs on most PCs, runs on no smart phone.
Backed by the Open-Source world
Endorsed by Mono
Ideal for creating Apps for Gnome.
Swing:
Cross-platforms, runs on most PCs, smart phones are a problem.
Pretty mature
Ideal for creating 2D games, using Java2D
Conclusion
As you say:
While my main aim is to create the app, obviously I'd like to learn something useful while doing so rather than picking up skills with something that's never going to be seen on a project at work.
Well, the frameworks you are most likely to see at work (if you don't for mainstream companies like Microsoft, Oracle, Google etc. ) are Windows Forms and WPF. At least that's what most companies use here. So those are what I recommend. JavaFX and Silverlight also look like they have potential and may be used in the near future.
WPF. Best support for Windows. BTW, it's not obsolete.
One option for you might be to create your application as HTML+Javascript and run it in your desktop application by embedding a browser engine (IE or something else). If you need native APIs, there are mechanisms to make these available to browser's Javascript code.
Java FX 2.0 seems very promising and is now live if swing looks obsolete to you. Note that it has little in common with previous versions. See for example this short comparison with swing. And oracle said they plan to open the source.
Now it is fairly new so unlikely to be used in existing applications.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'am more a sysadmin and a webmaster than a developer, but sometime I develop, including C# principally using Winform (and optionally GTK+).
I've started few weeks ago a WPF project, and it seem really powerful, but at start I feel like a hen who found a knife! There is so many difference!
stackoverflow abounds about topic like that, and I've read carefully some who are similar like:
Hidden features of WPF and XAML?
What all should an expert C#/.Net/WPF developer know?
But, when somebody start with WPF from Winform, What are the differences to which he must pay attention?
[EDIT]
What about some advices/links for LINQ with WPF?
What about some advices/links WPF Navigation?
WPF is completely different from other systems.
I have a few years of WinForms, Win32 and web programming experience, and I believe my web programming experience helped the most.
As for books, "Windows Presentation Foundation Unleashed" from Adam Nathan, Sams Publishing has helped me tremendously.
to getting started with WPF a design pattern Model View ViewModel (MVVM) would be important to know.
also I would recommend Adam Nathan WPF4 book. I think it's great one!
Thank you all, but all this is a bit diffuse, so I made a resources compilation and add some things by my own, please tell me what you think (or improve, I make it Community Wiki)
Strangely no one has talked about LINQ which seemed to be a central element of this technology.
Another thing that seems important to know given the time I lost, is not to use the WPF navigation system that doesn't seems to work properly from numerous sources I've read. So, it seem important to use a navigation framework, like Magellan.
And the routed event system seem to be an important point to look at in WPF, if somebody have some interesting resources about it, please add to this post.
RTFM
Windows Presentation Foundation
WPF Documentation Samples
.NET Language-Integrated Query for XML Data
.NET Framework Developer Center - LINQ
Software
In the Box – MVVM Training
Caliburn Micro: A Micro-Framework for WPF, Silverlight and WP7
Blog posts
sachabarber.net
MVVM for Dummies
Deep drive into WPF graphics internals Part 1
Building WPF Applications with the Page Navigation framework
Videos
MVVM Design Pattern NDC2009
The Code Project
Articles by Sacha Barber
WPF: A Beginner's Guide Part 1 of n
WPF: A Beginner's Guide Part 2 of n
WPF: A Beginner's Guide Part 3 of n
WPF: A Beginner's Guide Part 4 of n
WPF: A Beginner's Guide Part 5 of n
WPF: A Beginner's Guide Part 6 of n
Magellan: An MVC-powered Navigation Framework for WPF
Books:
Windows Presentation Foundation Unleashed (WPF)
WPF 4 Unleashed (the same as precedent but for WPF4)
Other Stack Overflow topics
Hidden features of WPF and XAML?
What all should an expert C#/.Net/WPF developer know?
Questions every good .NET developer should be able to answer?
I agree with Arseny, learning MVVM is core to learning WPF properly. It isn't a niche thing - when applied properly it can make your code cleaner, simpler and promotes decoupling and unit testing.
There is a very nice video here which explains both the concept and implementation:
Jonas Follesø explains the MVVM Design Pattern. In the video the guy is talking about Silverlight but the implementation in WPF is pretty much identical.
Once you've watched the video, and you're happy with the basics of WPF you could do alot worse than adopt a framework to take much of the heavy lifting and plumbing off your hands. I highly reccommend Caliburn Micro. This will lead you down the path of best practice by encouraging you to use MVVM but will also take care of much of the coding detail for you. The documentation on the site is a bit thin on the ground but there are a number of tutorials there that are being steadily added to.
For example, when following MVVM you would typcially have a View (e.g. a window) and ViewModel (a C# class). If you had a textbox on the view which contained an order number, you would have a corresponding property on your ViewModel called OrderNumber. Using a WPF Binding expression:
<TextBox x:Name="OrderNumber" Text="{Binding OrderNumber}" />
the textbox would be bound to the property on your ViewModel so that when either the textbox or the property changes, the other automatically updates. Using a framework like Caliburn Micro you don't have to write any binding expressions, it uses a simple convention based approach. In the previous example, if your textbox was called OrderNumber and your ViewModel property was called OrderNumber Caliburn assumes they must be the same thing and automatically binds them for you.
<TextBox x:Name="OrderNumber" />
As above, your XAML becomes much simpler, and leaves you to focus on getting the job done. I wish I'd found a framework like this earlier before I started churning out lots of my own ViewModelBase classes, ViewLocaters etc.
I also suggest Sacha Barber's blog and all its WPF related articles in codeproject. This guy rocks!
The most important thing a Winforms/C# developer should know/accept is that WPF is very different from winforms and Winforms way of doing things is not the correct way of doing things in WPF.
I have seen a lot of WinForms developers using events/delegates and threads to solve every each and every problem instead of using Binding, commands, triggers etc.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Appart from projects funded/pushed by MS itself, are there any real-world examples of projects that opted for Silverlight?
What were your experiences? Learning curve? Advantages? Resources? Pitfalls? Sacrifices?
--EDIT--
I'm most interested in the developing (team)'s story.
I was at a conference last week, and a number of non-MS people were telling their experiences of using Silverlight for line-of-business apps. Generally, it seemed positive. The advantage seemed that you could start with the Silverlight version, and then if you (later) needed more client control, mostly just copy the xaml and app code into WPF. mostly is important, as there are currently some glitches. But it is much harder to start with WPF and port to Silverlight ;-p
Sacrifices? Not as much power over the client. Limited framework, etc.
Pitfalls? Not-quite-compatible xaml. Different IO, etc.
I can't cite specific projects, as I simply didn't write them down ;-p Besides, they might be company-private. Knowing that they exist doesn't violate NDA ;-p
I've just reviewed the Silverlight showcase for the UK, an IT market I know pretty well, there are 31 apps featured and the break down looks like this
8 x Games = 26%,
6 x Experiments and fun = 19% - eg christmas cards and Xaml XEyes,
6 x Demos = 19% - eg a Deepzoom picture,
11 x Reasonable web sites = 36%
Realistically 31 apps for the whole of the UK, of which only around a third are real, is a tiny amount of development. This could indicate a couple of things,
1) Serious Silverlight development isn't happening in the UK, but maybe is elsewhere
2) Companies doing serious silverlight dev don't want to use Microsoft's showcase
3) There isn't much serious Silverlight development happening yet
My gut feel is that Silverlight is taking a while to become mainstream, it's a brilliant technology, but users don't buy technology or features, they buy benefits .... We need a couple of killer Silverlight apps, then it will take off like Ajax did, once google (and others) showed the way
Check out the Microsoft Silverlight Showcase. There seem to be quite a few Silverlight apps in the wild.
Retouch Genie Ltd - Online photo retouching and restoration site uses Silverlight for its gallery and main client area. Its got quite an interesting photo display control which is quite nice. Here is the link to the before and after gallery that allows you to see the photos in their original state and again after image enhancement.
We are in the middle of developing a system in silverlight that does real time communications with customers. The problems we've had are due to the lack of real-world samples and the change from VB to C# as there is next to no documentation in VB. Apart from that it has been great to develop in. Everything works well and development time was very quick considering it is a brand new technology. We're looking forward to the next release and it's enhanced video handling.
Checkout silverlight case studies for developer story:
business app - http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?casestudyid=4000004876
I even developed an Android app with Silverlight and Java mixture. Without SL it would be really damn boring and probably impossible what I wanted to achieve, check it out: https://market.android.com/details?id=uk.co.aloneguid.todash&feature=search_result