What is the difference between window form application and WPF application?
Also i want to know about WPF application.

WPF is Microsoft's attempt to create a modeling environment that is consistent across platforms, whether your desktop or your browser. Until WPF, developers had to use one set of controls for each. The intention is to have once common set of controls (with consistent behaviour) for both desktop and web implementations of the same app. At the current time we are left with three implementation models - desktop (user32.dll), ASP.NET and now WPF.

Opinion time...

Microsoft has a long history of pushing new paradigms for a time, then abruptly abandoning them for still newer paradigms. For example, you don't see too many people using ADO for data access these days. There was a time when you simple had to use ADO, then ADO.NET. Now, instead of simple data access via ADO you must use several interconnected objects. More flexible, perhaps. Clear and concise, NOT! We've gone through (in no particular order), ADO, ADO.NET, ODBC, OLEDB, etc. You have just enough time to learn how to use the tools before, BAM! Microsoft changes them.

But I'm not bitter.

As an example, an interface consisting of one button, two labels and three textboxes (adds a number in box 1 to a number in box 2 and displays the results in box 3) is build using the gui but stored as follows

<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 Height="306" Width="407">
        <Button Content="Add" Height="23" HorizontalAlignment="Left" Margin="20,12,0,0" Name="btnAdd" VerticalAlignment="Top" Width="75" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="53,58,0,0" Name="txtNum1" VerticalAlignment="Top" Width="120" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="53,87,0,0" Name="txtNum2" VerticalAlignment="Top" Width="120" />
        <Label Content="+" Height="28" HorizontalAlignment="Left" Margin="20,82,0,0" Name="Label1" VerticalAlignment="Top" />
        <Label Content="-----------------------------" Height="27" HorizontalAlignment="Left" Margin="29,116,0,0" Name="Label2" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="53,149,0,0" Name="txtResult" VerticalAlignment="Top" Width="120" />
    </Grid>
</Window>

WPF is Microsoft's attempt to create a modeling environment that is consistent across platforms, whether your desktop or your browser. Until WPF, developers had to use one set of controls for each. The intention is to have once common set of controls (with consistent behaviour) for both desktop and web implementations of the same app. At the current time we are left with three implementation models - desktop (user32.dll), ASP.NET and now WPF.

Opinion time...

Microsoft has a long history of pushing new paradigms for a time, then abruptly abandoning them for still newer paradigms. For example, you don't see too many people using ADO for data access these days. There was a time when you simple had to use ADO, then ADO.NET. Now, instead of simple data access via ADO you must use several interconnected objects. More flexible, perhaps. Clear and concise, NOT! We've gone through (in no particular order), ADO, ADO.NET, ODBC, OLEDB, etc. You have just enough time to learn how to use the tools before, BAM! Microsoft changes them.

But I'm not bitter.

As an example, an interface consisting of one button, two labels and three textboxes (adds a number in box 1 to a number in box 2 and displays the results in box 3) is build using the gui but stored as follows

<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 Height="306" Width="407">
        <Button Content="Add" Height="23" HorizontalAlignment="Left" Margin="20,12,0,0" Name="btnAdd" VerticalAlignment="Top" Width="75" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="53,58,0,0" Name="txtNum1" VerticalAlignment="Top" Width="120" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="53,87,0,0" Name="txtNum2" VerticalAlignment="Top" Width="120" />
        <Label Content="+" Height="28" HorizontalAlignment="Left" Margin="20,82,0,0" Name="Label1" VerticalAlignment="Top" />
        <Label Content="-----------------------------" Height="27" HorizontalAlignment="Left" Margin="29,116,0,0" Name="Label2" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="53,149,0,0" Name="txtResult" VerticalAlignment="Top" Width="120" />
    </Grid>
</Window>

Thank you so much.....tell me WPF application is better than windows form application.?
can i use WPF appl. in my project.?

The tiny (and admittedly useless) app that I threw together for my response above runs just fine as a native exe under Windows. I am not a web developer so I don't know what would be involved to port it to the web. I can't say whether WPF is better. I suppose it depends on whether or not you intend to eventually run the app on the web as well. On first glance the WPF controls do not appear to have as large a set of properties. As I mentioned in my rant, who knows if Microsoft will eventually abandon WPF as a model.

Short answers...

better? - Who knows
can you use it in your project? - don't see why not
should you? - Who knows

In spite of Microsoft's shift away from ADO I, still use it and it still works fine. When Windows 8 comes out who knows what software development technology will be abandoned?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.