void CoolMenuItem_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
        {
            CoolMenu cm    = this.ParentItemsControl as CoolMenu;
            int      index = CoolMenu.GetGenerator(cm).IndexFromContainer(this);

            cm.OnItemMouseLeave(index);
        }
Exemplo n.º 2
0
        private static void OnItemContainerStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CoolMenu c         = d as CoolMenu;
            Style    value     = e.NewValue as Style;
            var      generator = CoolMenu.GetGenerator(c);

            generator.UpdateItemContainerStyle(value);
        }