using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using C1.Silverlight;
using C1.Silverlight.Maps;

namespace MapsSamples
{
	public partial class DemoMaps : UserControl
	{
		public enum Sources 
		{
			VirtualEarthAerial,
			VirtualEarthRoad,
			VirtualEarthHybrid,
		};
		Dictionary<Sources, MultiScaleTileSource> sourcesMap = new Dictionary<Sources,MultiScaleTileSource> 
		{ 
			{Sources.VirtualEarthAerial, new VirtualEarthAerialSource() },
			{Sources.VirtualEarthRoad, new VirtualEarthRoadSource() },
			{Sources.VirtualEarthHybrid, new VirtualEarthHybridSource() },
		};
		
		Sources _source;
		public Sources Source 
		{
			get { return _source; }
			set
			{
				_source = value;
				map.Source = sourcesMap[_source];
			}
		}

		public bool ShowTools 
		{
			get { return map.ShowTools; }
			set { map.ShowTools = value; }
		}

		public DemoMaps()
		{
			InitializeComponent();

            this.map.Source = new VirtualEarthAerialSource();

		}

		#region ** ClearStyle properties

		public Brush DEMO_Background
		{
			get
			{
				return map.Background;
			}
			set
			{
				map.Background = value;
			}
		}

		public Brush DEMO_Foreground
		{
			get
			{
				return map.Foreground;
			}
			set
			{
				map.Foreground = value;
			}
		}

		public Brush DEMO_BorderBrush
		{
			get
			{
				return map.BorderBrush;
			}
			set
			{
				map.BorderBrush = value;
			}
		}

		public Brush MouseOverBrush
		{
			get
			{
				return map.MouseOverBrush;
			}
			set
			{
				map.MouseOverBrush = value;
			}
		}

		public Brush PressedBrush
		{
			get
			{
				return map.PressedBrush;
			}
			set
			{
				map.PressedBrush = value;
			}
		}

		#endregion
	}
}
