WPF C# Tutorial

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ControlDemos" Height="600" Width="500">
    
      
        
          
            
            A
          

        
        
          
            
            B
          
        
        
          
            
            C
          
        
      
  


//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace ControlDemos
{
    public partial class RadioButton : Window
    {
        public RadioButton()
        {
            InitializeComponent();
        }
        public void HandleSelection(Object sender, RoutedEventArgs e)
        {
            System.Windows.Controls.RadioButton b = (sender as System.Windows.Controls.RadioButton);
            StackPanel d = (StackPanel)b.Content;
            TextBlock t = (TextBlock)d.Children[1];
            Console.WriteLine(t.Text);
        }
    }
}