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;
using Telerik.Windows.Controls;

namespace RadialMenuDemo
{
	/// <summary>
	/// Interaction logic for MainWindow.xaml
	/// </summary>
	public partial class MainWindow : Window
	{
		private readonly string sampleImageFolder = "Images/";
		private string lastImage;

		public MainWindow()
		{
			InitializeComponent();

			this.DataContext = this;
			this.ImageTransitionCommand = new DelegateCommand(this.OnImageTransitionCommandExecuted);
			this.radTransitionControl.Content = this.sampleImageFolder + "mainImage.jpg";
		}
	 
		public ICommand ImageTransitionCommand
		{
			get;
			private set;
		}

		private void OnImageTransitionCommandExecuted(object param)
		{
			var currentImage = (string)param;
			if (currentImage != this.lastImage)
			{
				this.radTransitionControl.Content = this.sampleImageFolder + currentImage + ".jpg";
			}

			this.lastImage = currentImage;
		}
	}
}
