Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

My First WPF Application

Article:
Viewed:  1314 
Posted On:  22/09/2012 21:26:00 
How we can start our programming in WPF, in this article I am going to explain step by step. 

In This Article I Am going to show my first WPF application. How we can start A WPF application step by step I am explaining in this article. 

Step 1. Start Visual Studio.-> Select File -> New -> Project ->

WPF1.png

Figure 1.

Step 2. After Click OK.

WPF2.png

Figure 2.

 Step 3.

WPF3.png

Figure 3.

Step 4.

WPF4.png

Figure 4.

My XAML.cs code for button click event.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes; 

namespace MyFirstWPFApp
{

    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>

    public partial class Window1 : Window
    {
        public Window1()
        {

            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Welcome to WPF");
        }
    }
}

 Step 5.

WPF5.png

Figure 5.

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us