using System.Windows;

namespace SelectedItem_Example
{
	/// <summary>
	/// Interaction logic for MainWindow.xaml
	/// </summary>
	public partial class MainWindow : Window
	{
		public MainWindow()
		{
			InitializeComponent();
			
		}

		private void Button1_Click(object sender, RoutedEventArgs e)
		{
			if(this.clubsGrid.SelectedItem != null)
			{
				var club = this.clubsGrid.SelectedItem as Club;
				MessageBox.Show("The name of the selected club is: " + club.Name);
			}
			else
			{
				MessageBox.Show("Please select an item !");
			}		
		}
	}
}
