client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuItem.xaml.cs
author Matthieu Totet
Wed, 18 Nov 2009 15:30:31 +0100
changeset 0 249d70e7b32d
child 8 2482ddb44cb6
permissions -rw-r--r--
Create Directories & Project

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Iri.Modernisation.Controls.View
{
	public partial class ClickMenuItem : ContentControl

	{
        /*
         public ImageSource ImageSource {
            get { return imgItem.Source; }
            set { imgItem.Source = value; }
        }
         */


        public String Title { get; set; }
        
        public event EventHandler<ClickMenuItemHooverEventArgs> ClickMenuItemHooverSelected;
        public event EventHandler<ClickMenuItemSelectedEventArgs> ClickMenuItemSelected;
		public ClickMenuItem()
		{
			// Required to initialize variables
			InitializeComponent();
		}

		private void MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
		{
            OnEnter();
         
		}

        private void OnEnter()
        {
            if (ClickMenuItemHooverSelected != null)
            {
                this.ClickMenuItemHooverSelected(this, new ClickMenuItemHooverEventArgs());
            }
        }

       

        private void UserControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (ClickMenuItemSelected != null)
            {
                this.ClickMenuItemSelected(this, new ClickMenuItemSelectedEventArgs());
            }
        }
		
	}
    public class ClickMenuItemSelectedEventArgs : EventArgs
    {
    }
    public class ClickMenuItemHooverEventArgs : EventArgs
    {
       
        public ClickMenuItemHooverEventArgs()
		{			
			
		}

      
    }
}