WPF C# Tutorial

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="200" Width="200">
    
                        Name="button1" Width="75">Button One
                        Name="button2" Width="75">Button Two
                        Name="button3" Width="75">Button Three
    


//File:Window.xaml.cs
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication1
{
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }
        private void SharedButtonClickHandler(object sender, RoutedEventArgs e)
        {
            Button source = e.OriginalSource as Button;
            if (source != null)
            {
                MessageBox.Show("You pressed " + source.Name, Title);
            }
        }
    }
}