♣    Open Visual studio .net , new project, select language as C#, select application type as WPF application and rename it as MYWPFAPPLICATION

♣    With this process it will open WPF application development environment

♣    By default WPF development environment will come with 2 important files

                                1. App.xaml

                                2. Mainwindow.xaml

XAML :


♣    It stands for Extensible Application Markup Language.

♣    XAML was introduced by Microsoft for WPF programming

♣    Windows Forms user interface will be called as "Form” and WPF user interface will be called as “Window”

♣    By default WPF windows application will come with single user interface, that is “Mainwindow.xaml”.

♣    WPF user interface similar like ASP.Net user interface

♣     In ASP.net we will have two files

                   1. “.aspx”

                   2. “.aspx.cs”

♣    Similar every WPF user interface will be representing with two files.

                   1. “.xaml”

                   2. “.xaml.cs”

.XAML file :


♣    This file will support two modes.

                 1. Design Mode

                2. XAML mode

Design Mode :


♣    In this mode it will display the WPF user interface designer window like below


wpf1


XAML Mode :


♣    In this mode it will display the WPF designer  code window

♣    This code is implementing in XAML

Structure of the XAML code Window :


<window>
           <Grid>
              // Here we write the Controls code
           </Grid>
</Window>

.XAML.CS file :


♣    It is C#.net class file

Structure of XAML.CS file :



using System.Windows
namespace MyWPFApplication
{
    Public Partial Class MainWindow : Window
  
       {  
         // Here we have to write the business logic code of WPF window
       }
}

♣    By default every WPF user interface is representing as a user defined class. That is Mainwindow, window1, window2, window3,……….window n

♣    For all these classes Microsoft is providing a predefined class called “Window” as a super class, this window predefined class is a part of "System.Windows” base class library

♣    Implementation of WPF user interface will be divided into two types

Step 1:


  Designing the WPF user interface

♣    This we can do in two ways

              1. Drag and Drop the controls

              2. Write the controls code by using XAML

Step 2 :


Defining the business logic of WPF user interface with in the “XAML.CS” file.

♣    In WPF a property of a control in design time we can access in two ways

               1. By using Properties Window

               2. By using XAML window