WPF C# Tutorial

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="WpfApplication1.EventSetterDemo"
        Title="EventSetter Demo">
    
        
            
        
    

    
        
        
        
    


//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
namespace WpfApplication1
{
    public partial class EventSetterDemo : Window
    {
        public EventSetterDemo()
        {
            InitializeComponent();
        }
        void ButtonOnClick(object sender, RoutedEventArgs args)
        {
            Button btn = args.Source as Button;
            Console.WriteLine(btn.Content);
        }
    }
}