Пример #1
0
        protected override void OnPointerPressed(PointerRoutedEventArgs e)
        {
            base.OnPointerPressed(e);

            NavigationBarItem element = VenturaVisualTreeHelper.FindParent <NavigationBarItem>(e.OriginalSource as DependencyObject);

            if (element != null)
            {
                MenubarItem item = (MenubarItem)element.DataContext;

                bool was_dropped = element.IsDroppedDown;

                SetAllChildrenAsNotDropped();

                if (was_dropped == false)
                {
                    element.IsDroppedDown = true;
                    DisplayMenuPanel?.Invoke(this, item);
                }
                else
                {
                    HideMenuPanel?.Invoke();
                }
            }
        }
Пример #2
0
 public void CloseMenuPanel()
 {
     SetAllChildrenAsNotDropped();
     HideMenuPanel?.Invoke();
 }