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;
using C1.Silverlight.Legacy;

namespace StockPortfolio
{
    public class SPMenu : C1Menu
    {
        public SPMenu()
        {
        }
        protected override ResourceInfo ResourceName
        {
            get { return new ResourceInfo("SPButton.xaml", this.GetType().Assembly); }
        }
        protected override void PerformLayout()
        {
            base.PerformLayout();
            Rectangle glow = FindName("Glow") as Rectangle;
            Rect rc = C1ControlBase.GetBounds(this.Border);
            rc.Inflate(-1, -1);
            C1ControlBase.SetBounds(glow, rc);
        }
        protected override void OnLoaded(EventArgs e)
        {
            base.OnLoaded(e);

            // remove clipping to allow zoom effect
            for (FrameworkElement f = this; f != null; f = f.Parent as FrameworkElement)
            {
                f.Clip = null;
            }
        }
    }
}
