Blue Theme Orange Theme Green Theme Red Theme
 
Nevron Gauge for SharePoint
Home | Forums | Videos | Photos | Blogs | Beginners | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Team Foundation Server Hosting
Search :       Advanced Search »
Home » WPF » Advantages of WPF over WinForms

Advantages of WPF over WinForms

Advantages of WPF over WinForms.

Author Rank :
Page Views : 2946
Downloads : 16
Rating :
 Rate it
Level : Beginner
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
Download Files:
Advantages of WPF over WinForms.zip
 
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 


Advantages of WPF has over WinForms:

  • Having the interface in XAML makes it so much easier to fine tune all those obscure properties or to cut and paste a whole section of one control into another.

  • WPF makes it a lot easier to modularise an interface, breaking a screen down control by control. Forms can do the same to an extent but I always found it a battle.

  • Some of the bells and whistles are cool. I've found the use of animations (storyboards) really useful for data entry screens where you need different entry boxes depending on which product is chosen or such. With Forms you'd have to create a separate panel/form for each data entry screen, with WPF I use an animation to hide and move the various text boxes around.

  • It is dirt simple to write Custom Controls with WPF. where as custom control writing in Winforms is very challenging.

  • With expression blend and WPF Building UI is more productive in comparison to win forms.

  • You can change the look and feel of a WPF application far easier than you can a WinForms application.

WPF vs WinForms- In Controls

ListBox
:- WPF is the clear winner. This was turned from an unexciting to a really great control.
ComboBox :- Again WPF is the clear Winner.
TreeView :- I like the WPF treeview better as it is much more flexible but the WinForms one is significantly easier to use. I would call this one a tossup.
RichTextbox :- The WPF Richtextbox is glacially slow in comparison to the Winforms one. Even though it has more flexibility the winforms one is better.
Grids :- WPF is not as advanced in the grid department, but the WPF grid scene is definitely improving. On the other hand it seems like third party Grids are the rule rather than the exception, and some of the WinForms ones are very good. I worked quite a bit with FlyGrid which is astonishingly fast; another one for WinForms.

Example:-Working of Progressbar Showing for WinFormsApplication and also for WPF

WinForms Example:

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 ProgressBar1.Minimum = 0
 ProgressBar1.Maximum = 100
 ProgressBar1.Value = 0
 ProgressBar1.Value += 2
If
ProgressBar1.Value >= 100 Then
 
ProgressBar1.Value = 0
End
If
 End
Sub
Private
Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  ProgressBar1.Value += 2
If
ProgressBar1.Value >= 100 Then
 
ProgressBar1.Value = 0
End
If
 End
Sub
   End Class

Output:

Winforms1.gif

WPF Application Example:

<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width
="525">
<Grid>
<
ProgressBar Height="26" HorizontalAlignment="Left"         Margin="158,48,0,0"Name="ProgressBar1"VerticalAlignment="Top" Width="222"  Value="60"/>
</Grid>
  </
Window>

Output:

Winforms2.gif


Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Author
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Comments
Nice.. by Manish On March 15, 2011
Nice Work..
Reply | Email | Modify 
6 Months Free & No Setup Fees ASP.NET Hosting!
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.