// -----------------------------------------------------------------------
//
// Copyright 2015 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Controls
{
using System;
using System.Linq;
using Perspex.Input;
using Perspex.LogicalTree;
using Perspex.Rendering;
using System.Reactive.Disposables;
public class Menu : ItemsControl, IMenu
{
private static readonly ItemsPanelTemplate DefaultPanel =
new ItemsPanelTemplate(() => new StackPanel { Orientation = Orientation.Horizontal });
private IDisposable subscription;
static Menu()
{
ItemsPanelProperty.OverrideDefaultValue(typeof(Menu), DefaultPanel);
}
void IMenu.ChildPointerEnter(MenuItem item)
{
var children = this.GetLogicalChildren().Cast