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;

namespace C1_Demo
{
	public partial class DemoContextMenu : UserControl
	{
		public DemoContextMenu()
		{
			InitializeComponent();
		}

		void contextMenu_ItemClick(object sender, SourcedEventArgs e)
		{
			txt.Text = "Item Clicked: " + ((C1MenuItem)e.Source).Header.ToString();

			if (ItemClick != null)
				ItemClick(this, e);
		}

		public event EventHandler<SourcedEventArgs> ItemClick;

		#region ** ClearStyle

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

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

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

		public Brush HighlightedBackground
		{
			get
			{
				return contextMenu.HighlightedBackground;
			}
			set
			{
				contextMenu.HighlightedBackground = value;
			}
		}

		public Brush OpenedBackground
		{
			get
			{
				return contextMenu.OpenedBackground;
			}
			set
			{
				contextMenu.OpenedBackground = value;
			}
		}

		#endregion
	}
}
